markdown-to-confluence 0.4.2__py3-none-any.whl → 0.4.4__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.
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/METADATA +61 -14
- markdown_to_confluence-0.4.4.dist-info/RECORD +31 -0
- md2conf/__init__.py +1 -1
- md2conf/__main__.py +42 -10
- md2conf/api.py +3 -1
- md2conf/application.py +6 -3
- md2conf/converter.py +440 -565
- md2conf/csf.py +151 -0
- md2conf/domain.py +46 -0
- md2conf/drawio.py +49 -0
- md2conf/local.py +9 -4
- md2conf/markdown.py +114 -0
- md2conf/processor.py +2 -1
- md2conf/toc.py +89 -0
- md2conf/uri.py +46 -0
- md2conf/xml.py +47 -14
- markdown_to_confluence-0.4.2.dist-info/RECORD +0 -27
- md2conf/emoji.py +0 -83
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/WHEEL +0 -0
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/entry_points.txt +0 -0
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/licenses/LICENSE +0 -0
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/top_level.txt +0 -0
- {markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/zip-safe +0 -0
md2conf/emoji.py
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Publish Markdown files to Confluence wiki.
|
|
3
|
-
|
|
4
|
-
Copyright 2022-2025, Levente Hunyadi
|
|
5
|
-
|
|
6
|
-
:see: https://github.com/hunyadi/md2conf
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
import pathlib
|
|
10
|
-
|
|
11
|
-
import pymdownx.emoji1_db as emoji_db
|
|
12
|
-
|
|
13
|
-
EMOJI_PAGE_ID = "13500452"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def to_html(cp: int) -> str:
|
|
17
|
-
"""
|
|
18
|
-
Returns the safe HTML representation for a Unicode code point.
|
|
19
|
-
|
|
20
|
-
Converts non-ASCII and non-printable characters into HTML entities with decimal notation.
|
|
21
|
-
|
|
22
|
-
:param cp: Unicode code point.
|
|
23
|
-
:returns: An HTML representation of the Unicode character.
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
ch = chr(cp)
|
|
27
|
-
if ch.isascii() and ch.isalnum():
|
|
28
|
-
return ch
|
|
29
|
-
else:
|
|
30
|
-
return f"&#{cp};"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def generate_source(path: pathlib.Path) -> None:
|
|
34
|
-
"Generates a source Markdown document for testing emojis."
|
|
35
|
-
|
|
36
|
-
emojis = emoji_db.emoji
|
|
37
|
-
|
|
38
|
-
with open(path, "w") as f:
|
|
39
|
-
print(f"<!-- confluence-page-id: {EMOJI_PAGE_ID} -->", file=f)
|
|
40
|
-
print("<!-- This file has been generated by a script. -->", file=f)
|
|
41
|
-
print(file=f)
|
|
42
|
-
print("## Emoji", file=f)
|
|
43
|
-
print(file=f)
|
|
44
|
-
print("| Icon | Emoji code |", file=f)
|
|
45
|
-
print("| ---- | ---------- |", file=f)
|
|
46
|
-
for key in emojis.keys():
|
|
47
|
-
key = key.strip(":")
|
|
48
|
-
print(f"| :{key}: | `:{key}:` |", file=f)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def generate_target(path: pathlib.Path) -> None:
|
|
52
|
-
"Generates a target Confluence Storage Format (XML) document for testing emojis."
|
|
53
|
-
|
|
54
|
-
emojis = emoji_db.emoji
|
|
55
|
-
|
|
56
|
-
with open(path, "w") as f:
|
|
57
|
-
print('<ac:structured-macro ac:name="info" ac:schema-version="1">', file=f)
|
|
58
|
-
print("<ac:rich-text-body>", file=f)
|
|
59
|
-
print("<p>This page has been generated with a tool.</p>", file=f)
|
|
60
|
-
print("</ac:rich-text-body>", file=f)
|
|
61
|
-
print("</ac:structured-macro>", file=f)
|
|
62
|
-
print("<h2>Emoji</h2>", file=f)
|
|
63
|
-
print("<table>", file=f)
|
|
64
|
-
print("<thead><tr><th>Icon</th><th>Emoji code</th></tr></thead>", file=f)
|
|
65
|
-
print("<tbody>", file=f)
|
|
66
|
-
for key, data in emojis.items():
|
|
67
|
-
unicode = data["unicode"]
|
|
68
|
-
key = key.strip(":")
|
|
69
|
-
html = "".join(to_html(int(item, base=16)) for item in unicode.split("-"))
|
|
70
|
-
|
|
71
|
-
print(
|
|
72
|
-
f"<tr>\n"
|
|
73
|
-
f" <td>\n"
|
|
74
|
-
f' <ac:emoticon ac:name="{key}" ac:emoji-shortname=":{key}:" ac:emoji-id="{unicode}" ac:emoji-fallback="{html}"/>\n'
|
|
75
|
-
f" </td>\n"
|
|
76
|
-
f" <td>\n"
|
|
77
|
-
f" <code>:{key}:</code>\n"
|
|
78
|
-
f" </td>\n"
|
|
79
|
-
f"</tr>",
|
|
80
|
-
file=f,
|
|
81
|
-
)
|
|
82
|
-
print("</tbody>", file=f)
|
|
83
|
-
print("</table>", file=f)
|
|
File without changes
|
{markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{markdown_to_confluence-0.4.2.dist-info → markdown_to_confluence-0.4.4.dist-info}/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|