Skip to main content

Insert dynamic content in markdown, without using a seperate template file

Project description

minsert

Insert dynamic content in markdown, without using a separate template file.

Motivation

Inspired by jinja. 😂

Your actual markdown file is the template file itself. Just make a block of content just by using comments, which indicate the start and end of the block.

This is really great for GitHub repo README. No hassle of creating a separate template file.

Installation

pip install minsert

Syntax

Start a block : <!-- ➡️ thing1 ⬅️ -->

End of a block: <!-- 🛑 -->

Emoji Tip:

  • use :emojisense: in VS Code
  • ➡️ :arrow_right:
  • ⬅️ :arrow_left:
  • 🛑 :stop_sign:

Usage

from minsert import MarkdownFile
file = MarkdownFile('test.md')
things = {'thing1': 'hi hello',
          'thing2': 'ping pong',
          }
file.insert(things)

Example

Take a long hard look at this gif!

minsert

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

minsert-0.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

minsert-0.0.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

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