Add ability to export to Markdown (and fix heading styles)

This commit is contained in:
Miguel Jacq 2025-11-05 18:58:38 +11:00
parent 19593403b9
commit 76806bca08
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
6 changed files with 124 additions and 11 deletions

View file

@ -616,6 +616,7 @@ If you want an encrypted backup, choose Backup instead of Export.
"JSON (*.json);;"
"CSV (*.csv);;"
"HTML (*.html);;"
"Markdown (*.md);;"
"SQL (*.sql);;"
)
@ -631,6 +632,7 @@ If you want an encrypted backup, choose Backup instead of Export.
"JSON (*.json)": ".json",
"CSV (*.csv)": ".csv",
"HTML (*.html)": ".html",
"Markdown (*.md)": ".md",
"SQL (*.sql)": ".sql",
}.get(selected_filter, ".txt")
@ -647,6 +649,8 @@ If you want an encrypted backup, choose Backup instead of Export.
self.db.export_csv(entries, filename)
elif selected_filter.startswith("HTML"):
self.db.export_html(entries, filename)
elif selected_filter.startswith("Markdown"):
self.db.export_markdown(entries, filename)
elif selected_filter.startswith("SQL"):
self.db.export_sql(filename)
else: