The Pandoc Inplace Include Filter
This is a repo that provides a pandoc filter to include files in a markdown file.
This filter does not replace the !include or {include} directives directly
in the markdown file, but instead uses a <div> tag with a class="include" attribute.
This allows to keep the import relations of the source files, while still being able to
include them in the same markdown file, and invariant of running pandoc commands on the
same file if the sources are not changed.
Installation
pip install pandoc-inplace-include
Inflate me with
pandoc README.md -o README.md --filter pandoc-inplace-include
Test me with
pandoc README.md -o README.1.md --filter include_filter.py
pandoc README.1.md -o README.2.md --filter include_filter.py
diff README.1.md README.2.md
Supported syntax
<div class="include" file="some.other.md.file.md" start="starting_line_num" end="ending_line_num">
All the contents within such <div> will be replaced by the contents of the file "some.other.md.file.md"
</div>
To be added
- Support for recursive includes
Now try to include some files
The <div> stuff should not be rendered, but only kept in the source file.
Other things below won't get replaced.
Metadata
Release files for pandoc-inplace-include 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pandoc_inplace_include-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pandoc_inplace_include-0.0.2-py3-none-any.whl
| Download URL | pandoc_inplace_include-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91b3fb41c2dfeb37ee43447dbd83571d1d4a83f33fc57ea1ad264b99e7977908
|
|
BLAKE2b-256 checksum How to use checksums |
e0e8042732b7de08b6d33ef5d4a772a08d03e00418283cd41cb826b809a53640
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for pandoc-inplace-include 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.