Skip to main content

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 a number of options with the following default values:

preprocessors:
    - flatten:
        flat_src_file_name: __all__.md
        keep_sources: false

flat_src_file_name : Name of the flattened file that is created in the temporary working directory.

keep_sources : Flag that tells the preprocessor to keep Markdown sources in the temporary working directory after flattening. If set to false, all Markdown files excepting the flattened will be deleted from the temporary working directory.

Note

Flatten preprocessor uses Includes, so when you install Pandoc backend, Includes preprocessor will also be installed, along with Flatten.

Metadata

Release files for foliantcontrib.flatten 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foliantcontrib.flatten 1.0.7
File Size Uploaded
foliantcontrib.flatten-1.0.7.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for foliantcontrib.flatten 1.0.7
File Interpreter ABI Platform
foliantcontrib.flatten-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / foliantcontrib.flatten-1.0.7.tar.gz

Download URL foliantcontrib.flatten-1.0.7.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
35b50c0e0b9b9db61dd462022bb95618bd1f1a7ffd802446370994ed1851857a
BLAKE2b-256 checksum
How to use checksums
ddb30750286751eccc0352b80fdcc3ee3cb708661cfc8e625fc48ec888c743f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

Release files / foliantcontrib.flatten-1.0.7-py3-none-any.whl

Download URL foliantcontrib.flatten-1.0.7-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e056b66773acd86238baa83f75b73c20f212741d4ef13b46156f8906e3cb710
BLAKE2b-256 checksum
How to use checksums
7032d82d0a03eec73b0a9d799201421e636018775cd0899a79d59cc77ac53f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

1 release file

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page