memos/server
andrigamerita e4a09c407c
feat: write memo visibility in file names when exporting (#3538)
When using the dedicated feature in Memos' user settings to export all memos to Markdown files inside a ZIP folder, the output doesn't feature any kind of distinction for memos by their set visibility.
While this is not a big issue for personal backups, it can reveal itself problematic if exporting the data to share it with other people, or maybe deploy to a static site generator, because there is nothing in the files that distinguishes public memos from private or workspace-restricted ones.

This pull request simply modifies the ExportMemos server function, to add the Visibility status to the end of every exported file name inside the ZIP, right after the date (which is left intact). For example, the file for a public memo would now be called: `YYYY-MM-DDThh:mm:ss+hh:mm-PUBLIC.md`.

An alternative solution would have been to write this information in a YAML header at the beginning of every Markdown file, but, since those are not used anywhere else in the software, I decided to stick with what is already used for export metadata, the filename.
2024-06-09 19:22:13 +08:00
..
profile chore: remove unused flags 2024-05-03 07:16:07 +08:00
router feat: write memo visibility in file names when exporting (#3538) 2024-06-09 19:22:13 +08:00
service fix: update resource with id (#3405) 2024-05-19 23:18:03 +08:00
version chore: bump version 2024-06-04 20:51:53 +08:00
server.go chore: tweak linter 2024-05-26 21:39:34 +08:00