convert markdown to zhihu compatible format.
Project description
md2zhihu
将markdown转换成 知乎 兼容的 markdown 格式
Install
pip install md2zhihu
Usage
md2zhihu your_great_work.md
这个命令将markdown 转换成 知乎 文章编辑器可直接导入的格式, 存储到 _md2/your_great_work/your_great_work.md.
-o 选项可以用来调整输出目录.
Features
-
公式转换:
例如
$$ ||X{\vec {\beta }}-Y||^{2} $$$$ ||X{\vec {\beta }}-Y||^{2} $$
转换成可以直接被知乎使用的tex渲染引擎的引用:
<img src="https://www.zhihu.com/equation?tex=%7C%7CX%7B%5Cvec%20%7B%5Cbeta%20%7D%7D-Y%7C%7C%5E%7B2%7D%5C%5C" alt="||X{\vec {\beta }}-Y||^{2}\\" class="ee_img tr_noresize" eeimg="1">md2zhihu 能自动识别block的公式和inline的公式.
-
表格: 将markdown表格转换成html 以便支持知乎直接导入.
-
图片: md2zhihu 将图片上传到github, 并将markdown中的图片引用做替换.
-
默认命令例如
md2zhihu your_great_work.md要求当前工作目录是一个git(作者假设用户用git来保存自己的工作), md2zhihu将建立一个随机分支来保存所有图片. -
也可以使用指定的git repo来保存图片, 例如:
md2zhihu your_great_work.md -r https://github.com/openacid/openacid.github.io.git要求是对这个repo有push权限.
-
Limitation
- 知乎的表格不支持table cell 中的markdown格式, 例如表格中的超链接, 无法渲染, 会被知乎转成纯文本.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2zhihu-0.1.18.tar.gz.
File metadata
- Download URL: md2zhihu-0.1.18.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5794a0ac72d19798b9bb2a62d99f313fc6a6fba0d282b3bc499598c2188c51ed
|
|
| MD5 |
cb0a51fe37c48a61a2aaacd753bf193e
|
|
| BLAKE2b-256 |
6a8e25cc27e38472f54f79bae76e661834af4243a99e3f7749a0aeb6cd7a5b8b
|
File details
Details for the file md2zhihu-0.1.18-py3-none-any.whl.
File metadata
- Download URL: md2zhihu-0.1.18-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68a98ce4c2f6a74675d425967d3790eaf37f46525cf71360bcf8b4c068c998d5
|
|
| MD5 |
92b052ee7dbbadf6c56e78655f12c29f
|
|
| BLAKE2b-256 |
13ab22892f48506243709c88b7b7c9107520ad7fca048ce2d2df52741fd09b51
|