Create Foliant projects from templates.
Project description
<raw>
# 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.
</raw>
# 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.
</raw>
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c7ceba3f54b13575ed75e82a23aaf92db74bee55194e073c37566ea6fdfa6d0 |
|
MD5 | cccff953e055d7545a562d4d0e4dc438 |
|
BLAKE2b-256 | dd2a5c2c84af269574c3c1fc833e25981b549730ce229afebf22e2836370b1c4 |
Close
Hashes for foliantcontrib.init-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dcfe00c8716810b837b10ce2105c13ae194a702a908ecb662df0f145de0bb8d |
|
MD5 | d3f07d0684fe5ac80ad6239d81ea2a3e |
|
BLAKE2b-256 | 2e2987b45bcef831c5f7a6f37187ad37530878d93658fdb08af083a6d62bcc46 |