Mikescher / AlephNote

Lightweight note taking client for Simplenote or Standard Notes (or simply local storage)

Home Page:https://mikescher.github.io/AlephNote/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] alternative sync ways?

opened this issue · comments

One of the biggest problems when you have a stolen or formatted notebook/pc is the settings of certain applications. Recently, I thought of a way to sync my AlephNote settings on GitHub, that way I would have a backup of everything.

Another way to solve this problem would be to add a sync per database like postgres or sqlite. In this particular case, I can have an external database to save my notes in case I need to format my computer or prevent my computer from being stolen. But I could also have a synchronization in some specific network protocol as is the case with "nostr", "bittorrent", "localsend", "smb" or "ipfs".

For example, I could write posts with AlephNote through nostr. But in a special case, if I wanted to share notes, I could transfer them via a torrent file. But Localsend is an interesting network protocol if you want to share information across different devices on the same network. So this could be done with a localsend plugin for Alephnote.

But very interesting use case would be to make my notes public with ipfs, and another use case would be to synchronize my notes on different types of windows computers with the smb protocol. In short, we can have different plugins for different types of synchronization.

So I want and am willing to help in this regard. And would be happy for any answers or advice on how to create custom sync plugins for AlephNote.

Sync plugins can be written relatively easily, if you look into Source/Plugins there are already 6 different sync provider.

I would recommend to look into the Filesystem plugin (as it is the easiest, it simply syncs with a folder on your computer) and the StandardNotes plugin (it has the most features and is the most actively developed)

The plugins are simply classs that implement the IRemotePlugin interface, if you want you can inherit from the BasicRemotePlugin class to get a bunch of common functionality and make it a bit easier for yourself.

The rest is just implementing a few more needed interfaces

  • INote as a class for the Notes, you can here use BasicHierarchicalNote or BasicNoteImpl as base classes
  • IRemoteStaorageConnection for the actual sync process (you can use the BasicRemoteConnection base class)
  • IRemoteStorageSyncPersistance if you need to save some persistant data (aka a sync token)
  • IRemoteStorageConfiguration to define the configuration options of your plugin

if you have more questions feel free to ask.

You can either develop the plugins for yourself, bu if you want you can also send a PR and everyone can us the plugin (also be aware that if you version your plugin dll with a version number not ending in a zero it will be a "prerelase" and only visible if the user explicitely enables them)

Hi @Mikescher,

You can either develop the plugins for yourself, bu if you want you can also send a PR and everyone can us the plugin (also be aware that if you version your plugin dll with a version number not ending in a zero it will be a "prerelase" and only visible if the user explicitely enables them)

thanks for comment!

if you have more questions feel free to ask.

What do you think of the idea of ​​plugins in AlephNote like: "GitHub", "nostr", "bittorrent", "localsend", "smb" or "ipfs"? Is it interesting to increase the extensibility of this program?