quillnote
quillnote copied to clipboard
Add support for Nextcloud Files API
Currently Nextcloud Notes plugin does not support many of Quillnote's features. We should give the user the option to store them as JSON files in Nextcloud Drive/Files instead of using the Notes API. This way, users can sync notes that take advantage of all of Quillnote's features.
Personally, I think using JSON files isn't exactly user friendly. I would suggest another way:
- (Optionally) use the Nextcloud Notes plugin folder (
Notes
) to sync. - The main folder
Notes
acts as theNo Notebook
folder, folders inside it are notebooks (in Nextcloud they're called categories). - Tags would be appended to the note file as the last line (e.g.
#ToDo #Home
). In the Quillnote app, that last line won't be shown. A similar way could be used for reminders (e.g.@2021-07-02 18:00 @2021-07-02 21:00
) and the pinned status (e.g.^
). - Media files just get uploaded next to the note file as
note name1.jpg
,note name2.jpg
etc.
This would be transparent to the user, compatible with Nextcloud Notes and easy to manage.
Personally, I think using JSON files isn't exactly user friendly. I would suggest another way:
1. (Optionally) use the Nextcloud Notes plugin folder (`Notes`) to sync. 2. The main folder `Notes` acts as the `No Notebook` folder, folders inside it are notebooks (in Nextcloud they're called categories). 3. Tags would be appended to the note file as the last line (e.g. `#ToDo #Home`). In the Quillnote app, that last line won't be shown. A similar way could be used for reminders (e.g. `@2021-07-02 18:00 @2021-07-02 21:00`) and the pinned status (e.g. `^`). 4. Media files just get uploaded next to the note file as `note name1.jpg`, `note name2.jpg` etc.
This would be transparent to the user, compatible with Nextcloud Notes and easy to manage.
JSON is just the easy and fast way. I was thinking of something similar to what you suggested btw:
-
%%%
a token for the parser to detect the start of the metadata block -
[] List item
if any list items exist in the metadata block then the note is a list note -
[x] List item
-
#tag1 #tag2
-
@129349282 Just a reminder
The number is the unix timestamp of the date -
-hidden -deleted -archived -no_markdown -pinned
Nextcloud Notes already has a "Favourite" feature but it could be useful for other sync services -
!blue
-
&"Files/cat.png" &"Files/recording.mp3"
- No text should follow the metadata block
Great! I'd have two suggestions then:
- Checklist items are part of Markdown, aren't they? Their syntax is
- [ ] Not checked
and- [x] Checked
. - I thought of Unix epoch timestamp, too, but for transparency to the user it would be great to use the date/time format I proposed before. It also makes it possible to easily change it outside of Quillnotes.
Great! I'd have two suggestions then:
* Checklist items are part of Markdown, aren't they? Their syntax is `- [ ] Not checked` and `- [x] Checked`. * I thought of Unix epoch timestamp, too, but for transparency to the user it would be great to use the date/time format I proposed before. It also makes it possible to easily change it outside of Quillnotes.
- Indeed, markdown already has support for check lists but they are really basic. It would work for now, but Quillnote's task lists will get more feature rich over time :)
- Your proposal could also work as long as a timezone is provided as well.
- That makes sense, but I guess it doesn't hurt to keep it "as compatible as possible" by using
- [x]
instead of[x]
. - Is a timezone really necessary? I imagine it could even work against the user, e.g. with daylight saving (resulting in a notification that's an hour early/late). If a user sets a notification for some day at some time, wouldn't they always mean it to be "in the current timezone I'm in"?
I think exporting to a file (JSON, XML or however) it is a good feature since let users to use a lot of synchronization or backup ways: Dropbox, Syncthing, email, FTP, USB drive, ...
@urizev Do you mean a single json file, which includes media? On the surface it looks nice for backups only, but I don't think you'd want that for syncing: that would mean you'd have to re-upload the whole file again and again, unless you have a sync client that has "block support", like Dropbox, so that only the changed part of the file would be uploaded. I'd rather see a transparent folder structure with actual text and media files, possibly exported to zip/7z/whatever, so that it could also be encrypted upon export.
Generalizing to WebDAV (#40) would also be useful. You could let the user choose between a "General WebDAV" and a "Nextcloud" profile, so that the user doesn't need to include the whole /remote.php/dav/files/Username/
path.
@urizev Do you mean a single json file, which includes media? On the surface it looks nice for backups only, but I don't think you'd want that for syncing: that would mean you'd have to re-upload the whole file again and again, unless you have a sync client that has "block support", like Dropbox, so that only the changed part of the file would be uploaded. I'd rather see a transparent folder structure with actual text and media files, possibly exported to zip/7z/whatever, so that it could also be encrypted upon export.
Yes, backup is the main advantage of this feature. But you can build a rudimentary sync system if it is automatically exported/uploaded on every change. You would have to manually import this file on the other devices.
I know it is not a good sync system but it lets user to choose other sync ways.
I'd still say that, also for portability's sake, an encrypted zip-file with separate *.md files + per-notebook folder structure would be a lot better than a single JSON (which, inevitably, would have a "proprietary" structure).
I didn't mean JSON format but any file format.
I think exporting to a file (JSON, XML or however) [...]
Maybe we can use a single notebook metadata json file in each notebook directory and sub directories (notebook.meta
)
It indexes all note metadata and sub notebook and their path, then store notes and media raw. This way the app would be able to access it's features and also the notes would be user friendly.
You can also hide the file using unix . prefix for safety and user experience.
Also please make local sync backup the default backup option and sync services pluggable apks (like tachiomi comic reader app does). Cloud Sync Plug-in for Nextcloud, WebDAV, Mega, Yandex, Tresorit, Git, Gitlab / Github / Gitea / Bitbucket.
It would de-bloat the app significantly and reduce maintaince issues.
Maybe we can use a single notebook metadata json file in each notebook directory and sub directories (
notebook.meta
)It indexes all note metadata and sub notebook and their path, then store notes and media raw. This way the app would be able to access it's features and also the notes would be user friendly.
You can also hide the file using unix . prefix for safety and user experience.
That sounds like a very good idea. I think hiding the metadata file as a dotfile may cause problems with synchronizing. Nextcloud Notes for example would not show it anyway if the file extension isn't .md or .txt.
Also please make local sync backup the default backup option and sync services pluggable apks (like tachiomi comic reader app does). Cloud Sync Plug-in for Nextcloud, WebDAV, Mega, Yandex, Tresorit, Git, Gitlab / Github / Gitea / Bitbucket.
I think in-app WebDAV would still be nice to have, but all these other things... if they pack their own apps with bidirectional syncing, then I'd say Quillnote should only give the user the option to select a specific folder on the internal storage. Nextcloud, unfortunately, does not pack automatic bidirectional sync, only manual.
@ltGuillaume
I think hiding the metadata file as a dotfile may cause problems with synchronizing
Oh. Then it's alright to just let it be along with other files. No one wants to open a notebook.meta json file and edit manually unless required lol.
So notebook.meta.txt
but all these other things... as said in the other issue, if they pack their own apps with bidirectional syncing
Can we atleast have a few plugins and a plugin template?
Just like tachiomi community you can provide 3 plugins and the raw template. The community will extend support for you and you wouldn't have to care for broken plugins, you'd only update and improve the plugin manager. The plugin devs maintain the plugin.
It's fully up to @msoultanidis and/or contributors of course, but it's cool we explored whether it's necessary or not. Let's see the verdict! 😉
Any updates on this @msoultanidis @ltGuillaume ? :)
Next update will feature the ability to sync notes locally, as files. That means you will be able to sync with any provider that supports files, including Nextcloud, with their application.