Skip to main content

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 (filename) --> (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.

Usage

To use the script, 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

This script will be added as a command to the $PATH for direct invocation

Features

  • Processes Markdown files by including the contents of other Markdown files
  • Supports include directives in the format of <!-- include (filename) --> (Parentheses are necessary to identify the path)
  • Outputs a new Markdown file that includes the contents of the included files
  • Takes in input and output file names as command-line arguments

Requirements

  • >Python 3.5
  • A text editor to modify the input and included files

Installation

To use this script, simply download the file and save it to your computer. You can use pip to install the command

pip3 install .

It could be used in some building system like Makefile, which allows for the automatic assembly of large and complex reports and papers.

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

md_incl-0.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md_incl-0.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file md_incl-0.0.0.tar.gz.

File metadata

  • Download URL: md_incl-0.0.0.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

Hashes for md_incl-0.0.0.tar.gz
Algorithm Hash digest
SHA256 04e92487b500b70b70c42bf777c722ed4b490e2df81321130589b59bd3244580
MD5 61f4bc9c392182a342253d5b35c1de5c
BLAKE2b-256 f0c4daf49a5cde7e8da5a073bcab466792a73cd12944d92edf52424e2de4f8e4

See more details on using hashes here.

File details

Details for the file md_incl-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: md_incl-0.0.0-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

Hashes for md_incl-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61993ea1d2134479e9dd328fe1c8c15211b97c0251a9a310125c866097cf533c
MD5 6d53547c5a15b82eb32c99c323b5055e
BLAKE2b-256 7a9e50bf50091ca06b40d1ecaf87e49af18471cd21b1abacae09b52651091a8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page