Name | md2tgmd JSON |
Version |
0.1.9
JSON |
| download |
home_page | None |
Summary | md2tgmd is a Markdown to Telegram-specific-markdown converter. |
upload_time | 2024-05-08 18:23:29 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# md2tgmd
md2tgmd is a Markdown to [Telegram-specific-markdown](https://core.telegram.org/bots/api#formatting-options) converter.
## Install
```bash
pip install md2tgmd
```
## Usage
~~~python
from md2tgmd import escape
text = '''
# title
**bold**
```
# comment
print(qwer) # ferfe
ni1
```
# bn
# b
# Header
## Subheader
[1.0.0](http://version.com)
![1.0.0](http://version.com)
- item 1 -
- item 1 -
- item 1 -
* item 2 #
* item 3 ~
1. item 1
2. item 2
sudo apt install mesa-utils # 安装
```python
# comment
print("1.1\n")_
\subsubsection{1.1}
```
\subsubsection{1.1}
And simple text `with-ten` `with+ten` + some - **symbols**. # `with-ten`里面的`-`不会被转义
```
print("Hello, World!") -
```
Cxy = abs (Pxy)**2/ (Pxx*Pyy)
`a`a-b-c`n`
`-a----++++`++a-b-c`-n-`
`[^``]*`a``b-c``d``
# pattern = r"`[^`]*`-([^`-]*)``
w`-a----`ccccc`-n-`bbbb``a
'''
print(escape(text))
'''
▎*title*
*bold*
```
\# comment
print\(qwer\) \# ferfe
ni1
```
▎*bn*
▎*b*
▎*Header*
▎*Subheader*
[1\.0\.0](http://version\.com)
[1\.0\.0](http://version\.com)
• item 1 \-
• item 1 \-
• item 1 \-
• item 2 \#
• item 3 \~
1\. item 1
2\. item 2
sudo apt install mesa\-utils \# 安装
```python
\# comment
print\("1\.1\\n"\)\_
\\subsubsection\{1\.1\}
```
\\subsubsection\{1\.1\}
And simple text `with-ten` `with+ten` \+ some \- *symbols*\. \# `with-ten`里面的`-`不会被转义
```
print\("Hello, World\!"\) -
```
Cxy \= abs \(Pxy\)\*\*2/ \(Pxx\*Pyy\)
`a`a\-b\-c`n`
`-a----++++`\+\+a\-b\-c`-n-`
`\[^\`\`\]\*`a\`\`b\-c\`\`d\`\`
▎*pattern*
w`-a----`ccccc`-n-`bbbb\`\`a
'''
~~~
## Reference
https://github.com/skoropadas/telegramify-markdown
## License
This project is licensed under GPLv3, which means you are free to copy, distribute, and modify the software, as long as all modifications and derivative works are also released under the same license.
Raw data
{
"_id": null,
"home_page": null,
"name": "md2tgmd",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/81/fd/582eb514b69d67c455107e569b9116e866cd7d78b1f915946e2fb2dbe9ea/md2tgmd-0.1.9.tar.gz",
"platform": null,
"description": "# md2tgmd\n\nmd2tgmd is a Markdown to [Telegram-specific-markdown](https://core.telegram.org/bots/api#formatting-options) converter.\n\n## Install\n\n```bash\npip install md2tgmd\n```\n\n## Usage\n\n~~~python\nfrom md2tgmd import escape\n\ntext = '''\n# title\n\n**bold**\n```\n# comment\nprint(qwer) # ferfe\nni1\n```\n# bn\n\n# b\n\n# Header\n## Subheader\n\n[1.0.0](http://version.com)\n![1.0.0](http://version.com)\n\n- item 1 -\n - item 1 -\n - item 1 -\n* item 2 #\n* item 3 ~\n\n1. item 1\n2. item 2\n\nsudo apt install mesa-utils # \u5b89\u88c5\n\n```python\n\n# comment\nprint(\"1.1\\n\")_\n\\subsubsection{1.1}\n```\n\\subsubsection{1.1}\n\nAnd simple text `with-ten` `with+ten` + some - **symbols**. # `with-ten`\u91cc\u9762\u7684`-`\u4e0d\u4f1a\u88ab\u8f6c\u4e49\n\n\n```\nprint(\"Hello, World!\") -\n```\n\nCxy = abs (Pxy)**2/ (Pxx*Pyy)\n\n`a`a-b-c`n`\n\n`-a----++++`++a-b-c`-n-`\n`[^``]*`a``b-c``d``\n# pattern = r\"`[^`]*`-([^`-]*)``\nw`-a----`ccccc`-n-`bbbb``a\n'''\n\nprint(escape(text))\n\n\n'''\n\u258e*title*\n\n*bold*\n```\n\\# comment\nprint\\(qwer\\) \\# ferfe\nni1\n```\n\u258e*bn*\n\n\u258e*b*\n\n\u258e*Header*\n\u258e*Subheader*\n\n[1\\.0\\.0](http://version\\.com)\n[1\\.0\\.0](http://version\\.com)\n\n\n\u2022 item 1 \\-\n\n \u2022 item 1 \\-\n\n \u2022 item 1 \\-\n\n\u2022 item 2 \\#\n\n\u2022 item 3 \\~\n\n\n1\\. item 1\n\n2\\. item 2\n\nsudo apt install mesa\\-utils \\# \u5b89\u88c5\n\n```python\n\n\\# comment\nprint\\(\"1\\.1\\\\n\"\\)\\_\n\\\\subsubsection\\{1\\.1\\}\n```\n\\\\subsubsection\\{1\\.1\\}\n\nAnd simple text `with-ten` `with+ten` \\+ some \\- *symbols*\\. \\# `with-ten`\u91cc\u9762\u7684`-`\u4e0d\u4f1a\u88ab\u8f6c\u4e49\n\n\n```\nprint\\(\"Hello, World\\!\"\\) -\n```\n\nCxy \\= abs \\(Pxy\\)\\*\\*2/ \\(Pxx\\*Pyy\\)\n\n`a`a\\-b\\-c`n`\n\n`-a----++++`\\+\\+a\\-b\\-c`-n-`\n`\\[^\\`\\`\\]\\*`a\\`\\`b\\-c\\`\\`d\\`\\`\n\u258e*pattern*\nw`-a----`ccccc`-n-`bbbb\\`\\`a\n'''\n\n~~~\n\n## Reference\n\nhttps://github.com/skoropadas/telegramify-markdown\n\n\n## License\n\nThis project is licensed under GPLv3, which means you are free to copy, distribute, and modify the software, as long as all modifications and derivative works are also released under the same license.\n",
"bugtrack_url": null,
"license": null,
"summary": "md2tgmd is a Markdown to Telegram-specific-markdown converter.",
"version": "0.1.9",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7893315e1ec90a211bbb0110fd1778d43398c825634fb77d4a354df54c1f152d",
"md5": "cdb66d510cfc6c21d883c6110326b96d",
"sha256": "c45be0cb95c1c7c4920aafa74a26b3a8d613dd4eada98996d06f032141600e33"
},
"downloads": -1,
"filename": "md2tgmd-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cdb66d510cfc6c21d883c6110326b96d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16547,
"upload_time": "2024-05-08T18:23:27",
"upload_time_iso_8601": "2024-05-08T18:23:27.911164Z",
"url": "https://files.pythonhosted.org/packages/78/93/315e1ec90a211bbb0110fd1778d43398c825634fb77d4a354df54c1f152d/md2tgmd-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "81fd582eb514b69d67c455107e569b9116e866cd7d78b1f915946e2fb2dbe9ea",
"md5": "a8252b63a8279d5de962289c7f52ddd7",
"sha256": "160049768683807572d97b3b09134357316aa4bbe5dba5aca67dd87518c410f2"
},
"downloads": -1,
"filename": "md2tgmd-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "a8252b63a8279d5de962289c7f52ddd7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16275,
"upload_time": "2024-05-08T18:23:29",
"upload_time_iso_8601": "2024-05-08T18:23:29.562923Z",
"url": "https://files.pythonhosted.org/packages/81/fd/582eb514b69d67c455107e569b9116e866cd7d78b1f915946e2fb2dbe9ea/md2tgmd-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-08 18:23:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "md2tgmd"
}