Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metamagic-games/handbooker
Turn markdown into a player's handbook
https://github.com/metamagic-games/handbooker
generator handbook html markdown pdf
Last synced: about 2 months ago
JSON representation
Turn markdown into a player's handbook
- Host: GitHub
- URL: https://github.com/metamagic-games/handbooker
- Owner: metamagic-games
- License: mit
- Created: 2018-06-19T09:51:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-24T14:46:51.000Z (over 1 year ago)
- Last Synced: 2024-04-24T13:45:05.448Z (9 months ago)
- Topics: generator, handbook, html, markdown, pdf
- Language: SCSS
- Homepage: https://www.npmjs.com/package/handbooker
- Size: 2.04 MB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# handbooker
[![npm version](https://badge.fury.io/js/handbooker.svg)](https://badge.fury.io/js/handbooker)
Turn markdown into a Player's Handbook-style document.
Based on [Homebrewery](https://github.com/stolksdorf/homebrewery)'s stylesheet.
---
## Usage
For a working example, take a look at [handbooker-sample-project](https://github.com/paragon-games/handbooker-sample-project)
```
const { handbooker, } = require("handbooker");
const target = "./rulebook.md";
const destination = "./rulebook.pdf";const options = {
"debug": true,
"style": "dnd",
"printOptions": {
displayHeaderFooter: false,
},
};handbooker( target, destination, options);
```## Combining multiple markdown files
To merge many different Markdown files, simply replace:
```
const target = "./rulebook.md";
```With:
```
const target = [ "./rulebook.md", "./rulebook2.md", ];
```---
## Styles
This package can support creation of documents in the style of several different games.
### Included styles
The default style is the 5e D&D Player's Handbook. Feel free to add other stylesheets to this package.
To select from an included style sheet:
```
const options = {
"style": "dnd",
};
```### Custom styles
To use your own:
```
const options = {
"customStyles": "your/custom/stylesheet.css",
};
```## Why not just use [Homebrewery](http://homebrewery.naturalcrit.com/)?
Homebrewery is a fantastic tool, and this project wouldn't be possible without their fantastic stylesheet. However, Homebrewery doesn't make collaboration and tracking changes to your document easy. If you're just working alone, and you're not used to working with git, npm, or Markdown, this might not be the tool for you.
## Contributing
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome!