A static site generator for cmpalgorithms project
Project description
cagen
About
cagen is a static site generator intented for cmpalgorithms project. So it's very rare you are interested in that. Although you can use it as any other static site generator.
License
The software is distributed under GPL 2-only license.
How it runs
It assumes your documents are written with markdown syntax. It is capable of convert those documents to any other format, using pandoc (specifically pypandoc wrapper) and Mako templating system.
The reason to use "external" templating system instead of built-in pandoc template system is because pandoc templates are not capable of make conditions with values (something like $if(author=='me') Print full name here $endif$
).
The program just converts markdown files to HTML ones by default in the same directory. Unlike many other static site generators, there is no predefined structure by default: no assets
directory neither site
directory. By default, all generated files are in the same directory than the source files. Obviously, you can modify it if you want.
We provide:
- a library
- a command line program (called
cagen
) for convert documents - a script called
cagen-make
to generate a Makefile to convert automatically all markdown files to HTML ones.
The software is implemented in python because it's easy to program (I'm very language-neutral). If you want some really fast static site generator, be free to fork the project and program with any compiled language.
Installation
You can install via pip:
pip install cagen
If you are running ArchLinux or any Arch derivative ditribution, you can use this PKGBUILD to make a pacman package.
Usage
Basic use is:
cagen sourcefile.md generatedfile.html template.tmpl
where
sourcefile.md
is Markdown filegeneratedfile.html
is the HTML5 filetemplate.tmpl
is Mako template file
See cagen --help
for more options.
This tool is some kind of low-level tool. If you want some more higher-level one to automatically converts all markdown files to corresponding HTML5 files, we provide the cagen-make
script (see above). The steps are:
cagen-make --init
It creates Makefile
make
It automatically convert all markdown files to HTML5 ones using templates/schema.tmpl
Mako template. You can modify it editing Makefile
.
Other resources
- You can see the issue tracker and contribute if you want suggesting new features or reporting a bug.
- The API documentation is available.
- The Mailing List to make a question, suggest something you want, send patches, etc. As user and developer.
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 Distribution
Built Distribution
File details
Details for the file cagen-0.1.0.post3.tar.gz
.
File metadata
- Download URL: cagen-0.1.0.post3.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 857b196d2fb921a47c7dbe86758a765e79662341c2b997392811af0a00564d2a |
|
MD5 | 84281cb141308418e5c0c6b8bc2e439a |
|
BLAKE2b-256 | 612551a5d89cf09b457af01cc2fab22a46ec134485e208f6f0eb07912a38fc84 |
File details
Details for the file cagen-0.1.0.post3-py3-none-any.whl
.
File metadata
- Download URL: cagen-0.1.0.post3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82f8aa055a33e5d8b44acbe831637162760d427fa22ab48373d11bc21125fdef |
|
MD5 | 9bc54ef1e36f53011699e0dc1f988ee7 |
|
BLAKE2b-256 | ad71d3afe4d5f5f4e85a249ec0f704b1508f4a19cbe91f07f6f9f4058b5295bc |