CLI for tracking and building documents, specifically Pelican static blogs
Project description
A simple command line utility for tracking and building documents, specifically Pelican blogs.
Uses cliff for the user interface, together with a local sqlite database object-mapped with peewee.
Tested with Python-2.7 and Python-3.4. Unlikely to work on windows.
Usage
Add a repository containing document source files:
$ kez add myblog git@github.com:averagehuman/maths.averagehuman.org.git
Build any documents defined therein:
$ kez build myblog
Track projects:
$ kez list +---------+------------------------+---------+--------------------------------------------------------+ | Project | Document | Type | Url | +---------+------------------------+---------+--------------------------------------------------------+ | myblog | maths.averagehuman.org | PELICAN | git@github.com:averagehuman/maths.averagehuman.org.git | +---------+------------------------+---------+--------------------------------------------------------+
After building, if there is a root index.html, open the document in a browser window:
$ kez serve myblog
Configuration
The source repository must have an ini-style config file called kez.cfg containing one or many sections, where each section defines a particular document. The __docroot__ value in each section should give the directory, relative to the config file, where the document sources are located (defaulting to the config file’s directory).
By convention, a double-underscored key is a build meta-option, while any other key is an option required or with meaning to the program which is called to produce the document (eg. Sphinx, Pelican,..).
Example kez.cfg
[maths.averagehuman.org] __doctype__ = pelican AUTHOR = Buzz Lightyear (MSc Phd) SITENAME = Beyond Infinity SITEURL = blog.beyondinfinity.net ARTICLE_URL = {date:%Y}/{date:%m}/{slug}/ ARTICLE_LANG_URL = {date:%Y}/{date:%m}/{lang}/{slug}/ PAGE_URL = {slug}/ PAGE_LANG_URL = {lang}/{slug}/ ARTICLE_SAVE_AS = {date:%Y}/{date:%m}/{slug}/index.html ARTICLE_LANG_SAVE_AS = {lang}/{date:%Y}/{date:%m}/{slug}/index.html PAGE_SAVE_AS = {slug}/index.html PAGE_LANG_SAVE_AS = {lang}/{slug}/index.html
Supported Document Types
Pelican
In the future, possibly Sphinx.
Required
The following libraries are required:
Tests
Run tests with Python 2 or Python 3:
$ make test $ make test PYVERSION=2 $ make test PYVERSION=3
Python 3 is the default if PYVERSION is not specified.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
File details
Details for the file kez-0.1.5.zip
.
File metadata
- Download URL: kez-0.1.5.zip
- Upload date:
- Size: 217.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 803dc2600fba1dd492c0bb6be193d814667ee0438e56b7b21f60b3541f02a232 |
|
MD5 | bd13bd8fe25f8c08279278ebd926c27c |
|
BLAKE2b-256 | ef90b479896b67042523fe23c6da9f87d2a6c05baf9cde0dc1a2f65d2515be84 |
File details
Details for the file kez-0.1.5.tar.gz
.
File metadata
- Download URL: kez-0.1.5.tar.gz
- Upload date:
- Size: 201.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae6c452d58ab9e4ae018d1925b440d54bdb58c8fac5108a5172354d09b923a6 |
|
MD5 | deffc32c380038b4f6ca773f1b8cd9d6 |
|
BLAKE2b-256 | a1678b1b86e8152fa792896916c0445e8249de5c488066c9f7c4f088c63958a0 |