pandoc-inplace-include 0.0.2

Creator: railscoder56

Last updated:

Add to Cart

Description:

pandocinplaceinclude 0.0.2

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.

This part will be replaced after running `pandoc`

Other things below won't get replaced.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.