hyp

hypermark

Markdown for Humans.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

267

Maintenance

Last Commit

9mos ago

Contributors

10

Package

Dependencies

0

License

ISC

Categories

Readme

Hypermark!

PyPI License Dependabot Status Code style: black

Markdown is Hypertext.

Inspirational, fast, reversible, extendable, and filterable.

ॐ

Current Usage

>>> import hypermark

>>> content = "# fuck yea\nhttp://github.com\n\nemail@example.com"

>>> d = hypermark.text(content)
'<HyperText 7c7706acb8>'

>>> d.links
['http://github.com']

>>> d.hash
u'03a392ef91826a3506fcc54a4e1fa7b022688ec42bc4d53b4c36a8b6f8058606'

>>> print(d.html)
<h1>fuck yea</h1>
<p><a href="http://github.com">http://github.com</a></p>

Convert HTML to Markdown!

>>> print(hypermark.html('<h1>test h1</h1>'))
# test h1

Filters!

>>> print(d.filter('bleach').html)
&lt;h1&gt;fuck yea&lt;/h1&gt;
&lt;p&gt;<a href="http://github.com">http://github.com</a>&lt;/p&gt;


>>> print(d.filter('transpose_headers', levels=1).html)
<h2>fuck yea</h2>
<p><a href="http://github.com">http://github.com</a></p>

>>> print(d.filter('anchors').html)
<h1 id="toc-1">fuck yea</h1>
<p><a href="http://github.com">http://github.com</a></p>

Vision (Work in Progress)

Feature ideas:

  • link extraction
  • diff generation
  • sha generation
  • md -> html, html -> md
  • header transposing
  • stripping?
  • targets for headers
  • expand tests

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100