my-markdown-test 0.1.0__tar.gz

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.
@@ -0,0 +1,22 @@
1
+ # mac
2
+ DS_Store
3
+
4
+ # temp
5
+ /temp
6
+
7
+ # cache
8
+ __pycache__
9
+
10
+ # env
11
+ .env
12
+
13
+ # frontend
14
+ node_modules
15
+
16
+ # build
17
+ __pycache__/
18
+ *.py[cod]
19
+ build/
20
+ *.egg-info/
21
+ .venv/
22
+ .env
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.5
2
+ Name: my-markdown-test
3
+ Version: 0.1.0
4
+ Summary: 一个用于学习 Python 公共库构建和发布的示例工程
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: markdown>=3.5
7
+ Description-Content-Type: text/markdown
8
+
9
+ 一个用于学习 Python 公共库构建和发布的示例工程。
10
+
11
+ ## 安装
12
+
13
+ ```bash
14
+ pip install duyi-utils
15
+ ```
@@ -0,0 +1,7 @@
1
+ 一个用于学习 Python 公共库构建和发布的示例工程。
2
+
3
+ ## 安装
4
+
5
+ ```bash
6
+ pip install duyi-utils
7
+ ```
@@ -0,0 +1,18 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "my-markdown-test"
7
+ version = "0.1.0"
8
+ description = "一个用于学习 Python 公共库构建和发布的示例工程"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ dependencies = [
12
+ "Markdown>=3.5",
13
+ ]
14
+
15
+ [tool.hatch.build.targets.sdist]
16
+
17
+ [tool.hatch.build.targets.wheel]
18
+ packages = ["src/my_markdown_test"]
@@ -0,0 +1,4 @@
1
+ from my_markdown_test.markdown1 import to_html
2
+ from my_markdown_test.markdown2 import strip_markdown
3
+
4
+ __all__ = ["to_html", "strip_markdown"]
@@ -0,0 +1,4 @@
1
+ import markdown
2
+
3
+ def to_html(text: str) -> str:
4
+ return markdown.markdown(text)
@@ -0,0 +1,5 @@
1
+ import markdown
2
+
3
+ def strip_markdown(text: str) -> str:
4
+ html = markdown.markdown(text)
5
+ return html.removeprefix("<p>").removesuffix("</p>\n")