doc up to date

This commit is contained in:
monoid 2022-04-21 01:05:50 +09:00
parent 220416c734
commit 482837d7f0
1 changed files with 19 additions and 3 deletions

View File

@ -2,10 +2,26 @@
## getIssue
Github token을 받아서 최신 100개의 Issues 들의 내용을 긁어옵니다.
Github token을 받아서 최신 100개의 Issues 들의 내용을 긁어옵니다. 그리고 그 내용을 json으로 출력합니다.
```sh
deno run --allow-net --allow-env getIssue.ts 'YOUR GIHTUB TOKEN'
deno run --allow-net --allow-env --allow-write getIssue.ts --token 'YOUR GIHTUB TOKEN'
```
으로 실행하면 됩니다.
토큰을 발급받기 위해선 [다음 링크](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)를 참조하면 됩니다.
토큰을 발급받기 위해선 [다음 링크](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)를 참조하면 됩니다.
인자로 token과 path를 받습니다. token 인자가 지정되어 있지 않으면 `GITHUB_TOKEN` 환경변수에서 가져옵니다. path가 지정되어있지 않으면 `stdout`에 출력합니다.
## printDocument
json으로 표현된 Github의 Issues를 받아서 template에 따라 문서로 만듭니다.
```sh
deno run --allow-read --allow-write printDocument.ts --overall --path ./issues.json --outpath ssr.md
```
으로 실행하면 됩니다.
다음과 같은 인자를 가집니다:
- `overall`: overall을 출력
- `outpath`: 지정된 경로에 출력. 설정되지 않으면 `stdout`에 출력함.
- `path`: json 파일 위치. 지정되지 않으면 `stdin`에서 읽으려고 시도.
- `w`, `watch`: 파일에 변경이 있을 때 자동으로 업데이트.