markdown-to-confluence 0.4.0__tar.gz → 0.4.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 (72) hide show
  1. markdown_to_confluence-0.4.1/MANIFEST.in +7 -0
  2. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/PKG-INFO +33 -11
  3. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/README.md +16 -0
  4. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/PKG-INFO +33 -11
  5. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/SOURCES.txt +34 -2
  6. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/requires.txt +12 -5
  7. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/__init__.py +1 -1
  8. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/__main__.py +4 -12
  9. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/api.py +189 -62
  10. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/application.py +24 -47
  11. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/converter.py +83 -69
  12. markdown_to_confluence-0.4.1/md2conf/extra.py +27 -0
  13. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/local.py +4 -12
  14. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/matcher.py +1 -3
  15. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/mermaid.py +2 -7
  16. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/processor.py +16 -34
  17. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/properties.py +45 -12
  18. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/scanner.py +10 -9
  19. markdown_to_confluence-0.4.1/pyproject.toml +76 -0
  20. markdown_to_confluence-0.4.1/setup.cfg +4 -0
  21. markdown_to_confluence-0.4.1/tests/__init__.py +0 -0
  22. markdown_to_confluence-0.4.1/tests/source/admonition.md +20 -0
  23. markdown_to_confluence-0.4.1/tests/source/alert.md +56 -0
  24. markdown_to_confluence-0.4.1/tests/source/anchors.md +13 -0
  25. markdown_to_confluence-0.4.1/tests/source/basic.md +65 -0
  26. markdown_to_confluence-0.4.1/tests/source/code.md +38 -0
  27. markdown_to_confluence-0.4.1/tests/source/collapsed.md +24 -0
  28. markdown_to_confluence-0.4.1/tests/source/fenced.md +25 -0
  29. markdown_to_confluence-0.4.1/tests/source/figure/raster.png +0 -0
  30. markdown_to_confluence-0.4.1/tests/source/figure/vector.svg +4 -0
  31. markdown_to_confluence-0.4.1/tests/source/ignore.md +3 -0
  32. markdown_to_confluence-0.4.1/tests/source/images/images.md +5 -0
  33. markdown_to_confluence-0.4.1/tests/source/images.md +11 -0
  34. markdown_to_confluence-0.4.1/tests/source/mermaid.md +135 -0
  35. markdown_to_confluence-0.4.1/tests/source/missing.md +7 -0
  36. markdown_to_confluence-0.4.1/tests/source/sections.md +18 -0
  37. markdown_to_confluence-0.4.1/tests/source/tags.md +21 -0
  38. markdown_to_confluence-0.4.1/tests/source/title.md +19 -0
  39. markdown_to_confluence-0.4.1/tests/target/admonition.xml +37 -0
  40. markdown_to_confluence-0.4.1/tests/target/alert.xml +67 -0
  41. markdown_to_confluence-0.4.1/tests/target/anchors.xml +11 -0
  42. markdown_to_confluence-0.4.1/tests/target/basic.xml +59 -0
  43. markdown_to_confluence-0.4.1/tests/target/code.xml +39 -0
  44. markdown_to_confluence-0.4.1/tests/target/collapsed.xml +25 -0
  45. markdown_to_confluence-0.4.1/tests/target/fenced.xml +32 -0
  46. markdown_to_confluence-0.4.1/tests/target/images/images.xml +12 -0
  47. markdown_to_confluence-0.4.1/tests/target/images.xml +27 -0
  48. markdown_to_confluence-0.4.1/tests/target/mermaid.xml +113 -0
  49. markdown_to_confluence-0.4.1/tests/target/missing.xml +13 -0
  50. markdown_to_confluence-0.4.1/tests/target/sections.xml +11 -0
  51. markdown_to_confluence-0.4.1/tests/target/tags.xml +31 -0
  52. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/tests/test_conversion.py +23 -13
  53. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/tests/test_matcher.py +2 -10
  54. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/tests/test_processor.py +2 -6
  55. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/tests/test_scanner.py +1 -3
  56. markdown_to_confluence-0.4.1/tests/test_unit.py +33 -0
  57. markdown_to_confluence-0.4.0/md2conf/extra.py +0 -14
  58. markdown_to_confluence-0.4.0/pyproject.toml +0 -3
  59. markdown_to_confluence-0.4.0/setup.cfg +0 -64
  60. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/LICENSE +0 -0
  61. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/dependency_links.txt +0 -0
  62. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/entry_points.txt +0 -0
  63. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/top_level.txt +0 -0
  64. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/markdown_to_confluence.egg-info/zip-safe +0 -0
  65. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/collection.py +0 -0
  66. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/emoji.py +0 -0
  67. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/entities.dtd +0 -0
  68. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/metadata.py +0 -0
  69. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/puppeteer-config.json +0 -0
  70. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/md2conf/py.typed +0 -0
  71. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/setup.py +0 -0
  72. {markdown_to_confluence-0.4.0 → markdown_to_confluence-0.4.1}/tests/test_mermaid.py +0 -0
@@ -0,0 +1,7 @@
1
+ recursive-include tests *.py
2
+ recursive-include tests *.md
3
+ recursive-include tests *.png
4
+ recursive-include tests *.svg
5
+ recursive-include tests *.xml
6
+ exclude tests/source/emoji.md
7
+ exclude tests/target/emoji.xml
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-to-confluence
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Publish Markdown files to Confluence wiki
5
- Home-page: https://github.com/hunyadi/md2conf
6
- Author: Levente Hunyadi
7
- Author-email: hunyadi@gmail.com
8
- License: MIT
5
+ Author-email: Levente Hunyadi <hunyadi@gmail.com>
6
+ Maintainer-email: Levente Hunyadi <hunyadi@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/hunyadi/md2conf
9
+ Project-URL: Source, https://github.com/hunyadi/md2conf
10
+ Keywords: markdown,converter,confluence
9
11
  Classifier: Development Status :: 5 - Production/Stable
10
12
  Classifier: Environment :: Console
11
13
  Classifier: Intended Audience :: End Users/Desktop
12
- Classifier: License :: OSI Approved :: MIT License
13
14
  Classifier: Operating System :: OS Independent
14
15
  Classifier: Programming Language :: Python :: 3
15
16
  Classifier: Programming Language :: Python :: 3.9
@@ -17,21 +18,26 @@ Classifier: Programming Language :: Python :: 3.10
17
18
  Classifier: Programming Language :: Python :: 3.11
18
19
  Classifier: Programming Language :: Python :: 3.12
19
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3 :: Only
20
22
  Classifier: Typing :: Typed
21
23
  Requires-Python: >=3.9
22
24
  Description-Content-Type: text/markdown
23
25
  License-File: LICENSE
24
26
  Requires-Dist: json_strong_typing>=0.3.9
25
- Requires-Dist: lxml>=5.4
26
- Requires-Dist: types-lxml>=2025.3.30
27
+ Requires-Dist: lxml>=6.0
27
28
  Requires-Dist: markdown>=3.8
28
- Requires-Dist: types-markdown>=3.8
29
29
  Requires-Dist: pymdown-extensions>=10.16
30
30
  Requires-Dist: PyYAML>=6.0
31
- Requires-Dist: types-PyYAML>=6.0
32
31
  Requires-Dist: requests>=2.32
33
- Requires-Dist: types-requests>=2.32
34
32
  Requires-Dist: typing_extensions>=4.14; python_version < "3.12"
33
+ Provides-Extra: dev
34
+ Requires-Dist: markdown_doc>=0.1.4; python_version >= "3.10" and extra == "dev"
35
+ Requires-Dist: types-lxml>=2025.3.30; extra == "dev"
36
+ Requires-Dist: types-markdown>=3.8; extra == "dev"
37
+ Requires-Dist: types-PyYAML>=6.0; extra == "dev"
38
+ Requires-Dist: types-requests>=2.32; extra == "dev"
39
+ Requires-Dist: mypy>=1.16; extra == "dev"
40
+ Requires-Dist: ruff>=0.12; extra == "dev"
35
41
  Dynamic: license-file
36
42
 
37
43
  # Publish Markdown files to Confluence wiki
@@ -326,6 +332,22 @@ Any previously assigned labels are discarded. As per Confluence terminology, new
326
332
 
327
333
  If a document has no `tags` attribute, existing Confluence labels are left intact.
328
334
 
335
+ ### Content properties
336
+
337
+ The front-matter attribute `properties` in a Markdown document allows setting Confluence content properties on a page. Confluence content properties are a way to store structured metadata in the form of key-value pairs directly on Confluence content. The values in content properties are represented as JSON objects.
338
+
339
+ Some content properties have special meaning to Confluence. For example, the following properties cause Confluence to display a wiki page with content confined to a fixed width in regular view mode, and taking the full page width in draft mode:
340
+
341
+ ```yaml
342
+ ---
343
+ properties:
344
+ content-appearance-published: fixed-width
345
+ content-appearance-draft: full-width
346
+ ---
347
+ ```
348
+
349
+ The attribute `properties` is parsed as a dictionary with keys of type string and values of type JSON. *md2conf* passes JSON values to Confluence REST API unchanged.
350
+
329
351
  ### Converting diagrams
330
352
 
331
353
  You can include [Mermaid diagrams](https://mermaid.js.org/) in your Markdown documents to create visual representations of systems, processes, and relationships. When a Markdown document contains a code block with the language specifier `mermaid`, *md2conf* offers two options to publish the diagram:
@@ -290,6 +290,22 @@ Any previously assigned labels are discarded. As per Confluence terminology, new
290
290
 
291
291
  If a document has no `tags` attribute, existing Confluence labels are left intact.
292
292
 
293
+ ### Content properties
294
+
295
+ The front-matter attribute `properties` in a Markdown document allows setting Confluence content properties on a page. Confluence content properties are a way to store structured metadata in the form of key-value pairs directly on Confluence content. The values in content properties are represented as JSON objects.
296
+
297
+ Some content properties have special meaning to Confluence. For example, the following properties cause Confluence to display a wiki page with content confined to a fixed width in regular view mode, and taking the full page width in draft mode:
298
+
299
+ ```yaml
300
+ ---
301
+ properties:
302
+ content-appearance-published: fixed-width
303
+ content-appearance-draft: full-width
304
+ ---
305
+ ```
306
+
307
+ The attribute `properties` is parsed as a dictionary with keys of type string and values of type JSON. *md2conf* passes JSON values to Confluence REST API unchanged.
308
+
293
309
  ### Converting diagrams
294
310
 
295
311
  You can include [Mermaid diagrams](https://mermaid.js.org/) in your Markdown documents to create visual representations of systems, processes, and relationships. When a Markdown document contains a code block with the language specifier `mermaid`, *md2conf* offers two options to publish the diagram:
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-to-confluence
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Publish Markdown files to Confluence wiki
5
- Home-page: https://github.com/hunyadi/md2conf
6
- Author: Levente Hunyadi
7
- Author-email: hunyadi@gmail.com
8
- License: MIT
5
+ Author-email: Levente Hunyadi <hunyadi@gmail.com>
6
+ Maintainer-email: Levente Hunyadi <hunyadi@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/hunyadi/md2conf
9
+ Project-URL: Source, https://github.com/hunyadi/md2conf
10
+ Keywords: markdown,converter,confluence
9
11
  Classifier: Development Status :: 5 - Production/Stable
10
12
  Classifier: Environment :: Console
11
13
  Classifier: Intended Audience :: End Users/Desktop
12
- Classifier: License :: OSI Approved :: MIT License
13
14
  Classifier: Operating System :: OS Independent
14
15
  Classifier: Programming Language :: Python :: 3
15
16
  Classifier: Programming Language :: Python :: 3.9
@@ -17,21 +18,26 @@ Classifier: Programming Language :: Python :: 3.10
17
18
  Classifier: Programming Language :: Python :: 3.11
18
19
  Classifier: Programming Language :: Python :: 3.12
19
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3 :: Only
20
22
  Classifier: Typing :: Typed
21
23
  Requires-Python: >=3.9
22
24
  Description-Content-Type: text/markdown
23
25
  License-File: LICENSE
24
26
  Requires-Dist: json_strong_typing>=0.3.9
25
- Requires-Dist: lxml>=5.4
26
- Requires-Dist: types-lxml>=2025.3.30
27
+ Requires-Dist: lxml>=6.0
27
28
  Requires-Dist: markdown>=3.8
28
- Requires-Dist: types-markdown>=3.8
29
29
  Requires-Dist: pymdown-extensions>=10.16
30
30
  Requires-Dist: PyYAML>=6.0
31
- Requires-Dist: types-PyYAML>=6.0
32
31
  Requires-Dist: requests>=2.32
33
- Requires-Dist: types-requests>=2.32
34
32
  Requires-Dist: typing_extensions>=4.14; python_version < "3.12"
33
+ Provides-Extra: dev
34
+ Requires-Dist: markdown_doc>=0.1.4; python_version >= "3.10" and extra == "dev"
35
+ Requires-Dist: types-lxml>=2025.3.30; extra == "dev"
36
+ Requires-Dist: types-markdown>=3.8; extra == "dev"
37
+ Requires-Dist: types-PyYAML>=6.0; extra == "dev"
38
+ Requires-Dist: types-requests>=2.32; extra == "dev"
39
+ Requires-Dist: mypy>=1.16; extra == "dev"
40
+ Requires-Dist: ruff>=0.12; extra == "dev"
35
41
  Dynamic: license-file
36
42
 
37
43
  # Publish Markdown files to Confluence wiki
@@ -326,6 +332,22 @@ Any previously assigned labels are discarded. As per Confluence terminology, new
326
332
 
327
333
  If a document has no `tags` attribute, existing Confluence labels are left intact.
328
334
 
335
+ ### Content properties
336
+
337
+ The front-matter attribute `properties` in a Markdown document allows setting Confluence content properties on a page. Confluence content properties are a way to store structured metadata in the form of key-value pairs directly on Confluence content. The values in content properties are represented as JSON objects.
338
+
339
+ Some content properties have special meaning to Confluence. For example, the following properties cause Confluence to display a wiki page with content confined to a fixed width in regular view mode, and taking the full page width in draft mode:
340
+
341
+ ```yaml
342
+ ---
343
+ properties:
344
+ content-appearance-published: fixed-width
345
+ content-appearance-draft: full-width
346
+ ---
347
+ ```
348
+
349
+ The attribute `properties` is parsed as a dictionary with keys of type string and values of type JSON. *md2conf* passes JSON values to Confluence REST API unchanged.
350
+
329
351
  ### Converting diagrams
330
352
 
331
353
  You can include [Mermaid diagrams](https://mermaid.js.org/) in your Markdown documents to create visual representations of systems, processes, and relationships. When a Markdown document contains a code block with the language specifier `mermaid`, *md2conf* offers two options to publish the diagram:
@@ -1,7 +1,7 @@
1
1
  LICENSE
2
+ MANIFEST.in
2
3
  README.md
3
4
  pyproject.toml
4
- setup.cfg
5
5
  setup.py
6
6
  markdown_to_confluence.egg-info/PKG-INFO
7
7
  markdown_to_confluence.egg-info/SOURCES.txt
@@ -28,8 +28,40 @@ md2conf/properties.py
28
28
  md2conf/puppeteer-config.json
29
29
  md2conf/py.typed
30
30
  md2conf/scanner.py
31
+ tests/__init__.py
31
32
  tests/test_conversion.py
32
33
  tests/test_matcher.py
33
34
  tests/test_mermaid.py
34
35
  tests/test_processor.py
35
- tests/test_scanner.py
36
+ tests/test_scanner.py
37
+ tests/test_unit.py
38
+ tests/source/admonition.md
39
+ tests/source/alert.md
40
+ tests/source/anchors.md
41
+ tests/source/basic.md
42
+ tests/source/code.md
43
+ tests/source/collapsed.md
44
+ tests/source/fenced.md
45
+ tests/source/ignore.md
46
+ tests/source/images.md
47
+ tests/source/mermaid.md
48
+ tests/source/missing.md
49
+ tests/source/sections.md
50
+ tests/source/tags.md
51
+ tests/source/title.md
52
+ tests/source/figure/raster.png
53
+ tests/source/figure/vector.svg
54
+ tests/source/images/images.md
55
+ tests/target/admonition.xml
56
+ tests/target/alert.xml
57
+ tests/target/anchors.xml
58
+ tests/target/basic.xml
59
+ tests/target/code.xml
60
+ tests/target/collapsed.xml
61
+ tests/target/fenced.xml
62
+ tests/target/images.xml
63
+ tests/target/mermaid.xml
64
+ tests/target/missing.xml
65
+ tests/target/sections.xml
66
+ tests/target/tags.xml
67
+ tests/target/images/images.xml
@@ -1,13 +1,20 @@
1
1
  json_strong_typing>=0.3.9
2
- lxml>=5.4
3
- types-lxml>=2025.3.30
2
+ lxml>=6.0
4
3
  markdown>=3.8
5
- types-markdown>=3.8
6
4
  pymdown-extensions>=10.16
7
5
  PyYAML>=6.0
8
- types-PyYAML>=6.0
9
6
  requests>=2.32
10
- types-requests>=2.32
11
7
 
12
8
  [:python_version < "3.12"]
13
9
  typing_extensions>=4.14
10
+
11
+ [dev]
12
+ types-lxml>=2025.3.30
13
+ types-markdown>=3.8
14
+ types-PyYAML>=6.0
15
+ types-requests>=2.32
16
+ mypy>=1.16
17
+ ruff>=0.12
18
+
19
+ [dev:python_version >= "3.10"]
20
+ markdown_doc>=0.1.4
@@ -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.4.0"
8
+ __version__ = "0.4.1"
9
9
  __author__ = "Levente Hunyadi"
10
10
  __copyright__ = "Copyright 2022-2025, Levente Hunyadi"
11
11
  __license__ = "MIT"
@@ -26,11 +26,7 @@ from .converter import ConfluenceDocumentOptions, ConfluencePageID
26
26
  from .extra import override
27
27
  from .local import LocalConverter
28
28
  from .metadata import ConfluenceSiteMetadata
29
- from .properties import (
30
- ArgumentError,
31
- ConfluenceConnectionProperties,
32
- ConfluenceSiteProperties,
33
- )
29
+ from .properties import ArgumentError, ConfluenceConnectionProperties, ConfluenceSiteProperties
34
30
 
35
31
 
36
32
  class Arguments(argparse.Namespace):
@@ -71,7 +67,7 @@ class KwargsAppendAction(argparse.Action):
71
67
  raise argparse.ArgumentError(
72
68
  self,
73
69
  f'Could not parse argument "{values}". It should follow the format: k1=v1 k2=v2 ...',
74
- )
70
+ ) from None
75
71
  setattr(namespace, self.dest, d)
76
72
 
77
73
 
@@ -79,13 +75,9 @@ def main() -> None:
79
75
  parser = argparse.ArgumentParser()
80
76
  parser.prog = os.path.basename(os.path.dirname(__file__))
81
77
  parser.add_argument("--version", action="version", version=__version__)
82
- parser.add_argument(
83
- "mdpath", help="Path to Markdown file or directory to convert and publish."
84
- )
78
+ parser.add_argument("mdpath", help="Path to Markdown file or directory to convert and publish.")
85
79
  parser.add_argument("-d", "--domain", help="Confluence organization domain.")
86
- parser.add_argument(
87
- "-p", "--path", help="Base path for Confluence (default: '/wiki/')."
88
- )
80
+ parser.add_argument("-p", "--path", help="Base path for Confluence (default: '/wiki/').")
89
81
  parser.add_argument(
90
82
  "--api-url",
91
83
  dest="api_url",