Run performance benchmarks
master./perf.py. This script processes the Markdown files in the cases/*.txt directory using various implementations, including Markdown.pl, markdown.py, and markdown2.py../perf.pyrepository·master·Indexed 25 days ago
https://github.com/trentm/python-markdown2A fast and complete Python implementation of Markdown designed to match the behavior of the original Perl-implemented Markdown.pl. It supports a variety of extensions called 'extras' for features such as tables, footnotes, and syntax highlighting, and can be used as both a Python module and a CLI script.
./perf.py. This script processes the Markdown files in the cases/*.txt directory using various implementations, including Markdown.pl, markdown.py, and markdown2.py../perf.pyYou can install markdown2 using pip, pypm, or by running the setup script. To include all optional dependencies (such as Pygments for code syntax highlighting), use the [all] extra.
pip install markdown2
pip install markdown2[all]
pypm install markdown2
easy_install markdown2
python setup.py installTo generate test cases for performance testing, run the gen_perf_cases.py script. You can optionally provide a limit to specify the maximum number of recipes from the Python Cookbook dataset to use for generating test files. The generated files are small .txt files stored in the cases directory.
./gen_perf_cases.py 1000markdown2 in your Python code in two ways: using the top-level markdown() function for quick conversions, or by instantiating a Markdown object for repeated conversions.footnotes, tables, syntax-highlighting, toc, smartypants). You can enable them via the CLI using the --extras flag or via the Python API by passing a list of names to the extras argument.