processes a Markdown file by including the contents of other Markdown files
Project description
markdown_include
This is a simple Python script that processes Markdown files by including the contents of other Markdown files.
The script takes in a Markdown file as input, looks for lines that are similar to <!-- include (file.md) --> (Parentheses are necessary to identify the path) and treats them as include directives. For each include directive, the script reads the specified file and writes its contents to the output file. The result is a new Markdown file that includes the contents of all included files.
Installation
pip install md-incl
The md_incl command will be added to the $PATH after installation.
It could be used in some building system like Makefile, which allows for the automatic assembly of large and complex reports and papers.
Usage
-
put filenames of directives in the format of
<!-- include (file.md) -->in your main markdown file -
simply pass the input file name and the output file name as command-line arguments. The script will process the input file, generate the output file, and exit. Here's an example of how to run the script:
md_incl input_file.md output_file.md
Requirements
>Python 3.8- A text editor to modify the input and included files
Github
https://github.com/hxtmike/markdown_include
Contributions
If you'd like to contribute to the development of this script, feel free to fork the repository and submit a pull request. I'll be happy to review your changes and merge them into the main codebase.
License
This script is licensed under the MIT License. See the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md_incl-0.0.2.tar.gz.
File metadata
- Download URL: md_incl-0.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e5ca40a3f48e5a7a468cfe3ca8f71987a8f490bd113dc1b4e81bc98478ad98d
|
|
| MD5 |
5cb37cd6976e93c5e06f5b09ffb055b2
|
|
| BLAKE2b-256 |
bd2eb80fb999f1df07332f211686c6859936cff1eae16831eb420759610279a6
|
File details
Details for the file md_incl-0.0.2-py3-none-any.whl.
File metadata
- Download URL: md_incl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05b99fda4257ea731e84ef91df091fffd5ed84a616e6f65d1ea922f1d5f6908
|
|
| MD5 |
528d893ad51e9e90180be5743d7f04fe
|
|
| BLAKE2b-256 |
e60cb9d4330984215536e8a41b104ca9df7b01b6d3c431b1e654d0d80a3e0a60
|