Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devopsmakers/gh-cards
Create HTML format cards from Github Issues for printing
https://github.com/devopsmakers/gh-cards
agile agile-board cli erb gh-cards github github-issues github-issues-export html-format-cards kanban-board scrum scrum-board
Last synced: 3 months ago
JSON representation
Create HTML format cards from Github Issues for printing
- Host: GitHub
- URL: https://github.com/devopsmakers/gh-cards
- Owner: devopsmakers
- License: mit
- Created: 2019-11-11T10:36:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T15:06:47.000Z (about 5 years ago)
- Last Synced: 2024-08-30T22:40:04.194Z (5 months ago)
- Topics: agile, agile-board, cli, erb, gh-cards, github, github-issues, github-issues-export, html-format-cards, kanban-board, scrum, scrum-board
- Language: Ruby
- Homepage:
- Size: 45.9 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# gh-cards
Create HTML format cards from Github Issues for printing
![Default Cards for Printing](https://user-images.githubusercontent.com/57101177/68775712-e0e74c00-0626-11ea-8087-51bb9e7cdfeb.png)
## Installation
```
gem install gh-cards
```### Pre-requisites
1. Create a Github Personal Access Token with **repo** access - https://github.com/settings/tokens/new
2. Configure your `~/.netrc` file with:
```
machine api.github.com login <> password <>
```
and set it's permissions: `chmod 0600 ~/.netrc`## Usage
The `gh-cards` cli tool is designed to be run inside a repo. It will create a
directory `.gh-cards` containing a file named `last` which stores the last card
and a file `cards.html` which are the cards to be printed.At least the `.gh-cards/last` file should be committed to your repo so that anyone
can print cards as necessary.To generate cards from all open issues, `rm .gh-cards/last`.
```
Commands:
gh-cards generate # Generate your Github issue cards HTML file
gh-cards help [COMMAND] # Describe available commands or one specific commandOptions:
-t, [--template=TEMPLATE] # Template name or path to erb template
# Default: default
-d, [--directory=DIRECTORY] # The directory to use for output
# Default: .gh-cards
-r, [--repo=REPO] # The org/repo you want to generate cards for (autodetected when inside a repo)
```To generate cards:
```
cd my-repo
gh-cards generate
```## Card Templates
Cards are generated using ERB Templates. The default template is in this repo
at: `templates/default.html.erb` which is designed to use minimal ink. If templates
are added in the future (Hint: open PRs) you'll be able to reference them with
the `-t` or `--template` option.You can also create your own templates, for example if you create a template at:
`.gh-cards/my-template.html.erb` you can generate cards using your template:
```
gh-cards generate --template=.gh-cards/my-template.html.erb
```The cards passed to the ERB are an array of objects:
```
[
{
:title=>"Test Issue",
:number=>1,
:labels=>[
{
:name=>"bug",
:color=>"d73a4a"
},
{
:name=>"good first issue",
:color=>"7057ff"
},
{
:name=>"help wanted",
:color=>"008672"
}
],
:milestone=>"Test Milestone",
:created_by=>"Tim Birkett",
:created_at=>2019-11-07 15:07:31 UTC
},
...
...
...
]
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/devopsmakers/gh-cards. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Gh::Cards project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/devopsmakers/gh-cards/blob/master/CODE_OF_CONDUCT.md).