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
```shell
$ pip install foliantcontrib.init
```
## Usage
Create project from the default “basic” template:
```shell
$ foliant init
Enter the project name: Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in /path/to/awesome-docs
```
Create project from a custom template:
```shell
$ foliant init --template /path/to/custom/template
Enter the project name: Awesome Customized Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Customized Docs" created in /path/to/awesome-customized-docs
```
You can provide the project name without user prompt:
```shell
$ foliant init --name Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in /path/to/awesome-docs
```
Another useful option is `--quiet`, which hides all output except for the path to the generated project:
```shell
$ foliant init --name Awesome Docs --quiet
/path/to/awesome-docs
```
To see all available options, run `foliant init --help`:
```shell
$ 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 with `title` value in `foliant.yml` replaced with the `{title}` placeholder. When the project is generated, the placeholder is replaced with the actual project name.
There is a built-in template called "basic." It's used by default if you don' specify the template.
> **Note**
>
> More placeholders and built-in templates may be added in future versions.
This CLI extension add `init` command that lets you create Foliant projects from templates.
## Installation
```shell
$ pip install foliantcontrib.init
```
## Usage
Create project from the default “basic” template:
```shell
$ foliant init
Enter the project name: Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in /path/to/awesome-docs
```
Create project from a custom template:
```shell
$ foliant init --template /path/to/custom/template
Enter the project name: Awesome Customized Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Customized Docs" created in /path/to/awesome-customized-docs
```
You can provide the project name without user prompt:
```shell
$ foliant init --name Awesome Docs
✔ Generating Foliant project
─────────────────────
Project "Awesome Docs" created in /path/to/awesome-docs
```
Another useful option is `--quiet`, which hides all output except for the path to the generated project:
```shell
$ foliant init --name Awesome Docs --quiet
/path/to/awesome-docs
```
To see all available options, run `foliant init --help`:
```shell
$ 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 with `title` value in `foliant.yml` replaced with the `{title}` placeholder. When the project is generated, the placeholder is replaced with the actual project name.
There is a built-in template called "basic." It's used by default if you don' specify the template.
> **Note**
>
> More placeholders and built-in templates may be added in future versions.
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
Close
Hashes for foliantcontrib.init-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca52f062086447ed2cb3f13c9254883d9d9b1435ad39a5e63d1d617ad2c50054 |
|
MD5 | b5233731a2885b4770273be406de2a03 |
|
BLAKE2b-256 | edc8075064611c6e821fe5b2e9acae037a60d66615e2be8c5151791e13759041 |
Close
Hashes for foliantcontrib.init-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd565dd364828497a9d822a870ce50e476578913daa8863ea35a88e30a31dd63 |
|
MD5 | a0df7f21ad799f4d31c86b056181fe9e |
|
BLAKE2b-256 | 1df75f07ac416e6c5520052c7657dd60f955bff7486cf7f4a030aec39a35a4be |