Export GutHub user repos list to a markdown file.
# globally
❯ npm i repos2md --global
# or in project
❯ npm i repos2md --save❯ repos2md --help
Export repos list to a markdown file.
repos2md v2.0.1
Usage
$ repos2md <username>
$ repos2md <username> --save-to <path> --exclude-repos-count
$ repos2md --token <token>
Options
--starred optional (default is user repos) If provided, user's starred repos will be fetched
--save-to optional (defaults to project root) Absolute path to the target file (.md document) to write to
--token optional (includes private repos) Your GitHub token (Will return only authenticated user's public & private repos)
--exclude-repos-count optional Exclude repos count from heading in target file
Examples
$ repos2md octocat
$ repos2md octocat --starred --save-to /Users/frenchbread/Desktop --exclude-repos-count
$ repos2md --token <your_gh_token>
$ repos2md --token <your_gh_token> --starredconst repos2md from 'repos2md'
repos2md('github')
.then(saved_to => console.log(`Repos saved to "${saved_to}"`))Returns <path> to where file has been saved.
type: object
-
starred
type:
booleanFetch user's starred repos.
-
save_to
type:
stringCustom path to where write file to. Can be both relative & absolute.
-
token
type:
stringGitHub token, used to include private repos and extend rate-limits.
-
exclude_repos_count
type:
booleanExclude repos count from target doc.
For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.
- Change input username/path approach
- Write & add tests
- Handle paths containing
~
Contributions are welcome!
- Damir Mustafin @frenchbread