Preprocessor for Foliant doc maker that flattens a nested source tree into a single file. Required for Pandoc backend.
Project description
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
$ 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
:
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:
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.
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
Hashes for foliantcontrib.flatten-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8767697445fa437beb7d76cc8b1b0201dc6ad5fe1a01138fc3d7a3024c55fbe6 |
|
MD5 | 12b1f00266cda369a9c5488645ec9c12 |
|
BLAKE2b-256 | 3efcdebfb5585376a4cd8c498ac7677da38867700ab7c0c1e4d76ce71fed3071 |
Hashes for foliantcontrib.flatten-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86ab6287c8854aed475a017130c9550261ef2fc6a486970d921e8b590b51434d |
|
MD5 | f8158fe8eda641cf7c81547fd2342cc6 |
|
BLAKE2b-256 | 8b13f51bedc72649fad59c5d19151e750049ada8b9a70f2da7d491218d209e4a |