Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose where to store the database to enable syncing it #230

Open
m0nkeyc0de opened this issue Oct 19, 2024 · 3 comments
Open

Choose where to store the database to enable syncing it #230

m0nkeyc0de opened this issue Oct 19, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@m0nkeyc0de
Copy link

m0nkeyc0de commented Oct 19, 2024

Hello, first of all I really like your application. The only thing that is missing is a way to synchronize notes between devices and I may have a quite simple solution for that.

I'm using Syncthing to privately share data accross my devices and it works very well. I order to synchronize notes (and not just only the JSON backup) it would be great to be able to store notes as single text files in a local directory on the device. Then Syncthing could just sync those files and the notes would be automagically up-to-date on each device.

The implementation could be as follows:

  • Let the user choose a directory where to store notes
  • Each note is a .txt file
  • File name is the note title
  • Notes could be transparently encrypted with a PSK (or any other mean)
  • Notes list consists of watching directory content
  • File is watched for modifications in background (best behaviour if it is modified while editing is to be determined)

This could make this app, in combination with Syncthing, a killer notes taking app for private-minded people as such solutions aren't that common for now.

Those notes could even be edited with a simple text editor on a PC. So simple!

@maelchiotti
Copy link
Owner

Hi, I agree that it would immensely improve the app.

To store the notes, I use a database library. It has many advantages over file-based storage, such as performance, ease of use and the number of features out of the box.

So I don't think I'll consider storing the notes as text files. However, I could allow you to choose where the database data is stored, so you could sync it with Syncthing. This way, the synchronization wouldn't be real time, but at least the app would load the updated notes at each startup.

In any case, the database library I use is not being maintained so I want to change to another one, but it's not an easy task. So I wouldn't expect this feature for a while, but know that it's one I would use too.

@maelchiotti maelchiotti self-assigned this Oct 19, 2024
@maelchiotti maelchiotti added the enhancement New feature or request label Oct 19, 2024
@maelchiotti maelchiotti changed the title Local directory as storage backend Choose where to store the database to enabled syncing it Oct 19, 2024
@m0nkeyc0de
Copy link
Author

Hi thanks for your quick reply. Synching the entire database file may do most of the job as well.
For viewing/editing notes on the PC we'll see what could be done then.

@maelchiotti maelchiotti changed the title Choose where to store the database to enabled syncing it Choose where to store the database to enable syncing it Oct 21, 2024
@SlimyMonz
Copy link

Agreed that having a sort of local working directory would be real nice. I use MEGA and sync some folders, specifically a Notes folder with all my markdown files.

A potential solution:
The database can be used to keep the app performance, with local txt or markdown files only being written to on save. Only reading the files if there's some external change. (A simple datetime check might work, compare DB modified vs local modified).

Basically, the app would run off the database and only sync the local directory occasionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants