umbraci.confluence-markdown-exporter 1.0.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.
Files changed (102) hide show
  1. umbraci_confluence_markdown_exporter-1.0.0/.dockerignore +18 -0
  2. umbraci_confluence_markdown_exporter-1.0.0/.github/FUNDING.yml +3 -0
  3. umbraci_confluence_markdown_exporter-1.0.0/.github/ISSUE_TEMPLATE/1_bug_report.yaml +83 -0
  4. umbraci_confluence_markdown_exporter-1.0.0/.github/ISSUE_TEMPLATE/2_feature_request.yaml +56 -0
  5. umbraci_confluence_markdown_exporter-1.0.0/.github/ISSUE_TEMPLATE/3_question.yaml +38 -0
  6. umbraci_confluence_markdown_exporter-1.0.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  7. umbraci_confluence_markdown_exporter-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  8. umbraci_confluence_markdown_exporter-1.0.0/.github/dependabot.yml +10 -0
  9. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/docker-build.yml +51 -0
  10. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/docker-publish.yml +86 -0
  11. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/docs.yml +57 -0
  12. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/publish-fork.yml +50 -0
  13. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/python-build.yml +52 -0
  14. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/python-publish.yml +73 -0
  15. umbraci_confluence_markdown_exporter-1.0.0/.github/workflows/release.yml +113 -0
  16. umbraci_confluence_markdown_exporter-1.0.0/.gitignore +145 -0
  17. umbraci_confluence_markdown_exporter-1.0.0/.python-version +1 -0
  18. umbraci_confluence_markdown_exporter-1.0.0/.vscode/extensions.json +14 -0
  19. umbraci_confluence_markdown_exporter-1.0.0/.vscode/launch.json +113 -0
  20. umbraci_confluence_markdown_exporter-1.0.0/.vscode/settings.json +48 -0
  21. umbraci_confluence_markdown_exporter-1.0.0/.vscode/tasks.json +4 -0
  22. umbraci_confluence_markdown_exporter-1.0.0/CONTRIBUTING.md +276 -0
  23. umbraci_confluence_markdown_exporter-1.0.0/Dockerfile +55 -0
  24. umbraci_confluence_markdown_exporter-1.0.0/LICENSE +21 -0
  25. umbraci_confluence_markdown_exporter-1.0.0/PKG-INFO +135 -0
  26. umbraci_confluence_markdown_exporter-1.0.0/README.md +109 -0
  27. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/__init__.py +9 -0
  28. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/api_clients.py +422 -0
  29. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/config.py +356 -0
  30. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/confluence.py +4770 -0
  31. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/main.py +583 -0
  32. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/__init__.py +0 -0
  33. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/app_data_store.py +993 -0
  34. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/config_interactive.py +802 -0
  35. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/drawio_converter.py +132 -0
  36. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/export.py +163 -0
  37. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/lockfile.py +445 -0
  38. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/measure_time.py +95 -0
  39. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/page_registry.py +56 -0
  40. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/rich_console.py +317 -0
  41. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/table_converter.py +367 -0
  42. umbraci_confluence_markdown_exporter-1.0.0/confluence_markdown_exporter/utils/type_converter.py +12 -0
  43. umbraci_confluence_markdown_exporter-1.0.0/docs/compatibility.md +14 -0
  44. umbraci_confluence_markdown_exporter-1.0.0/docs/configuration/authentication.md +104 -0
  45. umbraci_confluence_markdown_exporter-1.0.0/docs/configuration/ci.md +55 -0
  46. umbraci_confluence_markdown_exporter-1.0.0/docs/configuration/index.md +118 -0
  47. umbraci_confluence_markdown_exporter-1.0.0/docs/configuration/options.md +571 -0
  48. umbraci_confluence_markdown_exporter-1.0.0/docs/configuration/target-systems.md +0 -0
  49. umbraci_confluence_markdown_exporter-1.0.0/docs/contributing.md +30 -0
  50. umbraci_confluence_markdown_exporter-1.0.0/docs/docker.md +101 -0
  51. umbraci_confluence_markdown_exporter-1.0.0/docs/features.md +44 -0
  52. umbraci_confluence_markdown_exporter-1.0.0/docs/img/favicon.png +0 -0
  53. umbraci_confluence_markdown_exporter-1.0.0/docs/img/favicon.svg +7 -0
  54. umbraci_confluence_markdown_exporter-1.0.0/docs/img/logo.png +0 -0
  55. umbraci_confluence_markdown_exporter-1.0.0/docs/index.md +124 -0
  56. umbraci_confluence_markdown_exporter-1.0.0/docs/installation.md +108 -0
  57. umbraci_confluence_markdown_exporter-1.0.0/docs/intro.md +101 -0
  58. umbraci_confluence_markdown_exporter-1.0.0/docs/stylesheets/extra.css +31 -0
  59. umbraci_confluence_markdown_exporter-1.0.0/docs/troubleshooting.md +40 -0
  60. umbraci_confluence_markdown_exporter-1.0.0/docs/usage.md +107 -0
  61. umbraci_confluence_markdown_exporter-1.0.0/logo.png +0 -0
  62. umbraci_confluence_markdown_exporter-1.0.0/logo.svg +509 -0
  63. umbraci_confluence_markdown_exporter-1.0.0/mkdocs.yml +108 -0
  64. umbraci_confluence_markdown_exporter-1.0.0/overrides/main.html +7 -0
  65. umbraci_confluence_markdown_exporter-1.0.0/pyproject.toml +188 -0
  66. umbraci_confluence_markdown_exporter-1.0.0/scripts/bump-docs-version.sh +54 -0
  67. umbraci_confluence_markdown_exporter-1.0.0/tests/__init__.py +1 -0
  68. umbraci_confluence_markdown_exporter-1.0.0/tests/conftest.py +264 -0
  69. umbraci_confluence_markdown_exporter-1.0.0/tests/integration/__init__.py +1 -0
  70. umbraci_confluence_markdown_exporter-1.0.0/tests/integration/test_cli_integration.py +99 -0
  71. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/__init__.py +1 -0
  72. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_alert_conversion.py +171 -0
  73. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_api_clients.py +495 -0
  74. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_bold_boundaries.py +30 -0
  75. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_clientside_macros_conversion.py +251 -0
  76. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_confluence.py +3815 -0
  77. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_emoticon_conversion.py +158 -0
  78. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_include_macro_conversion.py +161 -0
  79. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_main.py +104 -0
  80. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_markdown_macro_conversion.py +156 -0
  81. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_nbsp_fix.py +183 -0
  82. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_page_search.py +103 -0
  83. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_pagetree_conversion.py +486 -0
  84. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_plantuml_code_block_detection.py +88 -0
  85. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_plantuml_conversion.py +311 -0
  86. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_plantumlcloud_conversion.py +406 -0
  87. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_plantumlcloud_placeholders.py +727 -0
  88. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_space_scope_and_folders.py +397 -0
  89. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_template_placeholders.py +116 -0
  90. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/test_viewpdf_macro.py +83 -0
  91. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/__init__.py +1 -0
  92. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_app_data_store_env.py +330 -0
  93. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_config_optional_fields.py +55 -0
  94. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_drawio_converter.py +153 -0
  95. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_export.py +347 -0
  96. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_lockfile.py +1345 -0
  97. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_measure_time.py +124 -0
  98. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_page_registry.py +63 -0
  99. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_rich_console.py +33 -0
  100. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_table_converter.py +525 -0
  101. umbraci_confluence_markdown_exporter-1.0.0/tests/unit/utils/test_type_converter.py +56 -0
  102. umbraci_confluence_markdown_exporter-1.0.0/uv.lock +1385 -0
@@ -0,0 +1,18 @@
1
+ .git
2
+ .github
3
+ .claude
4
+ .venv
5
+ dist
6
+ build
7
+ *.egg-info
8
+ __pycache__
9
+ .pytest_cache
10
+ .ruff_cache
11
+ .mypy_cache
12
+ node_modules
13
+ tests
14
+ scratch
15
+ .vscode
16
+ .idea
17
+ *.log
18
+ .DS_Store
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: Spenhouet
@@ -0,0 +1,83 @@
1
+ name: Bug report
2
+ description: Report an error or unexpected behavior
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thank you for taking the time to report an issue! We're glad to have you involved with confluence-markdown-exporter.
9
+
10
+ **Before reporting, please make sure to search through [existing issues](https://github.com/Spenhouet/confluence-markdown-exporter/issues?q=is:issue+is:open+label:bug) (including [closed](https://github.com/Spenhouet/confluence-markdown-exporter/issues?q=is:issue%20state:closed%20label:bug)).**
11
+
12
+ - type: markdown
13
+ attributes:
14
+ value: |
15
+ ### Diagnostic info
16
+ Run `cme bugreport` and paste the full output in the **Diagnostic info** field below.
17
+ This command prints your version, system details, and configuration — with all secrets automatically redacted.
18
+
19
+ - type: textarea
20
+ attributes:
21
+ label: Description
22
+ description: |
23
+ A clear and concise description of the bug, including a minimal reproducible example.
24
+
25
+ Be sure to include the command you invoked (e.g., `cme pages https://company.atlassian.net/wiki/spaces/KEY/pages/123/Title`).
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ attributes:
31
+ label: Diagnostic info
32
+ description: |
33
+ Paste the output of `cme bugreport` here.
34
+ This includes your version, Python/OS info, and configuration with secrets redacted.
35
+ placeholder: |
36
+ ## Bug Report Diagnostic Info
37
+
38
+ ### Version
39
+ confluence-markdown-exporter x.y.z
40
+
41
+ ### System
42
+ Python: ...
43
+ Platform: ...
44
+ Architecture: ...
45
+
46
+ ### Config
47
+ Config file: ...
48
+ ```yaml
49
+ ...
50
+ ```
51
+ render: markdown
52
+ validations:
53
+ required: false
54
+
55
+ - type: input
56
+ attributes:
57
+ label: Version
58
+ description: |
59
+ What version of confluence-markdown-exporter are you using?
60
+ (Already included in `cme bugreport` output — fill in here only if you didn't run that command.)
61
+ placeholder: e.g., confluence-markdown-exporter 4.0.3
62
+ validations:
63
+ required: false
64
+
65
+ - type: input
66
+ attributes:
67
+ label: Confluence Version
68
+ description: |
69
+ What Confluence version are you using? Include whether it's Cloud or Server/Data Center.
70
+ Example: `Confluence Cloud` or `Confluence Server 7.19.2`
71
+ placeholder: e.g., Confluence Cloud or Confluence Server 7.19.2
72
+ validations:
73
+ required: false
74
+
75
+ - type: input
76
+ attributes:
77
+ label: Jira Version
78
+ description: |
79
+ What Jira version are you using (or not)? Include whether it's Cloud or Server/Data Center.
80
+ Example: `Jira Cloud` or `Jira Server 8.20.5`
81
+ placeholder: e.g., Jira Cloud or Jira Server 8.20.5
82
+ validations:
83
+ required: false
@@ -0,0 +1,56 @@
1
+ name: Feature request
2
+ description: Suggest a new feature or enhancement
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thank you for taking the time to suggest a feature! We're glad to have you involved with confluence-markdown-exporter.
9
+
10
+ **Before submitting, please make sure to search through [existing feature requests](https://github.com/Spenhouet/confluence-markdown-exporter/issues?q=is:issue+is:open+label:enhancement) (including [closed](https://github.com/Spenhouet/confluence-markdown-exporter/issues?q=is:issue%20state:closed%20label:enhancement)).**
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: Problem Description
15
+ description: |
16
+ A clear and concise description of the problem or limitation you're experiencing.
17
+
18
+ What is the use case? What workflow or task would this feature enable or improve?
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ attributes:
24
+ label: Proposed Solution
25
+ description: |
26
+ A clear and concise description of what you want to happen.
27
+
28
+ How do you envision this feature working? What would the ideal implementation look like?
29
+
30
+ If you have ideas about commands, options, or configuration, please include examples:
31
+ ```bash
32
+ # Example command or usage
33
+ confluence-markdown-exporter <your-suggested-command>
34
+ ```
35
+ validations:
36
+ required: true
37
+
38
+ - type: textarea
39
+ attributes:
40
+ label: Alternatives Considered
41
+ description: |
42
+ A clear and concise description of any alternative solutions or features you've considered.
43
+
44
+ Are there workarounds you're currently using? What other tools or approaches have you tried?
45
+ validations:
46
+ required: false
47
+
48
+ - type: textarea
49
+ attributes:
50
+ label: Use Cases
51
+ description: |
52
+ Describe specific scenarios where this feature would be helpful.
53
+
54
+ Please provide concrete examples of how you (or others) would use this feature in practice.
55
+ validations:
56
+ required: false
@@ -0,0 +1,38 @@
1
+ name: Question
2
+ description: Ask a question about confluence-markdown-exporter
3
+ labels: ["question"]
4
+ body:
5
+ - type: textarea
6
+ attributes:
7
+ label: Question
8
+ description: Describe your question in detail.
9
+ validations:
10
+ required: true
11
+
12
+ - type: input
13
+ attributes:
14
+ label: Version
15
+ description: What version of confluence-markdown-exporter are you using? (see `confluence-markdown-exporter version`)
16
+ placeholder: e.g., confluence-markdown-exporter 3.0.3
17
+ validations:
18
+ required: false
19
+
20
+ - type: input
21
+ attributes:
22
+ label: Confluence Version
23
+ description: |
24
+ What Confluence version are you using? Include whether it's Cloud or Server/Data Center.
25
+ Example: `Confluence Cloud` or `Confluence Server 7.19.2`
26
+ placeholder: e.g., Confluence Cloud or Confluence Server 7.19.2
27
+ validations:
28
+ required: false
29
+
30
+ - type: input
31
+ attributes:
32
+ label: Jira Version
33
+ description: |
34
+ What Jira version are you using (or not)? Include whether it's Cloud or Server/Data Center.
35
+ Example: `Jira Cloud` or `Jira Server 8.20.5`
36
+ placeholder: e.g., Jira Cloud or Jira Server 8.20.5
37
+ validations:
38
+ required: false
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://github.com/Spenhouet/confluence-markdown-exporter#readme
5
+ about: Read the project documentation and README
@@ -0,0 +1,15 @@
1
+ <!--
2
+ Thank you for contributing to confluence-markdown-exporter! To help us out with reviewing, please consider the following:
3
+
4
+ - Does this pull request include a summary of the change? (See below.)
5
+ - Does this pull request include a descriptive title?
6
+ - Does this pull request include references to any relevant issues?
7
+ -->
8
+
9
+ ## Summary
10
+
11
+ <!-- What's the purpose of the change? What does it do, and why? -->
12
+
13
+ ## Test Plan
14
+
15
+ <!-- How was it tested? -->
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ groups:
8
+ actions:
9
+ patterns:
10
+ - "*"
@@ -0,0 +1,51 @@
1
+ name: Build Docker image
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ paths:
7
+ - Dockerfile
8
+ - .dockerignore
9
+ - .github/workflows/docker-build.yml
10
+ - pyproject.toml
11
+ - uv.lock
12
+ - confluence_markdown_exporter/**
13
+ # Also build on push to main so the GHA cache is primed on the default
14
+ # branch. Tag-triggered publish runs fall back to the default branch's
15
+ # cache, which would otherwise stay cold until the first release.
16
+ push:
17
+ branches: [main]
18
+ paths:
19
+ - Dockerfile
20
+ - .dockerignore
21
+ - .github/workflows/docker-build.yml
22
+ - pyproject.toml
23
+ - uv.lock
24
+ - confluence_markdown_exporter/**
25
+
26
+ permissions:
27
+ contents: read
28
+
29
+ jobs:
30
+ build:
31
+ name: Build image (PR verification)
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - name: Checkout
35
+ uses: actions/checkout@v7
36
+
37
+ - name: Set up QEMU
38
+ uses: docker/setup-qemu-action@v4
39
+
40
+ - name: Set up Docker Buildx
41
+ uses: docker/setup-buildx-action@v4
42
+
43
+ - name: Build (no push)
44
+ uses: docker/build-push-action@v7
45
+ with:
46
+ context: .
47
+ file: ./Dockerfile
48
+ platforms: linux/amd64,linux/arm64
49
+ push: false
50
+ cache-from: type=gha
51
+ cache-to: type=gha,mode=max,ignore-error=true
@@ -0,0 +1,86 @@
1
+ name: Publish Docker image
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ description: "Release version to publish (e.g. 5.1.0)"
8
+ required: true
9
+ type: string
10
+ workflow_dispatch:
11
+ inputs:
12
+ version:
13
+ description: "Release version to publish (e.g. 5.1.0). Must match an existing git tag."
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ publish:
22
+ name: Publish image to Docker Hub
23
+ runs-on: ubuntu-latest
24
+ environment:
25
+ name: dockerhub
26
+ url: https://hub.docker.com/r/${{ vars.DOCKERHUB_IMAGE || 'spenhouet/confluence-markdown-exporter' }}
27
+ env:
28
+ IMAGE_NAME: ${{ vars.DOCKERHUB_IMAGE || 'spenhouet/confluence-markdown-exporter' }}
29
+ steps:
30
+ - name: Checkout release tag
31
+ uses: actions/checkout@v7
32
+ with:
33
+ ref: ${{ inputs.version }}
34
+
35
+ - name: Set up QEMU
36
+ uses: docker/setup-qemu-action@v4
37
+
38
+ - name: Set up Docker Buildx
39
+ uses: docker/setup-buildx-action@v4
40
+
41
+ - name: Log in to Docker Hub
42
+ uses: docker/login-action@v4
43
+ with:
44
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
45
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
46
+
47
+ - name: Extract metadata
48
+ id: meta
49
+ uses: docker/metadata-action@v6
50
+ with:
51
+ images: ${{ env.IMAGE_NAME }}
52
+ tags: |
53
+ type=semver,pattern={{version}},value=${{ inputs.version }}
54
+ type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
55
+ type=semver,pattern={{major}},value=${{ inputs.version }}
56
+ type=raw,value=latest
57
+ labels: |
58
+ org.opencontainers.image.title=confluence-markdown-exporter
59
+ org.opencontainers.image.description=Export Confluence pages to Markdown
60
+ org.opencontainers.image.url=https://github.com/${{ github.repository }}
61
+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
62
+ org.opencontainers.image.version=${{ inputs.version }}
63
+ org.opencontainers.image.licenses=MIT
64
+
65
+ - name: Build and push
66
+ uses: docker/build-push-action@v7
67
+ with:
68
+ context: .
69
+ file: ./Dockerfile
70
+ platforms: linux/amd64,linux/arm64
71
+ push: true
72
+ tags: ${{ steps.meta.outputs.tags }}
73
+ labels: ${{ steps.meta.outputs.labels }}
74
+ cache-from: type=gha
75
+ cache-to: type=gha,mode=max,ignore-error=true
76
+ provenance: true
77
+
78
+ - name: Update Docker Hub description
79
+ uses: peter-evans/dockerhub-description@v5
80
+ continue-on-error: true
81
+ with:
82
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
83
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
84
+ repository: ${{ env.IMAGE_NAME }}
85
+ short-description: Export Confluence pages to Markdown (CLI)
86
+ readme-filepath: ./README.md
@@ -0,0 +1,57 @@
1
+ name: Deploy docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "overrides/**"
9
+ - "mkdocs.yml"
10
+ - "pyproject.toml"
11
+ - "uv.lock"
12
+ - ".github/workflows/docs.yml"
13
+ workflow_dispatch:
14
+
15
+ permissions:
16
+ contents: read
17
+ pages: write
18
+ id-token: write
19
+
20
+ concurrency:
21
+ group: pages
22
+ cancel-in-progress: false
23
+
24
+ jobs:
25
+ build:
26
+ name: Build docs
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v7
30
+
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@v7
33
+ with:
34
+ enable-cache: true
35
+
36
+ - name: Install docs dependencies
37
+ run: uv sync --locked --group docs
38
+
39
+ - name: Build site with Zensical
40
+ run: uv run zensical build --strict
41
+
42
+ - name: Upload artifact
43
+ uses: actions/upload-pages-artifact@v5
44
+ with:
45
+ path: site
46
+
47
+ deploy:
48
+ name: Deploy to GitHub Pages
49
+ needs: build
50
+ runs-on: ubuntu-latest
51
+ environment:
52
+ name: github-pages
53
+ url: ${{ steps.deployment.outputs.page_url }}
54
+ steps:
55
+ - name: Deploy to GitHub Pages
56
+ id: deployment
57
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,50 @@
1
+ name: Publish UmbraCi fork
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'umbraci-v*'
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ publish:
13
+ if: github.repository == 'UmbraCi/confluence-markdown-exporter'
14
+ runs-on: ubuntu-latest
15
+ environment:
16
+ name: pypi
17
+ url: https://pypi.org/project/umbraci-confluence-markdown-exporter/
18
+ permissions:
19
+ contents: read
20
+ id-token: write
21
+ steps:
22
+ - uses: actions/checkout@v7
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Verify release branch and version
27
+ env:
28
+ RELEASE_TAG: ${{ github.ref_name }}
29
+ run: |
30
+ git merge-base --is-ancestor HEAD origin/heytea/export-wiki-upstream
31
+ python -c 'import os, re, tomllib; v = tomllib.load(open("pyproject.toml", "rb"))["project"]["version"]; assert re.fullmatch(r"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)", v) and os.environ["RELEASE_TAG"] == "umbraci-v" + v, "Tag must match the project semantic version"'
32
+
33
+ - uses: astral-sh/setup-uv@v7
34
+
35
+ - name: Install dependencies
36
+ run: uv sync --locked --all-groups
37
+
38
+ - name: Check and test
39
+ run: |
40
+ uv run ruff check
41
+ uv run pytest
42
+
43
+ - name: Build distributions
44
+ run: uv build --no-sources
45
+
46
+ - name: Verify built package
47
+ run: uv run --with dist/*.whl --no-project -- python -c "import confluence_markdown_exporter as c; assert c.__version__ != 'unknown', c.__version__"
48
+
49
+ - name: Publish to PyPI
50
+ run: uv publish
@@ -0,0 +1,52 @@
1
+ name: Build Python package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test, lint and build
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v7
18
+ with:
19
+ enable-cache: true
20
+
21
+ - name: Install dependencies
22
+ run: uv sync --locked --all-groups
23
+
24
+ - name: Run linting with ruff
25
+ run: uv run ruff check
26
+
27
+ - name: Run tests with pytest
28
+ run: uv run pytest
29
+
30
+ - name: Test build (with sources for development)
31
+ run: uv build
32
+
33
+ - name: Test build (without sources for publication)
34
+ run: |
35
+ rm -rf dist/
36
+ uv build --no-sources
37
+
38
+ - name: Test package installation and import
39
+ run: |
40
+ uv run --with dist/*.whl --no-project -- python -c "import confluence_markdown_exporter; print('Package imports successfully')"
41
+
42
+ - name: Test CLI commands
43
+ run: |
44
+ uv run --with dist/*.whl --no-project confluence-markdown-exporter --help
45
+ uv run --with dist/*.whl --no-project cme --help
46
+
47
+ - name: Upload build artifacts for inspection
48
+ uses: actions/upload-artifact@v7
49
+ with:
50
+ name: build-artifacts
51
+ path: dist/
52
+ retention-days: 5
@@ -0,0 +1,73 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ description: "Release version to publish (e.g. 5.1.0)"
8
+ required: true
9
+ type: string
10
+ workflow_dispatch:
11
+ inputs:
12
+ version:
13
+ description: "Release version to publish (e.g. 5.1.0). Must match an existing git tag."
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: write
19
+ id-token: write
20
+ attestations: write
21
+
22
+ jobs:
23
+ publish:
24
+ name: Publish to PyPI
25
+ runs-on: ubuntu-latest
26
+ environment:
27
+ name: release
28
+ url: https://pypi.org/p/confluence-markdown-exporter
29
+ steps:
30
+ - name: Checkout release tag
31
+ uses: actions/checkout@v7
32
+ with:
33
+ ref: ${{ inputs.version }}
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v7
37
+ with:
38
+ enable-cache: true
39
+
40
+ - name: Install dependencies
41
+ run: uv sync --locked --all-groups
42
+
43
+ - name: Build distributions
44
+ run: uv build --no-sources
45
+
46
+ - name: Generate artifact attestations
47
+ uses: actions/attest-build-provenance@v4.2.2
48
+ with:
49
+ subject-path: "dist/*"
50
+
51
+ - name: Publish to PyPI
52
+ run: uv publish
53
+
54
+ - name: Sign the distributions with Sigstore
55
+ uses: sigstore/gh-action-sigstore-python@v3.5.0
56
+ with:
57
+ inputs: >-
58
+ ./dist/*.tar.gz
59
+ ./dist/*.whl
60
+
61
+ # The release workflow leaves the release as a draft; publishing it here,
62
+ # after the assets are attached, is what makes it immutable.
63
+ - name: Upload signed artifacts and publish GitHub Release
64
+ env:
65
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66
+ run: |
67
+ VERSION="${{ inputs.version }}"
68
+ if [[ "$(gh release view "$VERSION" --repo "$GITHUB_REPOSITORY" --json isDraft -q .isDraft)" != "true" ]]; then
69
+ echo "Release $VERSION is already published; its assets are immutable. Skipping."
70
+ exit 0
71
+ fi
72
+ gh release upload "$VERSION" dist/** --repo "$GITHUB_REPOSITORY"
73
+ gh release edit "$VERSION" --draft=false --repo "$GITHUB_REPOSITORY"