Tell appart Markdown and reStructuredText.
Project description
mdorrst
Tell appart Markdown and reStructuredText.
Free software: MIT license
Usage
The package exposes two functions, from_text and from_file, which both return one of md, rst or txt according to the content given.
- mdorrst.from_file(path) only reads the content of the file
(without being influenced by the filename):
>>> import mdorrst >>> mdorrst.from_file("./README.rst") 'rst'
mdorrst.from_text works the same way, given a string:
>>> import mdorrst >>> mdorrst.from_text("[hey](http://example.com)") 'md' >>> mdorrst.from_text("`hey <http://example.com>`__") 'rst'
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.3.0 (2017-04-26)
Python 2.7 support.
0.2.0 (2017-04-26)
Expose from_text().
0.1.0 (2017-04-26)
First release on PyPI.
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
mdorrst-0.3.0.tar.gz
(2.6 MB
view hashes)
Built Distribution
Close
Hashes for mdorrst-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef5aada75f7f5dace8fe9be72db335f1ccd763f3a19e617a23942a92bd7d29a |
|
MD5 | 01b26f8ffb697438996ab123e71d5f4c |
|
BLAKE2b-256 | 2aff1f918b8cab8b9240c91dade2f6c9e29709735a674bc7188587571420610e |