markdown-to-confluence 0.5.0__tar.gz → 0.5.1__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.
Files changed (104) hide show
  1. {markdown_to_confluence-0.5.0/markdown_to_confluence.egg-info → markdown_to_confluence-0.5.1}/PKG-INFO +2 -1
  2. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1/markdown_to_confluence.egg-info}/PKG-INFO +2 -1
  3. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/requires.txt +1 -0
  4. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/__init__.py +1 -1
  5. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/serializer.py +14 -2
  6. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/pyproject.toml +1 -0
  7. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_unit.py +5 -0
  8. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/LICENSE +0 -0
  9. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/MANIFEST.in +0 -0
  10. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/README.md +0 -0
  11. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/SOURCES.txt +0 -0
  12. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/dependency_links.txt +0 -0
  13. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/entry_points.txt +0 -0
  14. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/top_level.txt +0 -0
  15. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/markdown_to_confluence.egg-info/zip-safe +0 -0
  16. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/__main__.py +0 -0
  17. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/api.py +0 -0
  18. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/collection.py +0 -0
  19. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/converter.py +0 -0
  20. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/csf.py +0 -0
  21. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/domain.py +0 -0
  22. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/drawio.py +0 -0
  23. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/emoticon.py +0 -0
  24. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/entities.dtd +0 -0
  25. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/environment.py +0 -0
  26. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/extra.py +0 -0
  27. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/latex.py +0 -0
  28. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/local.py +0 -0
  29. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/markdown.py +0 -0
  30. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/matcher.py +0 -0
  31. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/mermaid.py +0 -0
  32. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/metadata.py +0 -0
  33. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/processor.py +0 -0
  34. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/publisher.py +0 -0
  35. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/puppeteer-config.json +0 -0
  36. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/py.typed +0 -0
  37. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/scanner.py +0 -0
  38. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/text.py +0 -0
  39. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/toc.py +0 -0
  40. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/uri.py +0 -0
  41. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/md2conf/xml.py +0 -0
  42. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/setup.cfg +0 -0
  43. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/setup.py +0 -0
  44. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/__init__.py +0 -0
  45. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/emoji.py +0 -0
  46. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/admonition.md +0 -0
  47. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/alert.md +0 -0
  48. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/alignment.md +0 -0
  49. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/anchors.md +0 -0
  50. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/basic.md +0 -0
  51. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/code.md +0 -0
  52. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/collapsed.md +0 -0
  53. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/fenced.md +0 -0
  54. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/figure/diagram.drawio +0 -0
  55. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/figure/diagram.drawio.png +0 -0
  56. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/figure/diagram.drawio.svg +0 -0
  57. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/figure/raster.png +0 -0
  58. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/figure/vector.svg +0 -0
  59. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/footnote.md +0 -0
  60. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/ignore.md +0 -0
  61. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/images/images.md +0 -0
  62. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/images.md +0 -0
  63. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/macro.md +0 -0
  64. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/math.md +0 -0
  65. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/mermaid.md +0 -0
  66. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/missing.md +0 -0
  67. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/sections.md +0 -0
  68. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/status.md +0 -0
  69. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/table.md +0 -0
  70. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/tags.md +0 -0
  71. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/tasklist.md +0 -0
  72. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/title.md +0 -0
  73. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/source/toc.md +0 -0
  74. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/admonition.xml +0 -0
  75. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/alert.xml +0 -0
  76. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/alignment.xml +0 -0
  77. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/anchors.xml +0 -0
  78. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/basic.xml +0 -0
  79. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/code.xml +0 -0
  80. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/collapsed.xml +0 -0
  81. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/fenced.xml +0 -0
  82. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/footnote.xml +0 -0
  83. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/images/images.xml +0 -0
  84. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/images.xml +0 -0
  85. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/macro.xml +0 -0
  86. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/math.xml +0 -0
  87. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/mermaid.xml +0 -0
  88. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/missing.xml +0 -0
  89. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/panel.xml +0 -0
  90. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/sections.xml +0 -0
  91. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/status.xml +0 -0
  92. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/table.xml +0 -0
  93. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/tags.xml +0 -0
  94. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/tasklist.xml +0 -0
  95. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/target/toc.xml +0 -0
  96. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_conversion.py +0 -0
  97. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_drawio.py +0 -0
  98. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_matcher.py +0 -0
  99. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_mermaid.py +0 -0
  100. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_processor.py +0 -0
  101. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_scanner.py +0 -0
  102. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_text.py +0 -0
  103. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/test_xml.py +0 -0
  104. {markdown_to_confluence-0.5.0 → markdown_to_confluence-0.5.1}/tests/utility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-to-confluence
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Publish Markdown files to Confluence wiki
5
5
  Author-email: Levente Hunyadi <hunyadi@gmail.com>
6
6
  Maintainer-email: Levente Hunyadi <hunyadi@gmail.com>
@@ -26,6 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: cattrs>=25.3
27
27
  Requires-Dist: lxml>=6.0
28
28
  Requires-Dist: markdown>=3.10
29
+ Requires-Dist: orjson>=3.11
29
30
  Requires-Dist: pymdown-extensions>=10.17
30
31
  Requires-Dist: PyYAML>=6.0
31
32
  Requires-Dist: requests>=2.32
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-to-confluence
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Publish Markdown files to Confluence wiki
5
5
  Author-email: Levente Hunyadi <hunyadi@gmail.com>
6
6
  Maintainer-email: Levente Hunyadi <hunyadi@gmail.com>
@@ -26,6 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: cattrs>=25.3
27
27
  Requires-Dist: lxml>=6.0
28
28
  Requires-Dist: markdown>=3.10
29
+ Requires-Dist: orjson>=3.11
29
30
  Requires-Dist: pymdown-extensions>=10.17
30
31
  Requires-Dist: PyYAML>=6.0
31
32
  Requires-Dist: requests>=2.32
@@ -1,6 +1,7 @@
1
1
  cattrs>=25.3
2
2
  lxml>=6.0
3
3
  markdown>=3.10
4
+ orjson>=3.11
4
5
  pymdown-extensions>=10.17
5
6
  PyYAML>=6.0
6
7
  requests>=2.32
@@ -5,7 +5,7 @@ Parses Markdown files, converts Markdown content into the Confluence Storage For
5
5
  Confluence API endpoints to upload images and content.
6
6
  """
7
7
 
8
- __version__ = "0.5.0"
8
+ __version__ = "0.5.1"
9
9
  __author__ = "Levente Hunyadi"
10
10
  __copyright__ = "Copyright 2022-2025, Levente Hunyadi"
11
11
  __license__ = "MIT"
@@ -6,9 +6,11 @@ Copyright 2022-2025, Levente Hunyadi
6
6
  :see: https://github.com/hunyadi/md2conf
7
7
  """
8
8
 
9
+ import sys
10
+ from datetime import datetime
9
11
  from typing import TypeVar
10
12
 
11
- from cattrs.preconf.json import make_converter
13
+ from cattrs.preconf.orjson import make_converter
12
14
 
13
15
  JsonType = None | bool | int | float | str | dict[str, "JsonType"] | list["JsonType"]
14
16
  JsonComposite = dict[str, "JsonType"] | list["JsonType"]
@@ -19,6 +21,16 @@ T = TypeVar("T")
19
21
  _converter = make_converter(forbid_extra_keys=False)
20
22
 
21
23
 
24
+ if sys.version_info < (3, 11):
25
+
26
+ @_converter.register_structure_hook
27
+ def datetime_structure_hook(value: str, cls: type[datetime]) -> datetime:
28
+ if value.endswith("Z"):
29
+ # fromisoformat() prior to Python version 3.11 does not support military time zones like "Zulu" for UTC
30
+ value = f"{value[:-1]}+00:00"
31
+ return datetime.fromisoformat(value)
32
+
33
+
22
34
  @_converter.register_structure_hook
23
35
  def json_type_structure_hook(value: JsonType, cls: type[JsonType]) -> JsonType:
24
36
  return value
@@ -49,4 +61,4 @@ def object_to_json_payload(data: object) -> bytes:
49
61
  :returns: JSON string encoded in UTF-8.
50
62
  """
51
63
 
52
- return _converter.dumps(data).encode("utf-8")
64
+ return _converter.dumps(data)
@@ -33,6 +33,7 @@ dependencies = [
33
33
  "cattrs >= 25.3",
34
34
  "lxml >= 6.0",
35
35
  "markdown >= 3.10",
36
+ "orjson >= 3.11",
36
37
  "pymdown-extensions >= 10.17",
37
38
  "PyYAML >= 6.0",
38
39
  "requests >= 2.32",
@@ -8,9 +8,11 @@ Copyright 2022-2025, Levente Hunyadi
8
8
 
9
9
  import logging
10
10
  import unittest
11
+ from datetime import datetime
11
12
 
12
13
  from md2conf.converter import attachment_name, title_to_identifier
13
14
  from md2conf.latex import LATEX_ENABLED, get_png_dimensions, remove_png_chunks, render_latex
15
+ from md2conf.serializer import json_to_object, object_to_json_payload
14
16
  from md2conf.toc import TableOfContentsBuilder, TableOfContentsEntry
15
17
  from tests.utility import TypedTestCase
16
18
 
@@ -23,6 +25,9 @@ logging.basicConfig(
23
25
  class TestUnit(TypedTestCase):
24
26
  "Simple unit tests without set-up or tear-down requirements."
25
27
 
28
+ def test_datetime(self) -> None:
29
+ self.assertEqual(object_to_json_payload(json_to_object(datetime, "2004-03-01T23:59:59Z")), b'"2004-03-01T23:59:59+00:00"')
30
+
26
31
  def test_attachment(self) -> None:
27
32
  self.assertEqual(attachment_name("image"), "image")
28
33
  self.assertEqual(attachment_name("a.png"), "a.png")