{ "info": { "author": "scyu16", "author_email": "devmaily@yandex.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Text Processing :: Markup", "Topic :: Utilities" ], "description": "# Mdx Link2MD: Convert markdown to HTML in batch\n\n[![PyPI](https://img.shields.io/pypi/v/mdx_link2md.svg)](https://pypi.org/project/mdx-link2md/)\n[![PyPI](https://img.shields.io/pypi/pyversions/mdx_link2md.svg)](https://pypi.org/project/mdx-link2md/)\n[![CircleCI](https://img.shields.io/circleci/project/github/scyu16/mdx_link2md/develop.svg)](https://circleci.com/gh/scyu16/mdx_link2md)\n[![MIT License](http://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis extension for [Python Markdown](https://github.com/waylan/Python-Markdown)\nchanges `md` extension in the markdown links to `html` before links in the text \nare converted to HTML hyperlinks. For example, the sample text in markdown format,\n\n```markdown\nPlease read [help](../read.md)\n```\n\nwould be converted to\n```html\nPlease read help\n```\n.\n\nThis would allow converting markdown files to HTML format in batch,\nwith internal links to markdown files being updated to the corresponding HTML files. It\nhelps most when there are cross references among the markdown documents of \ninterest.\n\n## Installation\n\nThe project is on [PyPI](https://pypi.org/project/mdx-link2md/)!\n\n```bash\n$ pip install mdx_link2md\n```\n\nIf you want the latest version, which might include unreleased-to-PyPI code,\nyou can always grab the `develop` branch directly from Git.\n\n```bash\n$ pip install git+git://github.com/scyu16/mdx_link2md.git\n```\n\n## Usage\n\n### As A Utility Script\nThe package can run as a top-level script to convert the multiple markdown files in batch:\n```bash\n$ python -m mdx_link2md \n```\nThe converted files are placed in the same directory as the source files with the same\nnames of `html` extension.\n\n### As A Module\nIf more flexibility is desired, the package could be used as a `Python` module.\n\n```python\nfrom markdown import markdown\nfrom mdx_link2md.markdownlinks import MarkdownLinkExtension\n\n\nmd = markdown.Markdown(output_format='html5',\n extensions=[MarkdownLinkExtension(ignore_url=False)])\nmd.convertFile('input_file', output='output_file', encoding='utf-8')\n\n```\nPlease see [\\_\\_main\\_\\_.py](./mdx_link2md/__main__.py) for the source code of the \nscript that makes the module work as a utility, as described in the preceding subsection. \n\n### Configuration Settings\n\nThe only setting for the extension is `ignore_url`, with a `True` default value.\nWhen `ignore_url` is `False`, markdown links to none local files are also updated:\n\n|ignore_url| input | output |\n|:--------:| :-----: | :-------:|\n|True | ```[help](http://xyz.com/read.mD)```|```help```|\n|False | ```[help](http://xyz.com/read.mD)```|```help```|\n\n*Note*:\n\n 1. If the package is run as a utility script, `ignore_url` is set to `True`.\n 2. The package is case insensitive to the `md` file extension in either usage.\n\n\n## Development\n\n`develop` branch holds the latest stable code. Please create branches off `develop`\nbranch for any changes or enhancement. It's suggested you first create a virtual\nenvironment and activate it, then:\n\n```bash\n$ git clone git@github.com:scyu16/mdx_link2md.git\n```\n. For Python 2.x,\n```bash\n$ pip install -r requirements/python2.txt\n```\n, while for Python 3.x,\n```bash\n$ pip install -r requirements/python3.txt\n```\n\nWith this being done, `import mdx_link2md` would pick up any local changes made to\nthe package.\n\n## TODO\n1. Make it work for links in other forms\n2. Fix circle ci for publishing to PyPi\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scyu16/mdx_link2md", "keywords": "markdown,html", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mdx-link2md", "package_url": "https://pypi.org/project/mdx-link2md/", "platform": "", "project_url": "https://pypi.org/project/mdx-link2md/", "project_urls": { "Homepage": "https://github.com/scyu16/mdx_link2md" }, "release_url": "https://pypi.org/project/mdx-link2md/0.0.2/", "requires_dist": [ "markdown (>=2.6.11)" ], "requires_python": "", "summary": "A markdown link preprocessor for Python Markdown", "version": "0.0.2" }, "last_serial": 4220016, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "993244a7e69a1fd42e5feddf41b0e219", "sha256": "3fc31d14b2ad0304cfa1e9f49144b9eae11178b67357ef02d3de7833aea00347" }, "downloads": -1, "filename": "mdx_link2md-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "993244a7e69a1fd42e5feddf41b0e219", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3339, "upload_time": "2018-08-11T21:21:44", "url": "https://files.pythonhosted.org/packages/9d/cf/7f7590a2148c6bd6bc5b0b6f9da1a1f1da21fd5e4588b26730e2aa296861/mdx_link2md-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69c67e1dd26ba62b12080af771fda27c", "sha256": "bf2d40ffa4b05477ae703e740da3017db7a5064ba5da1f27ff3aec4337594251" }, "downloads": -1, "filename": "mdx_link2md-0.0.1.tar.gz", "has_sig": false, "md5_digest": "69c67e1dd26ba62b12080af771fda27c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2909, "upload_time": "2018-08-11T21:21:45", "url": "https://files.pythonhosted.org/packages/93/c5/23b12f5c48640542ad80cff2f2f21c09a3595e93b5b68a08a3d4d3cd9c53/mdx_link2md-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "bf0cd079bda64fba7d0ea09aecb35dc6", "sha256": "10e624105bc4f4af2369bda7baba0e0822276485395bf95f2c9e6ad1965bc488" }, "downloads": -1, "filename": "mdx_link2md-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bf0cd079bda64fba7d0ea09aecb35dc6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4699, "upload_time": "2018-08-29T19:06:05", "url": "https://files.pythonhosted.org/packages/94/39/80265902624380e3ccccf0bda9f0997d3a16597bfb21a9cf87dda6997c80/mdx_link2md-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4c9d4ed6aa8faa54c56b0b17bbd1d76", "sha256": "25b9d2080b0792d54136230dbf52dbd06279f6fcf699ad4800b5b865c4bcd288" }, "downloads": -1, "filename": "mdx_link2md-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e4c9d4ed6aa8faa54c56b0b17bbd1d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4079, "upload_time": "2018-08-29T19:06:07", "url": "https://files.pythonhosted.org/packages/ce/1c/d23c32acd6b02e88b303aa90bb6711a1814a1f102a12644ae089c02dfcf8/mdx_link2md-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf0cd079bda64fba7d0ea09aecb35dc6", "sha256": "10e624105bc4f4af2369bda7baba0e0822276485395bf95f2c9e6ad1965bc488" }, "downloads": -1, "filename": "mdx_link2md-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bf0cd079bda64fba7d0ea09aecb35dc6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4699, "upload_time": "2018-08-29T19:06:05", "url": "https://files.pythonhosted.org/packages/94/39/80265902624380e3ccccf0bda9f0997d3a16597bfb21a9cf87dda6997c80/mdx_link2md-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4c9d4ed6aa8faa54c56b0b17bbd1d76", "sha256": "25b9d2080b0792d54136230dbf52dbd06279f6fcf699ad4800b5b865c4bcd288" }, "downloads": -1, "filename": "mdx_link2md-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e4c9d4ed6aa8faa54c56b0b17bbd1d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4079, "upload_time": "2018-08-29T19:06:07", "url": "https://files.pythonhosted.org/packages/ce/1c/d23c32acd6b02e88b303aa90bb6711a1814a1f102a12644ae089c02dfcf8/mdx_link2md-0.0.2.tar.gz" } ] }