Preprocessor for Foliant doc maker that flattens a nested source tree into a single file. Required for Pandoc backend.
Project description
<raw>
# Project Flattener for Foliant
This preprocessor converts a Foliant project source directory into a single Markdown file containing all the sources, preserving order and inheritance.
This preprocessor is used by backends that require a single Markdown file as input instead of a directory. The Pandoc backend is one such example.
## Installation
```shell
$ pip install foliantcontrib.flatten
```
## Config
This preprocessor is required by Pandoc backend, so if you use it, you don't need to install Flatten or enable it in the project config manually.
However, it's still a regular preprocessor, and you can run it manually by listing it in `preprocessors`:
```yaml
preprocessors:
- flatten
```
The preprocessor has only one option—`flat_src_file_name`. It's the name of the flattened file that is created in the tmp directory:
```yaml
preprocessors:
- flatten:
flat_src_file_name: flattened.md
```
Default value is `__all__.md`.
> **Note**
>
> Flatten preprocessor uses includes, so when you install Pandoc backend, Includes preprocessor will also be installed, along with Flatten.
</raw>
# Project Flattener for Foliant
This preprocessor converts a Foliant project source directory into a single Markdown file containing all the sources, preserving order and inheritance.
This preprocessor is used by backends that require a single Markdown file as input instead of a directory. The Pandoc backend is one such example.
## Installation
```shell
$ pip install foliantcontrib.flatten
```
## Config
This preprocessor is required by Pandoc backend, so if you use it, you don't need to install Flatten or enable it in the project config manually.
However, it's still a regular preprocessor, and you can run it manually by listing it in `preprocessors`:
```yaml
preprocessors:
- flatten
```
The preprocessor has only one option—`flat_src_file_name`. It's the name of the flattened file that is created in the tmp directory:
```yaml
preprocessors:
- flatten:
flat_src_file_name: flattened.md
```
Default value is `__all__.md`.
> **Note**
>
> Flatten preprocessor uses includes, so when you install Pandoc backend, Includes preprocessor will also be installed, along with Flatten.
</raw>
Project details
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.flatten-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4be7b66c2a3a97e5de56f2e9ef2d7985ef03f5314fbbeaeab0160039111426a |
|
MD5 | 90c82ae6db563c3358f3eb950307298d |
|
BLAKE2b-256 | cac128421ef70a76a2ea355f8d3780d49d6477035a5e8c828244e84cbce7e18e |
Close
Hashes for foliantcontrib.flatten-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c8d8e0c1d7fd2692525110b1cd0f3736960c18fece44178322abf3e8e8e0b97 |
|
MD5 | 2a2ab26c143620f9039b100107bf0421 |
|
BLAKE2b-256 | 35e3e9af264c74519a28c06b756522bf44fc19ff3beaf08ea4c2def9cada3ad6 |