{"id":16505087,"url":"https://github.com/aahnik/minsert","last_synced_at":"2025-10-28T00:32:27.161Z","repository":{"id":57441890,"uuid":"369433255","full_name":"aahnik/minsert","owner":"aahnik","description":"Insert dynamic content in markdown without using a separate template file.","archived":false,"fork":false,"pushed_at":"2021-06-07T13:40:16.000Z","size":25,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T09:51:19.016Z","etag":null,"topics":["aahnik","aahnik-daw","jinja","markdown","python","python3","template-engine"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/minsert","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aahnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-05-21T06:17:16.000Z","updated_at":"2023-10-01T04:41:20.000Z","dependencies_parsed_at":"2022-09-26T17:20:58.521Z","dependency_job_id":null,"html_url":"https://github.com/aahnik/minsert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aahnik%2Fminsert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aahnik%2Fminsert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aahnik%2Fminsert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aahnik%2Fminsert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aahnik","download_url":"https://codeload.github.com/aahnik/minsert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238578828,"owners_count":19495452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aahnik","aahnik-daw","jinja","markdown","python","python3","template-engine"],"created_at":"2024-10-11T15:09:17.062Z","updated_at":"2025-10-28T00:32:21.845Z","avatar_url":"https://github.com/aahnik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minsert\n\nInsert dynamic content in markdown, without using a separate template file.\n\n[![Tests](https://github.com/aahnik/minsert/actions/workflows/test.yml/badge.svg)](https://github.com/aahnik/minsert/actions/workflows/test.yml)\n[![Code Quality](https://github.com/aahnik/minsert/actions/workflows/quality.yml/badge.svg)](https://github.com/aahnik/minsert/actions/workflows/quality.yml)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/minsert)\n[![codecov](https://codecov.io/gh/aahnik/minsert/branch/main/graph/badge.svg?token=Q1XROUHDRM)](https://codecov.io/gh/aahnik/minsert)\n\n## Motivation\n\nInspired by jinja.\n\nYour actual markdown file is the template file itself.\nJust make a block of content just by using comments, which indicate the start and\nend of the block.\n\nThis is really great for making a dynamic GitHub README.\nNo hassle of creating a separate template file.\nUsing a simple python script and GitHub Actions,\nyou can automatically update the contents of the markdown file.\n\n## Installation\n\n```shell\npip install minsert\n```\n\n## Syntax\n\nUsing minsert is easy. Just write normal markdown.\nThe start and end of named blocks are marked by special comments.\n\nStart a block named `my_block`\n\n```markdown\n\u003c!-- start my_block --\u003e\n```\n\nEnd a block\n\n```markdown\n\u003c!-- end --\u003e\n```\n\nYou must end the current block before starting a new one.\n\n## Usage\n\nFor example you have a markdown file `test.md` like this.\n\n```markdown\nhello\n\u003c!-- start thing1 --\u003e\n\u003c!-- end --\u003e\nwhat is happening\n\u003c!-- start thing2 --\u003e\n\u003c!-- end --\u003e\nBye!\n```\n\nCreate a simple script `update.py` for updating the markdown file.\n\n```python\n# update.py\n\nfrom minsert import MarkdownFile\n\nfile = MarkdownFile(\"test.md\")\nthings = {\n    \"thing1\": \"hi hello\",\n    \"thing2\": \"ping pong\",\n}\nfile.insert(things)\n\n```\n\nThe markdown file gets updated with the value of the blocks.\n\n```markdown\nhello\n\u003c!-- start thing1 --\u003e\nhi hello\n\u003c!-- end --\u003e\nwhat is happening\n\u003c!-- start thing2 --\u003e\nping pong\n\u003c!-- end --\u003e\nBye!\n```\n\nNow try running `update.py` after changing the values in the `things` dictionary.\nYou will see that minsert will neatly update the `test.md` without fail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faahnik%2Fminsert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faahnik%2Fminsert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faahnik%2Fminsert/lists"}