Metadata-Version: 2.1
Name: Markups
Version: 3.1.3
Summary: A wrapper around various text markups
Home-page: https://github.com/retext-project/pymarkups
Author: Dmitry Shachnev
Author-email: mitya57@gmail.com
License: BSD 3-Clause License
Project-URL: Documentation, https://pymarkups.readthedocs.io/en/latest/
Project-URL: Issue Tracker, https://github.com/retext-project/pymarkups/issues/
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: python-markdown-math
Requires-Dist: importlib-metadata; python_version < "3.8"
Provides-Extra: markdown
Requires-Dist: Markdown>=2.6; extra == "markdown"
Requires-Dist: PyYAML; extra == "markdown"
Provides-Extra: restructuredtext
Requires-Dist: docutils; extra == "restructuredtext"
Provides-Extra: textile
Requires-Dist: textile; extra == "textile"
Provides-Extra: highlighting
Requires-Dist: Pygments; extra == "highlighting"

.. image:: https://github.com/retext-project/pymarkups/workflows/tests/badge.svg
   :target: https://github.com/retext-project/pymarkups/actions
   :alt: GitHub Actions status
.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/retext-project/pymarkups
   :alt: Coverage status
.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest
   :target: https://pymarkups.readthedocs.io/en/latest/
   :alt: ReadTheDocs status

This module provides a wrapper around various text markup languages.

Available by default are Markdown_, reStructuredText_ and Textile_, but you
can easily add your own markups.

Usage example:

.. code:: python

  >>> import markups
  >>> markup = markups.get_markup_for_file_name("myfile.rst")
  >>> markup.name
  'reStructuredText'
  >>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
  'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
  >>> text = """
  ... Hello, world!
  ... =============
  ...
  ... This is an example **reStructuredText** document.
  ... """
  >>> result = markup.convert(text)
  >>> result.get_document_title()
  'Hello, world!'
  >>> print(result.get_document_body())  # doctest: +NORMALIZE_WHITESPACE
  <main id="hello-world">
  <h1 class="title" data-posmap="3">Hello, world!</h1>
  <p data-posmap="5">This is an example <strong>reStructuredText</strong> document.</p>
  </main>

.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)

The release version can be downloaded from PyPI_ or installed using::

  pip install Markups

.. _PyPI: https://pypi.org/project/Markups/

The source code is hosted on GitHub_.

.. _GitHub: https://github.com/retext-project/pymarkups

The documentation is available online_ or can be generated from source by
installing Sphinx_ and running::

  python3 setup.py build_sphinx

.. _online: https://pymarkups.readthedocs.io/en/latest/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
