Create Foliant projects from templates.
Project description
Project Initializer for Foliant
This CLI extension add init
command that lets you create Foliant projects from templates.
Installation
$ pip install foliantcontrib.init
Usage
Create project from the default “base” template:
$ foliant init
Enter the project name: Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in awesome-docs
Create project from a custom template:
$ foliant init --template /path/to/custom/template
Enter the project name: Awesome Customized Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Customized Docs" created in awesome-customized-docs
You can provide the project name without user prompt:
$ foliant init --name Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in awesome-docs
Another useful option is --quiet
, which hides all output except for the path to the generated project:
$ foliant init --name Awesome Docs --quiet
awesome-docs
To see all available options, run foliant init --help
:
$ foliant init --help
usage: foliant init [-h] [-n NAME] [-t NAME or PATH] [-q]
Generate new Foliant project.
optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME Name of the Foliant project
-t NAME or PATH, --template NAME or PATH
Name of a built-in project template or path to custom one
-q, --quiet Hide all output accept for the result. Useful for piping.
Project Templates
A project template is a regular Foliant project but containing placeholders in files. When the project is generated, the placeholders are replaced with the values you provide. Currently, there are two placeholders: $title
and $slug
.
There is a built-in template called base
. It's used by default if no template is 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 Distribution
Built Distribution
Hashes for foliantcontrib.init-1.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4fc4aad768ec4bb6b2b1d179f228b1b8e6f03ae102c5c47cd3ca240ed712151 |
|
MD5 | 9680583f20a6b300a8ba634409765cee |
|
BLAKE2b-256 | 01b0ec06da4e880bccef42d75c612f6dc4f3a3131fcd9dedd2a1fc1e8c3f7887 |
Hashes for foliantcontrib.init-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98cf32ca56c80a824b8141cce49573ba2651023f6bbd2b21495f01a9b314a4e8 |
|
MD5 | d31aab52cdabbcda3d5d6780e571a79a |
|
BLAKE2b-256 | 70d2d3cead5bfa830b8336a7a78693366ede70f8e044c4c7cc828c708daa7bfd |