Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 2.69 KB

File metadata and controls

78 lines (54 loc) · 2.69 KB

{% macro section(title, level='=') -%} {{ title }} {% for _ in title %}{{ level }}{% endfor %} {%- endmacro -%} {{ section(cookiecutter.project_name) }}

Table of Contents

This is a project for a slide deck, which uses reStructuredText markup to create an impress.js presentation via the Python3 tool Hovercraft!.

To create a working directory for this project, call these commands:

git clone "{{ cookiecutter.github_url }}.git"
cd "{{ cookiecutter.repo_name }}"
. .env --yes
invoke view

Python3 and pyvenv must be available for this to work.

You can call the following tasks via invoke.

Task Description
clean Perform house-keeping.
html Build HTML tree.
pdf Build PDF slide show.
thumbs Create slide show thumbnails.
upload Upload a ZIP of the slide deck (to a WebDAV URL, e.g. Artifactory).
view Start live-reload watchdog.

Note that invoke view starts a watchdog process that will react to any changes in *.rst files by rendering and reloading the open browser tab (live reload). Use invoke view --kill to stop a running watchdog.

The pdf task needs deck2pdf installed, and thumbs additionally requires ImageMagick (usually available via your operating system's packages).

When using Artifactory to publish your rendered slides, note that appending !/index.html to the slide deck archive's URL makes the deck directly available in any browser. To provide the upload URL, put it into your shell environment like this:

export INVOKE_RITUALS_DOCS_UPLOAD_TARGETS_WEBDAV_URL=\
"https://repo.example.com/artifactory/wwwdata-local/slides/{name}/{version}/{name}-{version}.zip"

The version will be latest by default, but you can provide an explicit one by passing the --release option to the upload task.

Usually you also need to provide upload credentials, put them into the file ~/.netrc similar to this:

machine repo.example.com
    user «your username»
    password «your personal API key»

Call chmod 600 ~/.netrc afterwards, to protect your sensitive data.