6. Usage¶
6.1. Create User/Organization Cards¶
- Generate a card data file
Execute
ghscard gen <user-name or organization-name>
.$ ghscard gen thombashi -o data [INFO] ghscard gen: written user data to 'data/thombashi.json'
- Add HTML tags to a HTML file
<div class='ghscard' src='data/thombashi.json'></div> <script src="//cdn.jsdelivr.net/gh/thombashi/ghscard@master/dist/ghscard.min.js"></script>
- Result
6.2. Create Repository Cards¶
- Generate a card data file
Execute
ghscard gen <user name>/<repository name>
.$ ghscard gen Microsoft/TypeScript -o data [INFO] ghscard gen: written repository data to 'data/Microsoft_TypeScript.json'
- Add HTML tags to a HTML file
<div class="ghscard" src="data/Microsoft_TypeScript.json"></div> <script src="//cdn.jsdelivr.net/gh/thombashi/ghscard@master/dist/ghscard.min.js"></script>
- Result
6.3. Card Configurations¶
6.3.1. card-style
Attribute¶
Card size and display format change according to card-style
attribute.
card-style
attribute takes one of the following values:
medium
(default)small
tiny
6.3.2. chart-display
Attribute¶
Charts on repository cards can be changed visible or hidden by chart-display
attribute value.
Value |
Meaning |
---|---|
|
Display charts on cards. |
|
NOT display charts on cards. |
Default value differed by card-style
attribute:
|
Default value |
---|---|
|
|
|
|
|
|
6.3.3. topic-display
Attribute¶
Topic labels repository cards can be changed visible or hidden by topic-display
attribute value.
Defaults to block
.
Value |
Meaning |
---|---|
|
Display topic labels on cards. |
|
NOT display topic labels on cards. |
7. Advanced Usage¶
7.1. GitHub API Token Setting¶
You can set GitHub API token via ghscard configure
command to workaround
GitHub API rate limit.
You might exceed GitHub API rate limit when creating card data by ghscard gen
command.
Git Hub API token can create at https://github.com/settings/tokens/new
$ ghscard configure
GitHub API Personal Access Token: <token>
Output Directory Path [.]: