PyMarkEditor


NamePyMarkEditor JSON
Version 1.0 PyPI version JSON
download
home_pagehttps://github.com/Palibrix/PyMarkEditor
SummaryPython markdown preprocessor
upload_time2024-08-04 10:52:43
maintainerNone
docs_urlNone
authorPalibrix
requires_python>=3.6
license'MIT License'
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyMarkEditor

[![Me][user-badge]][user-url]

----

[![Python][python-badge]][python-url]

[![PyPI download month][pypi-badge]][pypi-url]

[![GitHub issues][git-issues]][git-issues-url]
[![GitHub branches][git-branches]][git-url]
[![GitHub Maintenance][git-maintenance]][git-activity-url]

----
## ๐Ÿ“ Table of Contents
1. [๐Ÿ” What is this repository about?](#-what-is-this-repository-about)
2. [โ“ Why?](#-why)
3. [๐Ÿ’ป Installing](#-installing)
4. [๐Ÿ“‘ Examples](#-examples)
   1. [Variables](#how-to-include-variables)
   2. [Files](#how-to-include-files)
____


## ๐Ÿ” What is this repository about?
PyMarkEditor (PME) is a Python package that enhances Markdown syntax by introducing new features. It does not use any external functionality nor add new filetypes, only creating new possibilities on existing .md. Interestingly, you can even use it with any .txt file or any other file type.

Hereโ€™s how PME works: Given a template file, PME identifies default patterns and transforms the content into a new file. Itโ€™s a straightforward tool that adds versatility to your Markdown documents.

## ๐Ÿค” Why?
Markdown boasts an elegant syntax, but its reusability leaves much to be desired. Picture this scenario: Youโ€™re writing numerous similar text blocks (like User Stories), only to discover that a crucial letter โ€œaโ€ is missing across all your lines. Heartbreaking, isnโ€™t it?

This library exists mainly to give answer to those questions:
1. How to add variables to markdown?
    > PME allows you to add variables into markdown with ease. Define placeholders, and PME dynamically replaces them, ensuring consistency without manual edits.
2. How to include different files in one markdown file?
    > PME can include content of any text file into your Markdown, ensuring that it will be easy to maintain with time. Forget about endless scrolling 


## ๐Ÿ’ Installing

Installation is simple:
```
pip install PyMarkEditor
```

## ๐Ÿ“‘ Examples
Pre-requirements: one template file (you can name it whatever you like; for now, letโ€™s call it `readme_template.md`).

To use PME, follow this syntax:
```
pme <input_file> <output_file>
```

For instance, if you have a file named `readme_template.md` and want to create `README.md`, execute the following command:
```
pme readme_template.md README.md
```

### How to include variables?

You must create a block of variables at the beginning of your document using four hyphens (`----`). Each variable starts on a new line

```markdown
----
variable_name: any text with `any` format of any length
second_variable: any text with `any` format of any length
----
```

To use these variables throughout your document, enclose them in double curly braces (`{{variable_name}}`). Remember to add spaces before and after the variable:

```markdown
You can put {{variable_name}} anywhere
```

### How to include files?

To seamlessly include files within your Markdown document, follow this syntax:

```markdown
include::path/to/file/file_to_include.md
```
You can find more examples [here](example)



[user-badge]: https://img.shields.io/badge/Palibrix-DD9623?style=plastic
[user-url]: https://github.com/Palibrix


[python-badge]: http://ForTheBadge.com/images/badges/made-with-python.svg
[python-url]: https://www.python.org/

[pypi-badge]: https://img.shields.io/pypi/dm/PyMarkEditor
[pypi-url]: https://pypi.python.org/pypi/PyMarkEditor/

[git-activity-url]: https://GitHub.com/Palibrix/PyMarkEditor/graphs/commit-activity
[git-branches]: https://badgen.net/github/branches/Palibrix/PyMarkEditor
[git-issues-url]: https://github.com/Palibrix/PyMarkEditor/
[git-issues]: https://img.shields.io/github/issues/Palibrix/PyMarkEditor
[git-maintenance]: https://img.shields.io/badge/Maintained%3F-yes-green.svg
[git-url]: https://github.com/Palibrix/PyMarkEditor/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Palibrix/PyMarkEditor",
    "name": "PyMarkEditor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Palibrix",
    "author_email": "palibrix@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/25/c5/15fde1ff5d33551fd1fb923c60adcb475242003355471bf4097c0717f439/pymarkeditor-1.0.tar.gz",
    "platform": null,
    "description": "# PyMarkEditor\n\n[![Me][user-badge]][user-url]\n\n----\n\n[![Python][python-badge]][python-url]\n\n[![PyPI download month][pypi-badge]][pypi-url]\n\n[![GitHub issues][git-issues]][git-issues-url]\n[![GitHub branches][git-branches]][git-url]\n[![GitHub Maintenance][git-maintenance]][git-activity-url]\n\n----\n## \ud83d\udcdd Table of Contents\n1. [\ud83d\udd0d What is this repository about?](#-what-is-this-repository-about)\n2. [\u2753 Why?](#-why)\n3. [\ud83d\udcbb Installing](#-installing)\n4. [\ud83d\udcd1 Examples](#-examples)\n   1. [Variables](#how-to-include-variables)\n   2. [Files](#how-to-include-files)\n____\n\n\n## \ud83d\udd0d What is this repository about?\nPyMarkEditor (PME) is a Python package that enhances Markdown syntax by introducing new features. It does not use any external functionality nor add new filetypes, only creating new possibilities on existing .md. Interestingly, you can even use it with any .txt file or any other file type.\n\nHere\u2019s how PME works: Given a template file, PME identifies default patterns and transforms the content into a new file. It\u2019s a straightforward tool that adds versatility to your Markdown documents.\n\n## \ud83e\udd14 Why?\nMarkdown boasts an elegant syntax, but its reusability leaves much to be desired. Picture this scenario: You\u2019re writing numerous similar text blocks (like User Stories), only to discover that a crucial letter \u201ca\u201d is missing across all your lines. Heartbreaking, isn\u2019t it?\n\nThis library exists mainly to give answer to those questions:\n1. How to add variables to markdown?\n    > PME allows you to add variables into markdown with ease. Define placeholders, and PME dynamically replaces them, ensuring consistency without manual edits.\n2. How to include different files in one markdown file?\n    > PME can include content of any text file into your Markdown, ensuring that it will be easy to maintain with time. Forget about endless scrolling \n\n\n## \ud83d\udc12 Installing\n\nInstallation is simple:\n```\npip install PyMarkEditor\n```\n\n## \ud83d\udcd1 Examples\nPre-requirements: one template file (you can name it whatever you like; for now, let\u2019s call it `readme_template.md`).\n\nTo use PME, follow this syntax:\n```\npme <input_file> <output_file>\n```\n\nFor instance, if you have a file named `readme_template.md` and want to create `README.md`, execute the following command:\n```\npme readme_template.md README.md\n```\n\n### How to include variables?\n\nYou must create a block of variables at the beginning of your document using four hyphens (`----`). Each variable starts on a new line\n\n```markdown\n----\nvariable_name: any text with `any` format of any length\nsecond_variable: any text with `any` format of any length\n----\n```\n\nTo use these variables throughout your document, enclose them in double curly braces (`{{variable_name}}`). Remember to add spaces before and after the variable:\n\n```markdown\nYou can put {{variable_name}} anywhere\n```\n\n### How to include files?\n\nTo seamlessly include files within your Markdown document, follow this syntax:\n\n```markdown\ninclude::path/to/file/file_to_include.md\n```\nYou can find more examples [here](example)\n\n\n\n[user-badge]: https://img.shields.io/badge/Palibrix-DD9623?style=plastic\n[user-url]: https://github.com/Palibrix\n\n\n[python-badge]: http://ForTheBadge.com/images/badges/made-with-python.svg\n[python-url]: https://www.python.org/\n\n[pypi-badge]: https://img.shields.io/pypi/dm/PyMarkEditor\n[pypi-url]: https://pypi.python.org/pypi/PyMarkEditor/\n\n[git-activity-url]: https://GitHub.com/Palibrix/PyMarkEditor/graphs/commit-activity\n[git-branches]: https://badgen.net/github/branches/Palibrix/PyMarkEditor\n[git-issues-url]: https://github.com/Palibrix/PyMarkEditor/\n[git-issues]: https://img.shields.io/github/issues/Palibrix/PyMarkEditor\n[git-maintenance]: https://img.shields.io/badge/Maintained%3F-yes-green.svg\n[git-url]: https://github.com/Palibrix/PyMarkEditor/\n",
    "bugtrack_url": null,
    "license": "'MIT License'",
    "summary": "Python markdown preprocessor",
    "version": "1.0",
    "project_urls": {
        "Homepage": "https://github.com/Palibrix/PyMarkEditor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec76e4425733585a77e0bacae84799348cd8d59700f4fe5c8c25fb70be2942c4",
                "md5": "f03e66257fa1f87fe408b9c77bdec78f",
                "sha256": "b60a984486f8f071e80b03f2424ccb0b9554820616c40adc488540f38db822db"
            },
            "downloads": -1,
            "filename": "PyMarkEditor-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f03e66257fa1f87fe408b9c77bdec78f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5035,
            "upload_time": "2024-08-04T10:52:41",
            "upload_time_iso_8601": "2024-08-04T10:52:41.672843Z",
            "url": "https://files.pythonhosted.org/packages/ec/76/e4425733585a77e0bacae84799348cd8d59700f4fe5c8c25fb70be2942c4/PyMarkEditor-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25c515fde1ff5d33551fd1fb923c60adcb475242003355471bf4097c0717f439",
                "md5": "39bb5906366400d231decd140052d884",
                "sha256": "8a6cc0a462d313858eeb154002f001808b43ee4e9483926865083ae91ff7630d"
            },
            "downloads": -1,
            "filename": "pymarkeditor-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "39bb5906366400d231decd140052d884",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4625,
            "upload_time": "2024-08-04T10:52:43",
            "upload_time_iso_8601": "2024-08-04T10:52:43.220194Z",
            "url": "https://files.pythonhosted.org/packages/25/c5/15fde1ff5d33551fd1fb923c60adcb475242003355471bf4097c0717f439/pymarkeditor-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 10:52:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Palibrix",
    "github_project": "PyMarkEditor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pymarkeditor"
}
        
Elapsed time: 0.28187s