comcigan.ts
v1.2.1
Published
A Comcigan parser written in TypeScript
Downloads
38
Maintainers
Readme
comcigan.ts
컴시간알리미를 파싱하는 TypeScript 라이브러리입니다.
컴시간알리미의 구조 및 파싱 방법은 docs/README.md를 참고해주세요.
설치
npm install comcigan.ts # npm
yarn add comcigan.ts # yarn
pnpm add comcigan.ts # pnpm
사용 예시
import Comcigan, { School, Weekday } from "comcigan.ts";
const comcigan = new Comcigan();
const main = async () => {
const searchedSchools = await comcigan.searchSchools("학교 이름"); // 학교 검색
const school = await School.fromName("학교 이름"); // 바로 불러오기 (== searchedSchools[0])
console.log(await school.getTimetable(3, 3, Weekday.Friday)); // 3학년 3반 금요일 시간표
console.log(await comcigan.getTimetable(school.code, 3, 3, Weekday.Friday)); // 학교 코드를 이용하는 방법
};
main();