vrtmrz / obsidian-livesync

MIT License
3.96k stars 134 forks source link

External Vault Editing (& thank you!) #271

Closed aicayzer closed 10 months ago

aicayzer commented 10 months ago

Hello!

Thank you so much for creating this plugin; It is exceptional. As a long-standing Obsidian Sync user, I really didn't expect to find a comparable alternative (let alone better than iCloud Drive, what I used prior).

I'd also like to thank @heywoodlh for his informative blog post; albeit it for a different purpose, the functionality afforded by adopting obsidian-livesync is the same.

Beyond thank yous, I wanted to share this incase it was relevant to anyone else in the future and to ask a couple of questions.

My current setup is as such:

Going forward, I plan to implement a micro-service which will allow me to implement changes to my vault outside of Obsidian. An example piece of functionality would be the following: Every time there is an update to my calendar, I want to amend the section of my daily note which outlines my meetings for the day.

To do this, I'm planning on deploying a basic script to Supabase. It will have a listener for API requests and, upon receiving them and handling them appropriately, it will amend the respective file in my vault.

With regard to my questions, I want to separate them into two categories. Those explicitly related to this plugin & those which are specific to my use case; understand if the latter are left unanswered of course.

Relevant to this plugin:

  1. The Chrome Extension doesn't seem to work for me? I enter the details as it asks (other than E2EE which I'm yet to enable), press "Clip this page", a loading state is shown and nothing happens. If I toggle the extension closed, all details are reset to default (i.e. empty fields). Anyone else had this issue?
  2. Am I right in thinking the "Customisation Sync" isn't required if I want to sync all contents of my vault? Including plugins, preferences, et al

Relevant to my solution:

  1. I will need to CRUD files in my vault (i.e. not just amend existing ones but I'll also create / delete with the API). As of now, I haven't put much time into exactly how I will do this but my current thinking is to repurpose some of the code from the filesync repository. Is this how you would do it?
  2. Related to ^, I should be able to use E2EE with no issues, right?
  3. Finally, if there is any advice or thoughts you think would be useful, please feel free to share! I am happy to outline further details about my planned solution if helpful

( I should note I am an amateur dev at best. Apologies if anything sounds "silly"!)

Thank you!!!!

vrtmrz commented 10 months ago

Hi! Thank you for asking me! And, I am so honoured to hear that!

I think that the API for the remote vault could be so nice! First, let me answer your questions.

  1. The Chrome Extension doesn't seem to work for me? I enter the details as it asks (other than E2EE which I'm yet to enable), press "Clip this page", a loading state is shown and nothing happens. If I toggle the extension closed, all details are reset to default (i.e. empty fields). Anyone else had this issue?

I am really sorry for this, I use this only for non-PDFable pages, and recently not occurred so frequently. However, looks like now works weirdly. I will check it later! Thank you for pointing this out!

  1. Am I right in thinking the "Customisation Sync" isn't required if I want to sync all contents of my vault? Including plugins, preferences, et al

If you really want to synchronise all things across the devices (In other words, you do not mind if all plugins or configurations could be overwritten), you can only the Hidden file sync. If you want to synchronise them selectively, Customisation Sync might be useful. This depends on whether we using mobile devices and desktop-only themes or plug-ins, or not.

  1. I will need to CRUD files in my vault (i.e. not just amend existing ones but I'll also create / delete with the API). As of now, I haven't put much time into exactly how I will do this but my current thinking is to repurpose some of the code from the filesync repository. Is this how you would do it?
  2. Related to ^, I should be able to use E2EE with no issues, right?
  3. Finally, if there is any advice or thoughts you think would be useful, please feel free to share! I am happy to outline further details about my planned solution if helpful

We can use DirectFileManipulator which is in common-lib. I am sorry to say that every time, no documentation at all yet. However, all the features that you have mentioned are implemented. I am also going to update Filesystem-LiveSync to use it when I get a chance. If you trying to investigate filesystem-livesync, DirectFileManupulator might be more useful and easy to use. Webclip uses this for put the things to the database

I am hopeful that this will be helpful.

aicayzer commented 10 months ago

Hey! Thanks for the answer and apologies for a overdue response. Due to personal reasons I've had to pause work on this for now.

In the next coming weeks I will get back to this & if there's more to share I'll update the thread. For now I'll close the issue.

As with before, massive thank you for the plug-in and stay well :)