Saravanan666/pypi-org huggingface dataset:
Package: markdown-cjk-spacing
markdown_cjk_spacingPython markdown extension for insert a space between Chinese / Japanese /
Korean and English words, to display beautifully.中文Chinese西文Englishis converted to中文 Chinese 西文 English.InstallationInstall with pip.$ pip install markdown-cjk-spacingUsageIt is used as an extension ofPython-Markdown.import markdown

md = markdown.Markdown(extensions=["markdown_cjk_spacing.cjk_spacing"])
md.convert("markdown text")Or use fromPelicanas Markdown extension.# pelicanconf.py
MARKDOWN = {
    'extension_configs': {
        'markdown.extensions.codehilite': {'css_class': 'highlight'},
        'markdown.extensions.extra': {},
        'markdown.extensions.meta': {},
        'markdown_cjk_spacing.cjk_spacing': {},
    },
    'output_format': 'html5',
}Segment split conversionIn Chinese / Japanese sentences, if you do a line feed, it will be a one-byte space, but you can delete this space.import markdown

md = markdown.Markdown(extensions=["markdown_cjk_spacing.cjk_spacing"],
    extension_configs={'markdown_cjk_spacing.cjk_spacing':
            {'segment_break': True}})
md.convert("markdown text")
Package: markdown-code-blocks
markdown-code-blocksA stupid simple bit of code which combinesmistuneandpygmentsto convert markdown into html.  Very similar to github
markdown, but for python.Installationpip install markdown-code-blocksUsageThe library provides a single functionhighlightwhich takes in a markdown
string and returns html.You can also use the climarkdown-code-blocks-highlight.  It optionally
takes a single filename (defaulting to stdin) and writes to stdout.For example:markdown-code-blocks-highlight f.md > f.htmpygments cssI'd suggest grabbing a theme file frompygments-css(or any other provider of pygments themes -- if you google there's a bunch of
them).This library will use the class.highlightso be sure to change out whatever
class the theme uses with that.Most themes (for whatever reason) don't add styles for diff display.  I
usually do something like this:.highlight.gi{color:#070;}.highlight.gd{color:#911;}
Package: markdown_code_exec
markdown_code_execExecute Python code in Markdown files and captures the outputCopyright 2022 Sebastiaan MathôtCommand-line usageusage: markdown_code_exec.py [-h] [-i INPUT] [-o OUTPUT]optional arguments:
-h, --help            show this help message and exit
-i INPUT, --input INPUT
input markdown file
-o OUTPUT, --output OUTPUT
output markdown fileFunction referencemarkdown_code_exec.parse_text(md)Takes astrcontaining markdown text, finds code blocks in the
markdown, executes these code blocks and captures the output, and then
embeds the captured output in the markdown.Parametersmd: str :  The input markdown stringReturnsstrThe compiled markdown stringmarkdown_code_exec.parse_file(src, dst)Takes a markdown input file, executes code blocks while capturing output
and writes the result to a new output file.src: str
The full path to the input file
dst: str
The full path to the output fileLicenseGNU General Public License 3
Package: markdown-contents-generator
Markdown Contents GeneratorGenerate table of contents for markdown files.InstallationInstall via PIPInstall from SourceUsageGenerate Table of ContentsInsert Table of Contents into a FileReplace Contents TagsInstallationInstall via PIPInstall via pythonpip(python3 required):pipinstallmarkdown-contents-generator--userInstall from SourceClone git-repository and make setup inside the project directory:gitclonehttps://github.com/fadich/markdown-contents-generator.git\&&cdmarkdown-contents-generator

python3setup.pyinstallUsageOnce the package installed, it provides a console command:md-contents-generatorYou can call it with no arguments to view the instructions. The only required parameter is a path to the markdown file which table of contents you're going to generate.Generate Table of ContentsBy provingMARKDOWN_FILEPATHpositional parameter, you can generate its contents and check the console output results. For example:md-contents-generatorREADME.mdYou will see something like that (for this README.md file):-[Usage](#usage)-[Generate Table of Contents](#generate-table-of-contents)-[Insert Table of Contents into a File](#insert-table-of-contents-into-a-file)-[Replace Contents Tags](#replace-contents-tags)-[Installation](#installation)-[Install via PIP](#install-via-pip)-[Install from Source](#install-from-source)You can copy-paste it to the file you need or make auto-insertion to your working file (see below).Insert Table of Contents into a FileCommand can be called with optional--insertflag:md-contents-generatorREADME.md--insertThis will automatically insert auto-generated contents inside thecontents tags. So, before calling this command, add these tags to your markdown file:...

<contents-start />
                     <--- Your table of contents will be inserted right here
<contents-finish />

...Result should be like this:...

<contents-start />-[Usage](#usage)-[Generate Table of Contents](#generate-table-of-contents)-[Insert Table of Contents into a File](#insert-table-of-contents-into-a-file)-[Replace Contents Tags](#replace-contents-tags)-[Installation](#installation)-[Install via PIP](#install-via-pip)-[Install from Source](#install-from-source)

<contents-finish />

...Note, that the insertionreplaces everythinginside the tags!That's why, you can call it each time you update your markdown file to automatically update the table of contents. In common, these tags won't be rendered, and you can leave them in the source code if you prefer.You can also addstyle="display: none"(or any other attributes) for your tags if needed. The only necessary is to keep the tags naming and put single tag on a single line (multiline tags do not supported).Replace Contents TagsIf you'd like to insert table of contents but don't want to leave these contents tags, just call the command with both--insertand--replace-tagsflags:md-contents-generatorREADME.md--insert--replace-tagsHowever, in this case, you will not be able to update you table of contents, and will have to generate and insert the table of contents each time manually.
Package: markdown_convert
markdown-convertPython package to convert Markdown files to other formats.Withmarkdown-convert, you can easily convert a Markdown file to PDF
with the following features:User-defined CSS styles.Customizable document margins.Live PDF compilation.Manual insertion of page breaks.To start using it, simplypip install markdown-convert.Usage examplefrommarkdown_convertimportMarkdownFileMarkdownFile("markdown.md").to_pdf()# One time conversionMarkdownFile("markdown.md").live_pdf()# Real-time conversionDocumentationMarkdownFileinitmd_path- Path to the Markdown file.css_path='css/default.css'- Path to the CSS file.margin_h=62- Horizontal margin of the PDF file.margin_v=60- Vertical margin of the PDF file.useplugin- Name of theextensionto add to the set of used extensions.The extensionsextraandsane_listsare included by default.to_htmloutput_path=None- Path to the output HTML file.If not specified, the HTML file will have the same name, but with the.htmlextension.to_pdfoutput_path=None- Path to the output PDF file.If not specified, the PDF file will have the same name, but with the.pdfextension.live_pdf(Takes no arguments).The PDF file will be updated whenever the Markdown file changes on disk.ContributingSeeCONTRIBUTING.md.
Package: markdown-del-ins
markdown_del_insAllows theMarkdownpackage to interpret~~text~~as<del>text</del>and++text++as<ins>text</ins>.Installation$ pip install git+git://github.com/honzajavorek/markdown-del-ins.gitUsage>>> from markdown import Markdown
>>> md = Markdown(extensions=['markdown_del_ins'])
>>> src = 'This is ++added content++ and this is ~~deleted **strong** content~~'
>>> html = md.convert(src)
>>> print(html)
<p>This is <ins>added content</ins> and this is <del>deleted <strong>strong</strong> content</del></p>License & CreditsThis software is released under the modified BSD License. SeeLICENSEfor details. The project is a fork ofaleray/mdx_del_ins.
Package: markdown-description-example
No docutils, pandoc, or any other tricks! Just aREADME.mdand asetup.py.See the source for this project here:https://github.com/di/markdown-description-example.Instructions to do this for your project are here:https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypiWhat we can do:We can doitalicsandbold text.ListsAreFunToo(But please use responsibly)Code blocks:>>> pypi_supports_markdown
TrueAnd much much more!
Package: markdown-diary
markdown-diaryDiary file template generator, producing text files inMarkdownformat.I use this personally to keep a simple monthly diary of my notes and activities. Since it just produces a series of text files, they can be stored in something like Dropbox, and synced everywhere easily.Installationpip install markdown-diaryHow to usepip installadds the commandmd-diaryto your/binPATH so you can run it directly from the command line.Runmd-diaryfor help.For a single monthRunmd-diary YYYY-mm(e.g.md-diary 2019-01) which will create a file called01 January.mdThe format looks like:# January



## Week 1

### Tue 1


### Wed 2


### Thu 3


### Fri 4




## Week 2

### Mon 7


### Tue 8
...For a whole yearLike above, but runmd-diary YYYY(e.g.md-diary 20202) which will create the files01 January.md,02 February.md,...in the current directory.OptionsUse the-wflag to output weekdays only.DependenciesPython 2.7 or 3.x
Package: markdown-doi
# Document Object Identifiers and Python and Markdown, together!Type journal article DOIs, and have them automagically converted into a beautiful bibliography.[![travis](https://travis-ci.org/bcaller/markdown_doi.svg)](https://travis-ci.org/bcaller/markdown_doi)[![PyPI version](https://badge.fury.io/py/markdown_doi.svg)](https://badge.fury.io/py/markdown_doi)A Markdown extension that looks through your text for things like `doi:10.1234/j.banana.5678`,looks up the metadata on the crossref API and outputs text according to your requirementsAdd `'markdown_doi'` to your Markdown call and watch the magic unfold:```python>>> from markdown import Markdown>>> markdown = Markdown(extensions=['markdown_doi']>>> markdown.convert('doi:10.1016/j.applanim.2010.02.004')```outputs```html<p><span class="doi"><a href="http://dx.doi.org/10.1016/j.applanim.2010.02.004">Are cows more likely to lie down the longer they stand?</a> <span class="doi-year">(2010)</span></span></p>```You can enable the caching if for example you are using Pelican and constantly regenerating the same files```python>>> markdown = Markdown(extensions=['markdown_doi(cache_file=.doi_cache)']```The templating function takes the metadata Dict from themessage key of [the JSON API response](https://api.crossref.org/works/10.1016/j.applanim.2010.02.004)and returns a `markdown.util.etree.ElementTree`. See the default `template_title_link_year` function.```pythonfrom markdown_doi import makeExtension as makeDoiExtensiondef templater(metadata, doi_pattern):el = markdown.util.etree.Element("span")el.text = '%(given)s %(family)s' % metadata['author'][0]return elext = makeDoiExtension(templater=templater)md = markdown.Markdown(extensions=[ext])html = md.convert('hello 10.1016/j.applanim.2010.02.004')assert html == 'hello <p><span>Bert J. Tolkamp</span></p>'```## Options| Option    | Type | Default |Description ||-----------|------|---------|------------|| templater | (Dict, LinkPattern) -> etree.ElementTree | None | Function which renders the metadata as an element tree || cache_file | str | '' | File name that can store a cache of the DOIs looked up || cache | dict | None | Instead, you can pass a map from DOI to metadata dict as the cache rather than a file name |## Installation>From Github:```git clone https://github.com/bcaller/markdown_doi.gitpip install -e ./markdown_doi```>From Pypi:```pip install markdown_doi```
Package: markdowndotnet
Python command line tool to generate markdown documents from C# Library files and their XML documentation.RequirementsPython 3.6 or higherpythonnetPyYAMLclickThe generated files markdown files are meant to be used withmkdocs(with thematerial theme), but may be compatible with other site generators.How to useThe script requires setting theDocumentationFilesetting in the project’s configuration, e.g.<DocumentationFile>bin\Debug\ExampleProject.xml</DocumentationFile>Once this has been set, an XML file will be built along with the library’s dll file.Now, when running the script, the path to the dll and the xml file must be specified:pythonmarkdowndotnet.pyExampleProject.dllExampleProject.xmlBy default, the files will be generated in a folder namedoutput/in the working directory.This contains markdown files generated for each object found in the assembly, ordered in directories by namespace. Aditionally, a file namedindex.ymlis created, which can be appened to amkdocs.ymlfile to use withmkdocs.FeaturesGenerates markdown documents from a compiled binary (dll) and it’s documentation file.Displays all public fields, properties and methods, along with their parameters and return types.Generate internal links between membersExternal links to system classesPartial support for summary, params and returns tags.Planned featuresSupport for all XML tags
Package: markdown-editing
markdown-editingEditing markup and comments within Markdown.This is a +{new} addition

This -{this} word is removed

I say, ~{out with the old}{*in* with the new}

Here !{just a comment} is a line with a comment

You can also ?{add comments to some text}(Like *this*!{And comment within comments}!{You can thread them that way} (2020-04-21))

All -{new}(Redundant (Makyo)) edit marks can have comments with attributions and dates +{like this}(See? (Makyo 2020-04-22)) (for single comments, just put the attribution in there !{like this}(Makyo))

Bottom textLeads to:<p>This is a<insclass="addition">new</ins>addition</p><p>This<delclass="deletion">this</del>word is removed</p><p>I say,<spanclass="substitution"><del>out with the old</del><ins><em>in</em>with the new</ins></span></p><p>Here<qclass="comment">just a comment</q>is a line with a comment</p><p>You can also<markclass="selected">add comments to some text<qclass="comment">Like<em>this</em><qclass="comment">And comment within comments</q><qclass="comment">You can thread them that way</q><spanclass="attribution">2020-04-21</span></q></mark></p><p>All<delclass="deletion">new<qclass="comment">Redundant<spanclass="attribution">Makyo</span></q></del>edit marks can have comments with attributions and dates<insclass="addition">like this<qclass="comment">See?<spanclass="attribution">Makyo</span><spanclass="date">2020-04-22</span></q></ins>(for single comments, just put the attribution in there<qclass="comment">like this<spanclass="attribution">Makyo</span></q>)</p><p>Bottom text</p>It will take some styling to get it looking right. You can see a sample imageherewhich is generated usingthis stylesheet
Package: markdown-embedimages
OverviewThis project allows you to translate markdown to HTML and to convert URLs or even local image file-paths to embedded images.Local file-paths must be specifically enabled, for security reasons.This project is Python 2 and Python 3 compatible.ExampleImage URLsShort usage:import mei

markdown = "![Random Ingenuity](http://www.randomingenuity.com/ri72.png)"
actual = mei.markdown(markdown)

# <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSU...kJggg==" alt="Random Ingenuity"></p>Long usage:import mei.embed_images
import mistune

renderer = mei.embed_images.EmbedImagesRenderer()
m = mistune.Markdown(renderer=renderer)

markdown = "![Random Ingenuity](http://www.randomingenuity.com/ri72.png)"
actual = m.render(markdown)

# <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSU...kJggg==" alt="Random Ingenuity"></p>Local ImagesShort usage:import mei

markdown = "![alt text](/drawable-mdpi/ic_menu_paste.png)"
actual = mei.markdown(markdown)

# <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSU...TkSuQCC" alt="Random Ingenuity"></p>Long usage:import mei.embed_images
import mistune

renderer = mei.embed_images.EmbedImagesRenderer(embed_local_images=True)
m = mistune.Markdown(renderer=renderer)

markdown = "![alt text](/drawable-mdpi/ic_menu_paste.png)"
actual = m.render(markdown)

# <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSU...TkSuQCC" alt="Random Ingenuity"></p>TestingJust run the test script:$ ./test.sh
test_embed_images_local (test_embed_images.TestEmbedImages) ... ok
test_embed_images_url (test_embed_images.TestEmbedImages) ... ok
test_get_base64_with_image_filepath (test_embed_images.TestEmbedImages) ... ok
test_get_base64_with_image_url (test_embed_images.TestEmbedImages) ... ok
test_get_embedded_image_filepath (test_embed_images.TestEmbedImages) ... ok
test_get_embedded_image_filepath__xhtml (test_embed_images.TestEmbedImages) ... ok
test_get_embedded_image_url (test_embed_images.TestEmbedImages) ... ok
test_get_embedded_image_url__xhtml (test_embed_images.TestEmbedImages) ... ok
test_get_http2 (test_embed_images.TestEmbedImages) ... ok
test_get_http3 (test_embed_images.TestEmbedImages) ... ok
test_http (test_embed_images.TestEmbedImages) ... ok
test_http__instance_cached (test_embed_images.TestEmbedImages) ... ok
test_markdown (test_embed_images.TestEmbedImages) ... ok

----------------------------------------------------------------------
Ran 13 tests in 0.016s

OK
Package: markdown-emdash
# markdown-emdashExtension for [python-markdown](https://python-markdown.github.io/) that replaces all triple dashes
(—) with em-dashes (&mdash;).More information on [extensions here](https://python-markdown.github.io/extensions/).## Installation` pip installmarkdown-emdash`## Usage`python markdown.markdown(some_text,extensions=['mdx_emdash'])`or`python from mdx_emdash import EmDashExtension markdown.markdown(some_text,extensions=[EmDashExtension()])`
Package: markdown-escaped
markdown_escapedA python markdown extension for add HTML escaped symbols supportExtends thePython Markdown.
Adds the possibility to use escaped HTML caracters for markdown syntax, such as&gt;instead of>for blockquote.Install through pip:pipinstallmarkdown_escapedTo enable the markdown_escaped package and use it in your markdown generation just add it like so:importmarkdownresult=markdown.markdown(textToRender,extensions=["markdown_escaped",])List of supported caracters>who is&gt;for blockquoteIf you want an other caracter, open an issue or make a PR.Test stringIt is a test:Yes it works!
Really good.The real test:> And now ?
All is good!Yeah !Raw string'It is a test:\n> Yes it works!\nReally good.\n\nThe real test:\n\n&gt; And now ?\nAll is good!\n\nYeah !'Expected result'<p>It is a test:</p>\n<blockquote>\n<p>Yes it works!\nReally good.</p>\n</blockquote>\n<p>The real test:</p>\n<blockquote>\n<p>And now ?\nAll is good!</p>\n</blockquote>\n<p>Yeah !</p>'
Package: markdown-exec
Markdown ExecUtilities to execute code blocks in Markdown files.For example, you write a Python code block that computes some HTML,
and this HTML is injected in place of the code block.InstallationWithpip:pipinstallmarkdown-exec[ansi]Theansiextra provides the necessary bits (pygments-ansi-colorand a CSS file)
to render ANSI colors in HTML code blocks. The CSS file is automatically added
to MkDocs'extra_csswhen Markdown Exec is activated viaplugins(see below).ConfigurationThis extension relies on theSuperFencesextension ofPyMdown Extensions.To allow execution of code blocks,
configure a custom fence from Python:frommarkdownimportMarkdownfrommarkdown_execimportformatter,validatorMarkdown(extensions=["pymdownx.superfences"],extension_configs={"pymdownx.superfences":{"custom_fences":[{"name":"python","class":"python","validator":validator,"format":formatter,}# ...one fence for each language we support:# bash, console, md, markdown, py, python, pycon, sh, tree]}})...or in MkDocs configuration file, as a Markdown extension:# mkdocs.ymlmarkdown_extensions:-pymdownx.superfences:custom_fences:-name:pythonclass:pythonvalidator:!!python/name:markdown_exec.validatorformat:!!python/name:markdown_exec.formatter# ...one fence for each language we support:# bash, console, md, markdown, py, python, pycon, sh, tree...or in MkDocs configuration file, as a plugin:# mkdocs.ymlplugins:-search-markdown-execWe do recommend enabling Markdown Exec with the MkDocs plugin
if you are using MkDocs: it will take care of adding relevant
assets (CSS/JS) to the final site when needed.UsageYou are now able to execute code blocks instead of displaying them:```pythonexec="on"print("Hello Markdown!")```Theexecoption will be true for every possible value except0,no,offandfalse(case insensitive).Below you can see an example of running a bash script that is expected to
return a non-zero exit code:```bashexec="1" source="tabbed-left" returncode="2"
grepextra_cssREADME.md&&exit2```Seeusagefor more details,
and thegalleryfor more examples!
Package: markdown-extra
Set of extensions forpython-markdown(>= 3.0).FeaturesMetaExtensionadds metadata support in YAML format.SummaryExtensionallows to extract a summary from a markdown file.ResourcePathExtensionallows to perform various operations on file path such as images or links.Check out the doc:https://markdown-extra.readthedocs.ioInstallationInstall from PyPI withpip:pip installmarkdown-extra.
Package: markdown-figcap
markdown-figcapExtension forPython-Markdownto handle<figure>and<figcaption>.Usage%%%start a<figure>%:start a<figcaption>frommarkdownimportMarkdowntext=r'''%%%%%% figure-class here![img-alt](/source/of/img.jpg){: img-attributes here}%: figcaption here{: figcaption-attributes here}%: will not be a figcaption'''md=Markdown(extensions=['markdown_figcap','attr_list'])print(md.convert(text))Output:<p>%%%</p><figureclass="figure-class here"><imgalt="img-alt"here="here"img-attributes="img-attributes"src="/source/of/img.jpg"/><figcaptionfigcaption-attributes="figcaption-attributes"here="here">figcaption here</figcaption></figure><p>%: will not be a figcaption</p>NoticeThe attributes rendering (except<figure>'s class) is supported by the originPython-Markdown'sattr_listextension.Figure starter only will not be rendered as<figure>.Figcaption starter will not take effect until it is in thefigureblock.If the<p>in<figure>has no text and only one<img>child, the<p>tag will be got rid of.InstallationFromPyPI:pip install markdown-figcap
Package: markdown-figure
# markdown-figureAn extension to the [Python Markdown](https://pypi.python.org/pypi/Markdown) package.The exension wraps all images in the markdown document or text in `<figure>` tags, inserting a `<figcaption>` as well by re-using the `img alt` tag from markdown syntax (text in square brackets).To install use `pip install markdown-figure` or use the repository `pip install git+https://github.com/janwh/markdown-figure.git`Then the extension can be used by doing:```pythonimport markdownfrom mdfigure import FigureExtensionmd = markdown.Markdown(extensions=[FigureExtension()])# Wrap an Imagemd.convert('![my description](image.jpg)')```
Package: markdown-figure-caption
# Image Captions and Python and Markdown, together!Your images have `<figcaption>` elements attached.[![travis](https://travis-ci.org/bcaller/markdown_figure_caption.svg)](https://travis-ci.org/bcaller/markdown_figure_caption)[![PyPI version](https://badge.fury.io/py/markdown_figure_caption.svg)](https://badge.fury.io/py/markdown_figure_caption)Very similar to [figureAltCaption](https://github.com/jdittrich/figureAltCaption). This version doesn' handle references or attributes, but does handle links inside the caption.Behaviour is best displayed via the tests:```pythondef test_image_simple(markdown):s = "![The caption](http://example.com/x.png)"converted = markdown.convert(s)assert converted == '<p><figure><img alt="The caption" src="http://example.com/x.png" /><figcaption>The caption</figcaption></figure></p>'def test_image_link_in_caption(markdown):s = "![The caption from [source](http://example.com)](http://example.com/x.png)"converted = markdown.convert(s)assert converted == '<p><figure><img alt="The caption from source" src="http://example.com/x.png" /><figcaption>The caption from <a href="http://example.com">source</a></figcaption></figure></p>'```