All Projects → gaojiuli → Tomd

gaojiuli / Tomd

Licence: gpl-3.0
Convert HTML to Markdown.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tomd

Verb
HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
Stars: ✭ 442 (-10.34%)
Mutual labels:  markdown
Markdown
markdown parser and HTML renderer for Go
Stars: ✭ 454 (-7.91%)
Mutual labels:  markdown
Innersourcepatterns
Proven approaches that can guide you through applying open source best practices within your organization
Stars: ✭ 473 (-4.06%)
Mutual labels:  markdown
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (-10.14%)
Mutual labels:  markdown
Markdown Resume Js
Turn a simple markdown document into a resume in HTML and PDF
Stars: ✭ 449 (-8.92%)
Mutual labels:  markdown
Nuxt Markdown Blog Starter
Nuxt + Markdown blog starter
Stars: ✭ 456 (-7.51%)
Mutual labels:  markdown
Vim Markdown Toc
A vim 7.4+ plugin to generate table of contents for Markdown files.
Stars: ✭ 427 (-13.39%)
Mutual labels:  markdown
Blog
🍁 What you don't know is what you haven't learned
Stars: ✭ 484 (-1.83%)
Mutual labels:  markdown
Awesome Markdown
📝 Delightful Markdown stuff.
Stars: ✭ 451 (-8.52%)
Mutual labels:  markdown
Redpen
RedPen is an open source proofreading tool to check if your technical documents meet the writing standard. RedPen supports various markup text formats (Markdown, Textile, AsciiDoc, Re:VIEW, reStructuredText and LaTeX).
Stars: ✭ 466 (-5.48%)
Mutual labels:  markdown
Comrak
CommonMark + GFM compatible Markdown parser and renderer
Stars: ✭ 444 (-9.94%)
Mutual labels:  markdown
Vscode Markdownlint
Markdown linting and style checking for Visual Studio Code
Stars: ✭ 444 (-9.94%)
Mutual labels:  markdown
Pymdown Extensions
Extensions for Python Markdown
Stars: ✭ 459 (-6.9%)
Mutual labels:  markdown
Marp Vscode
Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
Stars: ✭ 442 (-10.34%)
Mutual labels:  markdown
Jupytext
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
Stars: ✭ 4,969 (+907.91%)
Mutual labels:  markdown
Notepads
A modern, lightweight text editor with a minimalist design.
Stars: ✭ 5,596 (+1035.09%)
Mutual labels:  markdown
Kite
🌴 Kite 前台页面是vue ssr服务端渲染、后台页面是react spa、服务层nodejs express、mysql编写的一套多权限文章、动态管理系统
Stars: ✭ 455 (-7.71%)
Mutual labels:  markdown
Remark React
plugin to transform to React
Stars: ✭ 484 (-1.83%)
Mutual labels:  markdown
Beibq
基于flask开发类似gitbook的知识管理网站。 http://demo.beibq.cn
Stars: ✭ 480 (-2.64%)
Mutual labels:  markdown
React Simplemde Editor
React wrapper for simplemde markdown editor
Stars: ✭ 463 (-6.09%)
Mutual labels:  markdown

tomd

License Pypi Python

When crawling online articles such as news, blogs, etc. I want to save them in markdown files but not databases. Tomd has the ability of converting a HTML that converted from markdown. If a HTML can't be described by markdown, tomd can't convert it right. Tomd is a python tool.

Road map

  • [x] Basic support
  • [ ] Full support(Nested list)
  • [ ] Command line tool

Installation

pip install tomd

Getting Started

Input

import tomd

tomd.Tomd('<h1>h1</h1>').markdown
# or
tomd.convert('<h1>h1</h1>')

Output

# h1

Usage

from tomd import Tomd


html="""
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>
<p>paragraph
<a href="https://github.com">link</a>
<img src="https://github.com" class="dsad">img</img>
</p>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<ol>
<li>1</li>
<li>2</li>
<li>3</li>
</ol>
<blockquote>blockquote</blockquote>
<p><code>inline code</code></p>
<pre><code>block code</code></pre>
<p>
<del>del</del>
<b>bold</b>
<i>italic</i>
<b><i>bold italic</i></b>
</p>

<hr/>

<table>
<thead>
<tr>
<th>th1</th>
<th>th2</th>
</tr>
</thead>
<tbody>
<tr>
<td>td</td>
<td>td</td>
</tr>
<tr>
<td>td</td>
<td>td</td>
</tr></tbody></table>
"""


Tomd(html).markdown

Result

# h1

## h2

### h3

#### h4

##### h5

###### h6

paragraph
[link](https://github.com)
![img](https://github.com)


- 1
- 2
- 3

1. 1
1. 2
1. 3

> blockquote

`inline code`


block code


~~del~~
**bold**
*italic*
***bold italic***


---


|th1|th2
|------
|td|td
|td|td

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].