markdown-to-confluence 0.5.4__py3-none-any.whl → 0.5.5__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: markdown-to-confluence
3
- Version: 0.5.4
3
+ Version: 0.5.5
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>
@@ -27,18 +27,18 @@ Requires-Dist: cattrs>=25.3
27
27
  Requires-Dist: lxml>=6.0
28
28
  Requires-Dist: markdown>=3.10
29
29
  Requires-Dist: orjson>=3.11
30
- Requires-Dist: pymdown-extensions>=10.19
30
+ Requires-Dist: pymdown-extensions>=10.20
31
31
  Requires-Dist: PyYAML>=6.0
32
32
  Requires-Dist: requests>=2.32
33
33
  Requires-Dist: truststore>=0.10
34
- Requires-Dist: typing-extensions>=4.15; python_version < "3.12"
34
+ Requires-Dist: typing-extensions>=4.15; python_version < "3.11"
35
35
  Provides-Extra: dev
36
- Requires-Dist: markdown_doc>=0.1.6; extra == "dev"
37
- Requires-Dist: types-lxml>=2025.11.25; extra == "dev"
36
+ Requires-Dist: markdown_doc>=0.1.7; extra == "dev"
37
+ Requires-Dist: types-lxml>=2026.1.1; extra == "dev"
38
38
  Requires-Dist: types-markdown>=3.10; extra == "dev"
39
39
  Requires-Dist: types-PyYAML>=6.0; extra == "dev"
40
40
  Requires-Dist: types-requests>=2.32; extra == "dev"
41
- Requires-Dist: mypy>=1.19; extra == "dev"
41
+ Requires-Dist: mypy[faster-cache]>=1.19; extra == "dev"
42
42
  Requires-Dist: ruff>=0.14; extra == "dev"
43
43
  Provides-Extra: formulas
44
44
  Requires-Dist: matplotlib>=3.9; extra == "formulas"
@@ -612,6 +612,35 @@ This Markdown document is neither parsed, nor synchronized with Confluence.
612
612
 
613
613
  This is useful if you have a page in a hierarchy that participates in parent-child relationships but whose content is edited directly in Confluence. Specifically, these documents can be referenced with relative links from other Markdown documents in the file system tree.
614
614
 
615
+ ### Excluding content sections
616
+
617
+ When maintaining documentation in both Git repositories and Confluence, you may want certain content to appear only in the repository but not on Confluence pages. Use HTML comment markers to wrap and exclude specific sections from synchronization:
618
+
619
+ ```markdown
620
+ # Project Documentation
621
+
622
+ This content appears in both Git and Confluence.
623
+
624
+ <!-- confluence-skip-start -->
625
+ ## Internal References
626
+ - See [internal design doc](../internal/design.md)
627
+ - Related to issue #123
628
+ - Development notes for the team
629
+ <!-- confluence-skip-end -->
630
+
631
+ ## Getting Started
632
+ This section is published to Confluence.
633
+ ```
634
+
635
+ Content between `<!-- confluence-skip-start -->` and `<!-- confluence-skip-end -->` markers is removed before conversion and will not appear on the Confluence page. This is useful for:
636
+
637
+ - Repository-specific navigation and cross-references
638
+ - GitLab/GitHub-specific metadata
639
+ - Content relevant only for developers with repository access
640
+
641
+ Multiple exclusion blocks can be used in the same document.
642
+
643
+
615
644
  ### Labels
616
645
 
617
646
  If a Markdown document has the front-matter attribute `tags`, *md2conf* assigns the specified tags to the Confluence page as labels.
@@ -681,36 +710,46 @@ options:
681
710
  Use this option to set the log verbosity.
682
711
  -r ROOT_PAGE Root Confluence page to create new pages. If omitted, will raise exception when creating new pages.
683
712
  --keep-hierarchy Maintain source directory structure when exporting to Confluence.
684
- --flatten-hierarchy Flatten directories with no index.md or README.md when exporting to Confluence.
713
+ --skip-hierarchy Flatten directories with no `index.md` or `README.md` when exporting to Confluence.
685
714
  --generated-by MARKDOWN
686
- Add prompt to pages (default: 'This page has been generated with a tool.').
715
+ Add prompt to pages.
687
716
  --no-generated-by Do not add 'generated by a tool' prompt to pages.
688
717
  --skip-update Skip saving Confluence page ID in Markdown files.
689
- --render-drawio Render draw.io diagrams as image files. (Installed utility required to covert.)
718
+ --heading-anchors Place an anchor at each section heading with GitHub-style same-page identifiers.
719
+ --no-heading-anchors Omit the extra anchor from section headings. (May break manually placed same-page references.) (default)
720
+ --force-valid-url Raise an error when relative URLs point to an invalid location. (default)
721
+ --no-force-valid-url Emit a warning but otherwise ignore relative URLs that point to an invalid location.
722
+ --skip-title-heading Remove the first heading from document body when it is used as the page title (does not apply if title comes from front-matter).
723
+ --keep-title-heading Keep the first heading in document body even when used as page title. (default)
724
+ --prefer-raster Prefer PNG over SVG when both exist. (default)
725
+ --no-prefer-raster Use SVG files directly instead of preferring PNG equivalents.
726
+ --render-drawio Render draw.io diagrams as image files. (Installed utility required to covert.) (default)
690
727
  --no-render-drawio Upload draw.io diagram sources as Confluence page attachments. (Marketplace app required to display.)
691
- --render-mermaid Render Mermaid diagrams as image files. (Installed utility required to convert.)
728
+ --render-mermaid Render Mermaid diagrams as image files. (Installed utility required to convert.) (default)
692
729
  --no-render-mermaid Upload Mermaid diagram sources as Confluence page attachments. (Marketplace app required to display.)
693
- --render-plantuml Render PlantUML diagrams as image files. (Installed utility required to convert.)
730
+ --render-plantuml Render PlantUML diagrams as image files. (Installed utility required to convert.) (default)
694
731
  --no-render-plantuml Upload PlantUML diagram sources as Confluence page attachments. (Marketplace app required to display.)
695
- --render-latex Render LaTeX formulas as image files. (Matplotlib required to convert.)
732
+ --render-latex Render LaTeX formulas as image files. (Matplotlib required to convert.) (default)
696
733
  --no-render-latex Inline LaTeX formulas in Confluence page. (Marketplace app required to display.)
697
734
  --diagram-output-format {png,svg}
698
- Format for rendering Mermaid and draw.io diagrams (default: 'png').
699
- --prefer-raster Prefer PNG over SVG when both exist (default: enabled).
700
- --no-prefer-raster Use SVG files directly instead of preferring PNG equivalents.
701
- --heading-anchors Place an anchor at each section heading with GitHub-style same-page identifiers.
702
- --no-heading-anchors Don't place an anchor at each section heading.
703
- --ignore-invalid-url Emit a warning but otherwise ignore relative URLs that point to ill-specified locations.
704
- --skip-title-heading Skip the first heading from document body when it is used as the page title (does not apply if title comes from front-matter).
705
- --no-skip-title-heading
706
- Keep the first heading in document body even when used as page title (default).
707
- --title-prefix TEXT String to prepend to Confluence page title for each published page.
735
+ Format for rendering Mermaid and draw.io diagrams. (default: png)
708
736
  --webui-links Enable Confluence Web UI links. (Typically required for on-prem versions of Confluence.)
709
- --alignment {center,left,right}
710
- Alignment for block-level images and formulas (default: 'center').
711
- --max-image-width MAX_IMAGE_WIDTH
712
- Maximum display width for images [px]. Wider images are scaled down for page display. Original size kept for full-size viewing.
737
+ --no-webui-links Use hierarchical links including space and page ID. (default)
713
738
  --use-panel Transform admonitions and alerts into a Confluence custom panel.
739
+ --no-use-panel Use standard Confluence macro types for admonitions and alerts (info, tip, note and warning). (default)
740
+ --layout-image-alignment {center,left,right,None}
741
+ Alignment for block-level images and formulas.
742
+ --layout-image-max-width INT
743
+ Maximum display width for images [px]. Wider images are scaled down for page display.
744
+ --layout-table-width INT
745
+ Maximum table width in pixels.
746
+ --layout-table-display-mode {responsive,fixed}
747
+ Set table display mode. (default: responsive)
748
+ --layout-alignment {center,left,right,None}
749
+ Default alignment for block-level content.
750
+ --ignore-invalid-url Emit a warning but otherwise ignore relative URLs that point to ill-specified locations.
751
+ --title-prefix TEXT String to prepend to Confluence page title for each published page.
752
+ --line-numbers Inject line numbers in Markdown source to help localize conversion errors.
714
753
  --local Write XHTML-based Confluence Storage Format files locally without invoking Confluence API.
715
754
  --headers KEY=VALUE [KEY=VALUE ...]
716
755
  Apply custom headers to all Confluence API requests.
@@ -723,46 +762,49 @@ options:
723
762
  ```python
724
763
  from md2conf.api import ConfluenceAPI
725
764
  from md2conf.environment import ConnectionProperties
726
- from md2conf.options import ConverterOptions, DocumentOptions, ImageLayoutOptions, LayoutOptions, TableLayoutOptions
765
+ from md2conf.options import ConfluencePageID, ConverterOptions, DocumentOptions, ImageLayoutOptions, LayoutOptions, TableLayoutOptions
727
766
  from md2conf.publisher import Publisher
728
767
 
729
768
  properties = ConnectionProperties(
730
- api_url=...,
731
- domain=...,
732
- base_path=...,
733
- user_name=...,
734
- api_key=...,
735
- space_key=...,
736
- headers=...,
769
+ domain=str() or None,
770
+ base_path=str() or None,
771
+ space_key=str() or None,
772
+ api_url=str() or None,
773
+ user_name=str() or None,
774
+ api_key=str(),
775
+ headers={str(): str()} or None,
737
776
  )
738
777
  options = DocumentOptions(
739
- root_page_id=...,
740
- keep_hierarchy=...,
741
- title_prefix=...,
742
- generated_by=...,
778
+ root_page_id=ConfluencePageID() or None,
779
+ keep_hierarchy=bool(),
780
+ title_prefix=str() or None,
781
+ generated_by=str() or None,
782
+ skip_update=bool(),
743
783
  converter=ConverterOptions(
744
- heading_anchors=...,
745
- ignore_invalid_url=...,
746
- skip_title_heading=...,
747
- prefer_raster=...,
748
- render_drawio=...,
749
- render_mermaid=...,
750
- render_plantuml=...,
751
- render_latex=...,
752
- diagram_output_format=...,
753
- webui_links=...,
754
- use_panel=...,
784
+ heading_anchors=bool(),
785
+ force_valid_url=bool(),
786
+ skip_title_heading=bool(),
787
+ prefer_raster=bool(),
788
+ render_drawio=bool(),
789
+ render_mermaid=bool(),
790
+ render_plantuml=bool(),
791
+ render_latex=bool(),
792
+ diagram_output_format='png' or 'svg',
793
+ webui_links=bool(),
794
+ use_panel=bool(),
755
795
  layout=LayoutOptions(
756
796
  image=ImageLayoutOptions(
757
- alignment=...,
758
- max_width=...,
797
+ alignment='center' or 'left' or 'right' or None,
798
+ max_width=int() or None,
759
799
  ),
760
800
  table=TableLayoutOptions(
761
- width=...,
762
- display_mode=...,
801
+ width=int() or None,
802
+ display_mode='responsive' or 'fixed',
763
803
  ),
804
+ alignment='center' or 'left' or 'right' or None,
764
805
  ),
765
806
  ),
807
+ line_numbers=bool(),
766
808
  )
767
809
  with ConfluenceAPI(properties) as api:
768
810
  Publisher(api, options).process(mdpath)
@@ -1,41 +1,43 @@
1
- markdown_to_confluence-0.5.4.dist-info/licenses/LICENSE,sha256=SEEBf2BMI1LUHnDvyHnV6L12A6zTAOQcsyMvaawAXWo,1077
2
- md2conf/__init__.py,sha256=0xq0z3v7oQaJxJwZRPOd-Z4zgOOCnzgDJYa9nytHTD0,402
3
- md2conf/__main__.py,sha256=BPUZd0uzCsAOH3Y5o7ydvV7Z77jSI8fHfo4AZPyYj2c,14639
4
- md2conf/api.py,sha256=3TlUmiDU31dfL8raMwv2wQWV_IvVq6fu8j86cjKTz1A,42780
5
- md2conf/attachment.py,sha256=Nc3qGDENWBnsI6OVwMLXnk0EyEITpvov9MluDFD90ZI,1689
1
+ markdown_to_confluence-0.5.5.dist-info/licenses/LICENSE,sha256=SEEBf2BMI1LUHnDvyHnV6L12A6zTAOQcsyMvaawAXWo,1077
2
+ md2conf/__init__.py,sha256=TlQmZzCRIxd5nfwKqbjScEoeeE6okogDHEHRyXzmQBo,402
3
+ md2conf/__main__.py,sha256=4D4OiRJUY1m0UnhndIjg9bOFfAOsuyw12OzgxzypFnw,9480
4
+ md2conf/api.py,sha256=6lJnu-daNxDhOoJdTQ3GAyt6RkFSIP92iC4ptm8sNhs,43028
5
+ md2conf/attachment.py,sha256=3fGLXX3utOP9dZeZqfs9sFiwH5yFgk7ixfhKbTfUb8U,1720
6
+ md2conf/clio.py,sha256=pyiZKipOTQUqR6f0fblchPL1yAr6mM_GPCzS_-Kv1aQ,7851
6
7
  md2conf/coalesce.py,sha256=YHnqFwow5wCj6OQ3oosig01D2lxWusAScMF4HAUO2-g,1305
7
8
  md2conf/collection.py,sha256=ukN74VCa4HaGSh6tLXpLd0j_UNPywcnKI0X7usgdSCo,824
8
- md2conf/compatibility.py,sha256=4ZNN6VLqxSbI1kowdsPproGZqwxBISys4Z22vBfe6Z8,687
9
- md2conf/converter.py,sha256=7eP4sEPgmyjiD0PO3jjyS5TcDY3OSW9hYsriLd9rbek,63201
10
- md2conf/csf.py,sha256=6H9G-5cZyyWMJr0tFskPNiWdQ2Ehq-V8EhlvvxhukWY,6582
9
+ md2conf/compatibility.py,sha256=b6n_JFRlNU5Jx4RJqS7FgMp4tk0iYGFxb4--fkIsQcM,873
10
+ md2conf/converter.py,sha256=M7jILSSlY_G1WsyQ9tcZ3MsNmGH1T1GTUIiJQ0SSjlY,66627
11
+ md2conf/csf.py,sha256=w-ng621pWbECwlAwVOWrH0mszG_v9Ac0W39RtHyNa2w,8365
11
12
  md2conf/emoticon.py,sha256=0g4rkx3d58xU4nnLak5ms7i0FSDnq0WJrLVFRgGyLC8,542
12
13
  md2conf/entities.dtd,sha256=M6NzqL5N7dPs_eUA_6sDsiSLzDaAacrx9LdttiufvYU,30215
13
14
  md2conf/environment.py,sha256=TfNEz3Pyw9qe7f8i7e_kph16c09fhZ4cLNZZzIjmI18,3892
14
15
  md2conf/extension.py,sha256=_IBf_yhYb6luQM3A-vAAtCpjHay33kE4Au_SGuC3kow,2274
15
16
  md2conf/external.py,sha256=uY1G7bdqEMJW66vOvKsh5CS4oHY-YA7h2VVuaSdaqBo,2366
16
17
  md2conf/formatting.py,sha256=ygL59VgpioX069axEX-7XjKs0sUjTfIZiBE5fWmITxc,4557
17
- md2conf/frontmatter.py,sha256=iWtn_oXoLQxvCsdI3OXs1ylWGmB-gc7mMLpSGg113i4,1888
18
- md2conf/image.py,sha256=YrtcE5KhzcbjiT-oQEkk--yKSiRSPlDUtMpekoepIdo,5289
19
- md2conf/latex.py,sha256=haZKkUxSEcPj3fVmiIVZAwgszqNqGLk1GQ7i8KGHpo0,2226
18
+ md2conf/frontmatter.py,sha256=3hUvrxvopI90UxJX7BLwLkjsC6LKLVr4mJ_ctB4r-po,2263
19
+ md2conf/image.py,sha256=E9sLj9xU41pKHBo_8saBcyOuJMwNPwVQFIMmW_7QTzA,5257
20
+ md2conf/latex.py,sha256=RukmO19gvmOFIfWTyBNth1r7FlnihvX56R1EWiaNRdU,2466
20
21
  md2conf/local.py,sha256=eY3WpY-lNzLZeAfxX1ACVEhuzz0HDYX_sNQogJfkqcM,3673
21
- md2conf/markdown.py,sha256=4Km-AbQH04nDgPF0ijo-Ld7o8jTPXzENIMn7P1qIk0o,3148
22
+ md2conf/markdown.py,sha256=Okhzod811q5-AGn1dOdsYKeB8jBE0GXD2d4_k7Dk9y8,5939
22
23
  md2conf/matcher.py,sha256=Xg4YSb87iPkCzhKuKytBut6NOkEab3IM-AjzXbwy64U,6774
23
24
  md2conf/metadata.py,sha256=NOjbCIrwLgTIIeNgmo7w5JXuT-pxOXBGSg-irfdpokk,976
24
- md2conf/options.py,sha256=DLxnQBhDmDJgfEDSYyMChJi_krS1nsquOHBKg82aGrY,4500
25
+ md2conf/options.py,sha256=G6J2l7JW__bIjpTJEQfiFkX3mdB9Q1XbJoN9xduzt3k,7993
25
26
  md2conf/png.py,sha256=GU3-0dG6HqwGjedJVUciaIdA-6CdPTy_clsOQGr6dGE,6251
26
27
  md2conf/processor.py,sha256=xVLpvKg2FEO0tWsHQ8sm7YpimQepbZ07W0_yUzcvl6c,11116
27
- md2conf/publisher.py,sha256=xRIig53b4-DLncL07XBgLN3ecmTsWwNEK3ckjyhqfU8,11574
28
+ md2conf/publisher.py,sha256=n0YkMPw0YZQAUyj-PEW5RSes8YNxIEexFMSMtA7jrTY,14435
28
29
  md2conf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- md2conf/scanner.py,sha256=bupKNe47DRc8MyMLzYfgtzyVHV9osJSgnr7KCnKsMuM,3888
30
- md2conf/serializer.py,sha256=W4_yLJfT3vLw0PUg88lpUEnvn64CjaX3ZaKgIrwcxfw,1786
31
- md2conf/svg.py,sha256=fjr8sWe-tqdAKaIq2bsR9qPrhnCXUmoVRtezHZa86cg,11558
30
+ md2conf/reflection.py,sha256=9b2X9BEisVHpZY5SWv89Z5ZucZ7bO1dIKmWGiooMS68,2638
31
+ md2conf/scanner.py,sha256=2OYBUxooIm8dJBzYMxB3YjdWam6QiNA6fFi5BocvFTo,4217
32
+ md2conf/serializer.py,sha256=fkSzSIPUMSOze4NrpYsqzfFrXQiRYROO9HrueQZoeSo,2144
33
+ md2conf/svg.py,sha256=dR4dnwbjoQq9iIM4nH9PQ4SUdTrZS0BKt0hMyO4C8qE,11607
32
34
  md2conf/text.py,sha256=cnYV_JQp_v91LbQHo3qvxcEuhIdaPjCjkmLOKINcNv4,1736
33
- md2conf/toc.py,sha256=aJEH3fIzDr2RufxFbHJ8maEpezp8uXI_uw90k3-KNkA,4585
35
+ md2conf/toc.py,sha256=g1mmfcK3c4qff-oQM9dr6s_6gF7WTMbNXoxsDAsiJBY,4614
34
36
  md2conf/uri.py,sha256=my0deyR5SlppJrYCbXF1Zz94QA1JT-HTWe9pKw7AJ_A,1158
35
- md2conf/xml.py,sha256=uaaUDs0hfluNX74dfkY_Dxu1KmeNDGogpGRGpUVEfE4,5526
37
+ md2conf/xml.py,sha256=eR41FaqiketsCxTFBhwKEUW4g1ZQohvlh5J5WC3X-7Q,6690
36
38
  md2conf/drawio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
39
  md2conf/drawio/extension.py,sha256=HHLUriTfg82VCfOEyzU-6j2IM9rxR3I1UdSDdujWHgU,4409
38
- md2conf/drawio/render.py,sha256=veSu5gjm5ggLnmaH7uvH9qNeOygBJpqhSKK_LJs0QTk,8581
40
+ md2conf/drawio/render.py,sha256=BgQRIScH_JpiVX7YTY543x7hQjThskqHf_w9YQ9Y5o0,8636
39
41
  md2conf/mermaid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
42
  md2conf/mermaid/config.py,sha256=5Dec2QcdB_GtnuXIW6nhJK8J5caduNZU1oz1mcmmb44,376
41
43
  md2conf/mermaid/extension.py,sha256=1drXVM_KbS00dcjSCRru0wwbil4zq3aR81dHMhfe7zA,4021
@@ -44,12 +46,12 @@ md2conf/mermaid/render.py,sha256=zO6M5UWSKiezoxPojD8iwFnwrFEDw_P6liQi-C3LQgw,181
44
46
  md2conf/mermaid/scanner.py,sha256=oIpaNxiZBNcmggnjlyYGcIVOXcYQWjf1lEVdyIwE4xE,1379
45
47
  md2conf/plantuml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
48
  md2conf/plantuml/config.py,sha256=j0ONhkzmAPagh00ltamTKlVEvXa6R284We9pDxRy-5U,378
47
- md2conf/plantuml/extension.py,sha256=EQ-2O4d2cWBGcIHcFFXgaCNrfi357hS6IE_PsvwJ8_k,6256
49
+ md2conf/plantuml/extension.py,sha256=TPwcQHw9s76GThVQVdgcPB0THmnDFPly2Zqei6pG63I,6285
48
50
  md2conf/plantuml/render.py,sha256=Lf1It2KxHPKNGM1rhIDg9zdC3iqhRNCduByqa0_k_qw,3725
49
51
  md2conf/plantuml/scanner.py,sha256=Oso6VbHVuMaPMKMazQc_bf4hhOT5WeJN5WiVPM8peyM,1347
50
- markdown_to_confluence-0.5.4.dist-info/METADATA,sha256=bz_rRHiqV-EYCMcXCE9NMlUc8bk28SbFz9KO43YuW0E,45324
51
- markdown_to_confluence-0.5.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
- markdown_to_confluence-0.5.4.dist-info/entry_points.txt,sha256=F1zxa1wtEObtbHS-qp46330WVFLHdMnV2wQ-ZorRmX0,50
53
- markdown_to_confluence-0.5.4.dist-info/top_level.txt,sha256=_FJfl_kHrHNidyjUOuS01ngu_jDsfc-ZjSocNRJnTzU,8
54
- markdown_to_confluence-0.5.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
55
- markdown_to_confluence-0.5.4.dist-info/RECORD,,
52
+ markdown_to_confluence-0.5.5.dist-info/METADATA,sha256=zpy0fBKhzk-S2JcDLMZefDDTI5jrF1hTfIQkY7zyKg0,47514
53
+ markdown_to_confluence-0.5.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
54
+ markdown_to_confluence-0.5.5.dist-info/entry_points.txt,sha256=F1zxa1wtEObtbHS-qp46330WVFLHdMnV2wQ-ZorRmX0,50
55
+ markdown_to_confluence-0.5.5.dist-info/top_level.txt,sha256=_FJfl_kHrHNidyjUOuS01ngu_jDsfc-ZjSocNRJnTzU,8
56
+ markdown_to_confluence-0.5.5.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
57
+ markdown_to_confluence-0.5.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
md2conf/__init__.py CHANGED
@@ -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.4"
8
+ __version__ = "0.5.5"
9
9
  __author__ = "Levente Hunyadi"
10
10
  __copyright__ = "Copyright 2022-2026, Levente Hunyadi"
11
11
  __license__ = "MIT"
md2conf/__main__.py CHANGED
@@ -17,15 +17,16 @@ import typing
17
17
  from io import StringIO
18
18
  from pathlib import Path
19
19
  from types import TracebackType
20
- from typing import Any, Iterable, Literal, Sequence
20
+ from typing import Any, Iterable, Sequence
21
21
 
22
22
  from requests.exceptions import HTTPError, JSONDecodeError
23
23
 
24
24
  from . import __version__
25
+ from .clio import add_arguments, get_options
25
26
  from .compatibility import override
26
27
  from .environment import ArgumentError, ConfluenceSiteProperties, ConnectionProperties
27
28
  from .metadata import ConfluenceSiteMetadata
28
- from .options import ConfluencePageID, ConverterOptions, DocumentOptions, ImageLayoutOptions, LayoutOptions
29
+ from .options import ConfluencePageID, ConverterOptions, DocumentOptions
29
30
 
30
31
  LOGGER = logging.getLogger(__name__)
31
32
 
@@ -39,26 +40,14 @@ class Arguments(argparse.Namespace):
39
40
  api_key: str | None
40
41
  space: str | None
41
42
  loglevel: str
42
- heading_anchors: bool
43
- ignore_invalid_url: bool
44
43
  root_page: str | None
45
44
  keep_hierarchy: bool
46
- skip_title_heading: bool
47
45
  title_prefix: str | None
48
46
  generated_by: str | None
49
47
  skip_update: bool
50
- prefer_raster: bool
51
- render_drawio: bool
52
- render_mermaid: bool
53
- render_plantuml: bool
54
- render_latex: bool
55
- diagram_output_format: Literal["png", "svg"]
48
+ line_numbers: bool
56
49
  local: bool
57
50
  headers: dict[str, str]
58
- webui_links: bool
59
- alignment: Literal["center", "left", "right"]
60
- max_image_width: int | None
61
- use_panel: bool
62
51
 
63
52
 
64
53
  class KwargsAppendAction(argparse.Action):
@@ -129,16 +118,7 @@ def get_parser() -> argparse.ArgumentParser:
129
118
  parser.add_argument(
130
119
  "-l",
131
120
  "--loglevel",
132
- choices=[
133
- logging.getLevelName(level).lower()
134
- for level in (
135
- logging.DEBUG,
136
- logging.INFO,
137
- logging.WARN,
138
- logging.ERROR,
139
- logging.CRITICAL,
140
- )
141
- ],
121
+ choices=[logging.getLevelName(level).lower() for level in (logging.DEBUG, logging.INFO, logging.WARN, logging.ERROR, logging.CRITICAL)],
142
122
  default=logging.getLevelName(logging.INFO),
143
123
  help="Use this option to set the log verbosity.",
144
124
  )
@@ -154,16 +134,16 @@ def get_parser() -> argparse.ArgumentParser:
154
134
  help="Maintain source directory structure when exporting to Confluence.",
155
135
  )
156
136
  parser.add_argument(
157
- "--flatten-hierarchy",
137
+ "--skip-hierarchy",
158
138
  dest="keep_hierarchy",
159
139
  action="store_false",
160
- help="Flatten directories with no index.md or README.md when exporting to Confluence.",
140
+ help="Flatten directories with no `index.md` or `README.md` when exporting to Confluence.",
161
141
  )
162
142
  parser.add_argument(
163
143
  "--generated-by",
164
144
  default="This page has been generated with a tool.",
165
145
  metavar="MARKDOWN",
166
- help="Add prompt to pages (default: 'This page has been generated with a tool.').",
146
+ help="Add prompt to pages.",
167
147
  )
168
148
  parser.add_argument(
169
149
  "--no-generated-by",
@@ -178,108 +158,15 @@ def get_parser() -> argparse.ArgumentParser:
178
158
  default=False,
179
159
  help="Skip saving Confluence page ID in Markdown files.",
180
160
  )
181
- parser.add_argument(
182
- "--render-drawio",
183
- dest="render_drawio",
184
- action="store_true",
185
- default=True,
186
- help="Render draw.io diagrams as image files. (Installed utility required to covert.)",
187
- )
188
- parser.add_argument(
189
- "--no-render-drawio",
190
- dest="render_drawio",
191
- action="store_false",
192
- help="Upload draw.io diagram sources as Confluence page attachments. (Marketplace app required to display.)",
193
- )
194
- parser.add_argument(
195
- "--render-mermaid",
196
- dest="render_mermaid",
197
- action="store_true",
198
- default=True,
199
- help="Render Mermaid diagrams as image files. (Installed utility required to convert.)",
200
- )
201
- parser.add_argument(
202
- "--no-render-mermaid",
203
- dest="render_mermaid",
204
- action="store_false",
205
- help="Upload Mermaid diagram sources as Confluence page attachments. (Marketplace app required to display.)",
206
- )
207
- parser.add_argument(
208
- "--render-plantuml",
209
- dest="render_plantuml",
210
- action="store_true",
211
- default=True,
212
- help="Render PlantUML diagrams as image files. (Installed utility required to convert.)",
213
- )
214
- parser.add_argument(
215
- "--no-render-plantuml",
216
- dest="render_plantuml",
217
- action="store_false",
218
- help="Upload PlantUML diagram sources as Confluence page attachments. (Marketplace app required to display.)",
219
- )
220
- parser.add_argument(
221
- "--render-latex",
222
- dest="render_latex",
223
- action="store_true",
224
- default=True,
225
- help="Render LaTeX formulas as image files. (Matplotlib required to convert.)",
226
- )
227
- parser.add_argument(
228
- "--no-render-latex",
229
- dest="render_latex",
230
- action="store_false",
231
- help="Inline LaTeX formulas in Confluence page. (Marketplace app required to display.)",
232
- )
233
- parser.add_argument(
234
- "--diagram-output-format",
235
- dest="diagram_output_format",
236
- choices=["png", "svg"],
237
- default="png",
238
- help="Format for rendering Mermaid and draw.io diagrams (default: 'png').",
239
- )
240
- parser.add_argument(
241
- "--prefer-raster",
242
- dest="prefer_raster",
243
- action="store_true",
244
- default=True,
245
- help="Prefer PNG over SVG when both exist (default: enabled).",
246
- )
247
- parser.add_argument(
248
- "--no-prefer-raster",
249
- dest="prefer_raster",
250
- action="store_false",
251
- help="Use SVG files directly instead of preferring PNG equivalents.",
252
- )
253
- parser.add_argument(
254
- "--heading-anchors",
255
- action="store_true",
256
- default=False,
257
- help="Place an anchor at each section heading with GitHub-style same-page identifiers.",
258
- )
259
- parser.add_argument(
260
- "--no-heading-anchors",
261
- action="store_false",
262
- dest="heading_anchors",
263
- help="Don't place an anchor at each section heading.",
264
- )
265
- parser.add_argument(
266
- "--ignore-invalid-url",
267
- action="store_true",
268
- default=False,
269
- help="Emit a warning but otherwise ignore relative URLs that point to ill-specified locations.",
270
- )
271
- parser.add_argument(
272
- "--skip-title-heading",
273
- action="store_true",
274
- default=False,
275
- help="Skip the first heading from document body when it is used as the page title (does not apply if title comes from front-matter).",
276
- )
277
- parser.add_argument(
278
- "--no-skip-title-heading",
279
- dest="skip_title_heading",
280
- action="store_false",
281
- help="Keep the first heading in document body even when used as page title (default).",
282
- )
161
+ add_arguments(parser, ConverterOptions)
162
+ if sys.version_info >= (3, 13):
163
+ parser.add_argument(
164
+ "--ignore-invalid-url",
165
+ dest="force_valid_url",
166
+ action="store_false",
167
+ help="Emit a warning but otherwise ignore relative URLs that point to ill-specified locations.",
168
+ deprecated=True,
169
+ )
283
170
  parser.add_argument(
284
171
  "--title-prefix",
285
172
  default=None,
@@ -287,30 +174,11 @@ def get_parser() -> argparse.ArgumentParser:
287
174
  help="String to prepend to Confluence page title for each published page.",
288
175
  )
289
176
  parser.add_argument(
290
- "--webui-links",
291
- action="store_true",
292
- default=False,
293
- help="Enable Confluence Web UI links. (Typically required for on-prem versions of Confluence.)",
294
- )
295
- parser.add_argument(
296
- "--alignment",
297
- dest="alignment",
298
- choices=["center", "left", "right"],
299
- default="center",
300
- help="Alignment for block-level images and formulas (default: 'center').",
301
- )
302
- parser.add_argument(
303
- "--max-image-width",
304
- dest="max_image_width",
305
- type=int,
306
- default=None,
307
- help="Maximum display width for images [px]. Wider images are scaled down for page display. Original size kept for full-size viewing.",
308
- )
309
- parser.add_argument(
310
- "--use-panel",
177
+ "--line-numbers",
178
+ dest="line_numbers",
311
179
  action="store_true",
312
180
  default=False,
313
- help="Transform admonitions and alerts into a Confluence custom panel.",
181
+ help="Inject line numbers in Markdown source to help localize conversion errors.",
314
182
  )
315
183
  parser.add_argument(
316
184
  "--local",
@@ -353,7 +221,7 @@ def _exception_hook(exc_type: type[BaseException], exc_value: BaseException, tra
353
221
  ex = ex.__cause__
354
222
 
355
223
 
356
- sys.excepthook = _exception_hook
224
+ sys.excepthook = _exception_hook # spellchecker:disable-line
357
225
 
358
226
 
359
227
  def main() -> None:
@@ -372,25 +240,8 @@ def main() -> None:
372
240
  title_prefix=args.title_prefix,
373
241
  generated_by=args.generated_by,
374
242
  skip_update=args.skip_update,
375
- converter=ConverterOptions(
376
- heading_anchors=args.heading_anchors,
377
- ignore_invalid_url=args.ignore_invalid_url,
378
- skip_title_heading=args.skip_title_heading,
379
- prefer_raster=args.prefer_raster,
380
- render_drawio=args.render_drawio,
381
- render_mermaid=args.render_mermaid,
382
- render_plantuml=args.render_plantuml,
383
- render_latex=args.render_latex,
384
- diagram_output_format=args.diagram_output_format,
385
- webui_links=args.webui_links,
386
- use_panel=args.use_panel,
387
- layout=LayoutOptions(
388
- image=ImageLayoutOptions(
389
- alignment=args.alignment,
390
- max_width=args.max_image_width,
391
- ),
392
- ),
393
- ),
243
+ converter=get_options(args, ConverterOptions),
244
+ line_numbers=args.line_numbers,
394
245
  )
395
246
  if args.local:
396
247
  from .local import LocalConverter