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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84e2bffe9ae04c4cbd45a0b107823af98c48f1b66aeda010bf5d1008d423f0a4 |
|
MD5 | 4a3d0918d87118e6552f606717edeba1 |
|
BLAKE2b-256 | 117d2827aa37dbceb21a1696922b41f1a532a305a12bc5c2299e57a37028be0d |
Hashes for foliantcontrib.init-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 202ed427f40f5030cdb26ca0397643a0487bdcb9fda54be0c2e8e337aa99d18b |
|
MD5 | 8047e8f736c7cabd0718e81bd27eb416 |
|
BLAKE2b-256 | d91079456dcc998e8647c64b8cc20ed6f3aea1981da4af4c845da52ebae18afa |