mdSilo / mdSilo-app

Lightweight Knowledge Base and Feed Reader.
https://mdsilo.com/
GNU Affero General Public License v3.0
565 stars 39 forks source link

Cannot import mdsilo.json from Webapp into Desktop App #538

Closed schmurian closed 6 months ago

schmurian commented 12 months ago

Describe the bug Starting a .json database on the webapp is incompatible with the Desktop App installed via the AppImage install method on Linux

To Reproduce .json content from webapp

{"notesobj":{"hello.md":{"title":"hello","content":"# Hello\n\nThis is a test in mindsilo.\n\nDienstag, 19. September 2023 um 15:23 ","file_path":"hello.md","cover":"","created_at":"2023-04-11T18:58:44.000Z","updated_at":"2023-09-19T13:23:22.410Z","is_daily":false,"id":"hello.md"},"./New Note.md":{"title":"New Note","content":"Writing something.\n\nThis time I will not forget to save","file_path":"./New Note.md","cover":"","created_at":"2023-09-19T13:30:38.323Z","updated_at":"2023-09-19T13:31:50.953Z","is_daily":false,"id":"./New Note.md"}},"notetree":{".":[{"id":"hello.md","title":"hello","created_at":"2023-04-11T18:58:44.000Z","updated_at":"2023-04-11T18:58:44.000Z","is_dir":false,"children":[],"collapsed":true},{"id":"./New Note.md","title":"New Note","created_at":"2023-09-19T13:30:38.323Z","updated_at":"2023-09-19T13:30:38.323Z","is_dir":false,"children":[],"collapsed":true}]}}

.json content from desktop app

{"isloaded":true,"notesobj":{"/path/to/notes/note.md":{"id":"/path/to/notes/note.md","title":"Hello","content":"A new entry.","file_path":"/path/to/notes/note.md","cover":"","created_at":"2023-09-19T13:54:07.810Z","updated_at":"2023-09-19T13:54:14.003Z","is_daily":false,"is_dir":false},"/path/to/notes/mdSilo.json":{"id":"/path/to/notes/mdSilo.json","cover":"","created_at":"2023-09-19T13:40:02.077Z","updated_at":"2023-09-19T13:40:02.077Z","is_daily":false,"is_dir":false},"/path/to/notes/mdsilo.json":{"id":"/path/to/notes/mdsilo.json","title":"mdsilo","content":"","file_path":"/path/to/notes/mdsilo.json","cover":"","created_at":"2023-09-19T13:52:45.987Z","updated_at":"2023-09-19T13:53:56.579Z","is_daily":false,"is_dir":false}},"notetree":{"/path/to/notes":[{"id":"/path/to/notes/note.md","title":"hello","created_at":"2023-09-19T13:54:07.810Z","updated_at":"2023-09-19T13:54:14.003Z","is_dir":false},{"id":"/path/to/notes/mdSilo.json","title":"mdSilo","created_at":"2023-09-19T13:40:02.077Z","updated_at":"2023-09-19T13:40:02.077Z","is_dir":false},{"id":"/path/to/notes/mdsilo.json","title":"mdsilo","created_at":"2023-09-19T13:52:45.987Z","updated_at":"2023-09-19T13:53:56.579Z","is_dir":false}]},"activities":{}}

Expected behavior

  1. A "upload .json file" dialog in the desktop app would be great
  2. .json files should be compatible for better UX

Desktop (please complete the following information):

Are you willing to submit a PR?