Skip to content

Add Markdown and PDF export formats#5

Open
johnzastrow wants to merge 2 commits into
Scriptbash:mainfrom
johnzastrow:main
Open

Add Markdown and PDF export formats#5
johnzastrow wants to merge 2 commits into
Scriptbash:mainfrom
johnzastrow:main

Conversation

@johnzastrow
Copy link
Copy Markdown

Summary

Adds Markdown (.md) and PDF (.pdf) as export formats alongside the existing .csv/.json.

  • Both are human-readable, export-only outputs. The import path is unchanged and still only round-trips .csv/.json (it relies on the structured per-plugin id); other types are already rejected gracefully by the existing "Unsupported file type" handling.
  • Each plugin is rendered as a full Field/Value table containing every metadata field the plugin manager exposes — i.e. the same completeness as the .json export, not a fixed subset.
  • Third-party repositories get their own table, mirroring the existing csv/json behavior.
  • No new dependencies: PDF is generated with Qt's QTextDocument + QPrinter (already bundled with QGIS), Markdown is plain text.

Changes

  • plugin_exporter_dialog_base.ui: add .md / .pdf to the format combo box
  • plugin_exporter.py: new .md / .pdf branches in export_plugins(); build_report_data() / build_markdown() / build_html() helpers; set_filter() covers *.md / *.pdf; scoped Qt6 enums used to match the existing style
  • metadata.txt: version bump to 0.3.0 + changelog entry

Testing

Verified headless on QGIS 4.0.1-Norrköping / Qt 6.11.0 (Windows): dialog loads, the format combo lists all four options, a full 17-field sample plugin renders with every field present in both Markdown and HTML, and the PDF code path writes a valid %PDF- file.

🤖 Generated with Claude Code

johnzastrow and others added 2 commits May 17, 2026 19:49
Adds .md and .pdf as export options alongside the existing .csv/.json.
Both are human-readable, export-only outputs (import still round-trips
csv/json only). PDF is rendered via QTextDocument + QPrinter and
Markdown is generated as plain text, so no new dependencies are needed.

- UI: add .md/.pdf to the format combo box
- export_plugins(): new .md/.pdf branches
- add build_report_rows()/build_markdown()/build_html() helpers
- set_filter(): cover *.md and *.pdf
- metadata: bump to 0.3.0 + changelog

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The JSON export dumps each plugin's full metadata dict, but Markdown
and PDF only emitted a fixed 5-column subset. They now render every
field the plugin manager exposes per plugin (one Field/Value table per
plugin), matching the JSON export's completeness.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant