chatgpt-md-converter 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chatgpt_md_converter
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: A package for converting markdown to HTML for chat Telegram bots
5
5
  Home-page: https://github.com/Latand/formatter-chatgpt-telegram
6
6
  Author: Kostiantyn Kriuchkov
@@ -31,9 +31,11 @@ This project provides a solution for converting Markdown formatted text into HTM
31
31
 
32
32
  - Converts Markdown syntax to Telegram-compatible HTML.
33
33
  - Supports inline code, bold, italic, underline, and strikethrough formatting.
34
+ - Supports spoiler tags with `||text||` syntax.
34
35
  - Handles nested bold and italic formatting.
35
36
  - Converts Markdown links and lists to their HTML equivalents.
36
37
  - Processes code blocks with optional language specification, preserving formatting within `<pre><code>` tags.
38
+ - Supports regular blockquotes (`>`) and expandable blockquotes (`**>`) for Telegram.
37
39
  - Automatically appends missing closing delimiters for code blocks.
38
40
  - Escapes HTML special characters to prevent unwanted HTML rendering outside code blocks.
39
41
 
@@ -41,7 +43,7 @@ This project provides a solution for converting Markdown formatted text into HTM
41
43
 
42
44
  To use the Markdown to Telegram HTML Parser in your ChatGPT bot, integrate the provided Python functions into your bot's processing pipeline. Here is a brief overview of how to incorporate the parser:
43
45
 
44
- 1. **Ensure Closing Delimiters**: Automatically appends missing closing delimiters for `` ` `` and ``` ``` ``` to ensure proper parsing.
46
+ 1. **Ensure Closing Delimiters**: Automatically appends missing closing delimiters for `` ` `` and ` ` ``` to ensure proper parsing.
45
47
 
46
48
  2. **Extract and Convert Code Blocks**: Extracts Markdown code blocks, converts them to HTML `<pre><code>` format, and replaces them with placeholders to prevent formatting within code blocks.
47
49
 
@@ -61,11 +63,39 @@ pip install chatgpt-md-converter
61
63
 
62
64
  ## Example
63
65
 
64
- ```python
66
+ ````python
65
67
  from chatgpt_md_converter import telegram_format
66
68
 
67
- formatted_text = telegram_format("Here is some **bold**, __underline__, and `inline code`.\n```python\nprint('Hello, world!')\n```")
69
+ # Basic formatting
70
+ text = """
71
+ Here is some **bold**, __underline__, and `inline code`.
72
+ This is a ||spoiler text||.
73
+
74
+ ```python
75
+ print('Hello, world!')
76
+ ````
77
+
78
+ """
79
+
80
+ # Blockquotes
81
+
82
+ blockquote_text = """
83
+
84
+ > Regular blockquote
85
+ > Multiple lines
86
+
87
+ \*\*>Expandable blockquote
88
+
89
+ > Hidden by default
90
+ > Multiple lines
91
+ > """
92
+
93
+ formatted_text = telegram_format(text)
94
+ formatted_blockquote = telegram_format(blockquote_text)
95
+
68
96
  print(formatted_text)
97
+ print(formatted_blockquote)
98
+
69
99
  ```
70
100
 
71
101
  ## Requirements
@@ -76,3 +106,4 @@ print(formatted_text)
76
106
  ## Contribution
77
107
 
78
108
  Feel free to contribute to this project by submitting pull requests or opening issues for bugs, feature requests, or improvements.
109
+ ```
@@ -4,8 +4,8 @@ chatgpt_md_converter/extractors.py,sha256=RNwo57_6jCe-HoX5eCvvZcjSTc2uPax-6QEtXq
4
4
  chatgpt_md_converter/formatters.py,sha256=UbjRG7bLETIGDaFDbFybwW8dKYBMDmgLmIasJiw_j60,2304
5
5
  chatgpt_md_converter/helpers.py,sha256=2Nc9_s0HcLq79mBt7Hje19LzbO6z9mUNgayoMyWkIhI,874
6
6
  chatgpt_md_converter/telegram_formatter.py,sha256=L0ESIY1AOuRXdIto2lWR38zuYuIwlLBScGINMrm8VVk,4091
7
- chatgpt_md_converter-0.3.0.dist-info/licenses/LICENSE,sha256=SDr2jeP-s2g4vf17-jdLXrrqA4_mU7L_RtSJlv4Y2mk,1077
8
- chatgpt_md_converter-0.3.0.dist-info/METADATA,sha256=IjGkCXRdnzaDtSFgwBs1njGXultCqQ4t-9lqPf0vjKc,3282
9
- chatgpt_md_converter-0.3.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
10
- chatgpt_md_converter-0.3.0.dist-info/top_level.txt,sha256=T2o7csVtZgr-Pwm83aSUkZn0humJmDFNqW38tRSsNqw,21
11
- chatgpt_md_converter-0.3.0.dist-info/RECORD,,
7
+ chatgpt_md_converter-0.3.1.dist-info/licenses/LICENSE,sha256=SDr2jeP-s2g4vf17-jdLXrrqA4_mU7L_RtSJlv4Y2mk,1077
8
+ chatgpt_md_converter-0.3.1.dist-info/METADATA,sha256=Oz1UdVaAe77WGG5AtJQQybJh5c2TjFD92fn9do7-N88,3718
9
+ chatgpt_md_converter-0.3.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
10
+ chatgpt_md_converter-0.3.1.dist-info/top_level.txt,sha256=T2o7csVtZgr-Pwm83aSUkZn0humJmDFNqW38tRSsNqw,21
11
+ chatgpt_md_converter-0.3.1.dist-info/RECORD,,