https://github.com/rrwen/cookiecutter-reveal
Personal template for reveal.js presentations with Python cookiecutter
https://github.com/rrwen/cookiecutter-reveal
cli command cookiecutter decktape html interface line md node nodejs npm pdf personal presentation reveal reveal-md revealjs slide template
Last synced: about 2 months ago
JSON representation
Personal template for reveal.js presentations with Python cookiecutter
- Host: GitHub
- URL: https://github.com/rrwen/cookiecutter-reveal
- Owner: rrwen
- License: mit
- Created: 2017-11-22T02:49:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-27T09:26:33.000Z (about 3 years ago)
- Last Synced: 2025-02-08T21:11:19.718Z (3 months ago)
- Topics: cli, command, cookiecutter, decktape, html, interface, line, md, node, nodejs, npm, pdf, personal, presentation, reveal, reveal-md, revealjs, slide, template
- Language: HTML
- Size: 56.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cookiecutter-reveal
Richard Wen
[email protected]Personal template for reveal.js presentations with Python cookiecutter.
[](https://travis-ci.org/rrwen/cookiecutter-reveal)
[](https://github.com/rrwen/cookiecutter-reveal/blob/master/LICENSE)## Install
1. Install [Python](https://www.python.org/downloads/)
2. Install [cookiecutter](https://pypi.python.org/pypi/cookiecutter) via `pip````
pip install cookiecutter
```## Usage
1. Create a template using [cookiecutter](https://pypi.python.org/pypi/cookiecutter)
2. Change the directory to the folder with the same name as the `template_name` input
3. Install dependencies with [npm](https://www.npmjs.com/)
4. Render HTML slides in the `docs` folder
5. Render PDF slides in the `slides` folder```
cookiecutter gh:rrwen/cookiecutter-reveal
cd
npm install
npm run html
npm run pdf
```See [Implementation](#implementation) for more details.
## Developer Notes
### Create Github Repository
1. Ensure [git](https://git-scm.com/) is installed
2. Change directory to the generated folder `cd `
3. Initialize the repository
4. Add the generated files to commit
5. Create an empty [Github repository](https://help.github.com/articles/create-a-repo/) with the same name as `template_name`
6. Pull any changes if the Github repository is not empty
7. Push the commit from `4.` to your created Github repository```
git init
git add .
git commit -a -m "Initial commit"
git remote add origin https://github.com//.git
git pull origin master --allow-unrelated-histories
git push -u origin master
```### Implementation
This code creates folders and files for [cookiecutter](https://pypi.python.org/pypi/cookiecutter) templates.
* The main file is [cookiecutter.json](https://github.com/rrwen/cookiecutter-npm/blob/master/cookiecutter.json) which defines the inputs for the command line interface
* The inputs then replace any values surrounded with `{{}}` inside the folder [{{cookiecutter.template_name}}](https://github.com/rrwen/cookiecutter-reveal/tree/master/%7B%7Bcookiecutter.template_name%7D%7D)```
cookiecutter <-- template tool
|
cookiecutter.json <-- template inputs
|
{{cookiecutter.template_name}} <-- generated template
```The following files will be created inside a folder with the same name as the `template_name` input:
File | Description
--- | ---
**docs/edit/logo.png** | Logo image to show on slides
**docs/edit/style.css** | [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) file for styling the slides
**slides/.md** | [Markdown](https://daringfireball.net/projects/markdown/) file containing the slide contents
**template.html** | A [reveal-md](https://www.npmjs.com/package/reveal-md) custom template file for generating slides
**.gitignore** | A Node [.gitignore](https://git-scm.com/docs/gitignore) automatically generated from github
**.npmignore** | A file to specify ignoring `docs/*`
**LICENSE** | MIT [license file](https://help.github.com/articles/licensing-a-repository/) automatically created from github
**.travis.yml** | A [.travis.yml](https://docs.travis-ci.com/user/customizing-the-build/) file for automatic builds and tests
**package.json** | The [npm package.json](https://docs.npmjs.com/files/package.json) specifications with [reveal-md](https://www.npmjs.com/package/reveal-md) and [decktape](https://www.npmjs.com/package/decktape) dependencies
**README.md** | a readme [Markdown](https://daringfireball.net/projects/markdown/) file with header section