Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

samyak-jain/org-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORG Sync

Entrypoints

On Save of org buffer:

  1. Convert Org file text into AST (Indextree representation)
  2. DFS over the AST and update database if there's any change in the data
  3. If there's a change, update the last-updated timestamp in the table and reason as org
  4. Pull changes from vdirsyncer
  5. If any changes, run vdirsyncer entrypoint
  6. Do conflict management if there are conflicting changes. Conflict resolution will happen through last-updated timestamp.

On vdirsyncer hook:

  1. Parse ics file
  2. Find task with UUID and update if necessary
  3. Check for last-updated timestamp conflict. If org wins, skip
  4. Update last-updated timestamp and reason as caldav
  5. Confict resolution

Conflict Resolution

On Org win conflict:

  1. Convert this AST into the respective ical representation.
  2. Overwrite the respective ics file
  3. Trigger vdirsyncer to push the changes to the caldav server

On ical win conflict:

  1. Convert JSON back to AST
  2. Create ORG file from AST
  3. Generate ORG text and overwrite the respective file

Read org file to indextree Convert indextree to custom struct convert custom struct to ics

Read ics Convert ics into custom struct Read org file into indextree diff the tasks that need to change and maniuplate using arena mut save to org file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages