Comments (4)
The algorithm you proposed looks perfect for me. At the implementation level I feel that having a khalorg sync <calendar_name>
that the user can use either on cron or systemd (with whatever it feels more comfortable with) could be an elegant solution.
I'm a little busy right now so I can't guarantee a PR in a near horizon, but it's surely something that is nagging me inside my head, so if you don't have the energy to work on it, eventually I'll do it :)
from khalorg.
Hey @lyz-code, thanks for your interest. I accept PRs.
You are correct that currently there is no "automatic sync mechanism" that handles both pulling en pushing agenda items. The solution you describe sounds logical to me.
My current workflow is that I have 1 org file holding my Outlook agenda. When I want to pull the items I run khalorg list outlook > outlook.org
. When I want to push new/edited items, I use the commands from the plugin. If I forget to do this, and run the khalorg list
again, I will loose information. I guess this is also the issue you are encountering.
The ideal solution, I guess, would be if:
- khal pulls the latest calendar data from the server.
- khalorg could accept 1 org file (holding all agenda items of a calendar) and negotiate with khal whether:
- an item was changed in the org file
- an item was changed on khal (which we updated earlier)
- based on the info above, the khal and the org file are updated.
The process above can be executed using systemd or cron using a simple timer.
I'll think about it some more this week. Let me know what you think the best approach would be.
Cheers
from khalorg.
I was just thinking. Would it not be possible to let khalorg push all its changes to khal, without checking for any sync errors, and let vdirsyncer
handle the synchronization?
For example:
You have:
- remote calendar called:
remote
- local calendar in khal called:
local_khal
- the same local calendar as
local_khal
but now in org format:local_org
Lets say changes are made in remote
: an existing event A is edited. At the same time, we also edit event A in org.
Now we can do the following:
- Push all changes made in
local_org
tolocal_khal
usingkhalorg
(we need to make a new command for this). - Next we run
vdirsyncer sync
which will pull the changes from remote intolocal_khal
. Here, we letvdirsyncer
resolve the merge conflict in event A. - Next, we use
khalorg list
to update ourlocal_org
calendar.
The process above can still be executed using timer (cron/systemd). I might be missing something here but it is a start.
from khalorg.
Makes a lot of sense to reuse vdirsyncer
already in place conflict resolution. I hadn't thought of that possibility.
The workflow might be confusing for a new user though, so if we go through this path I'd definitely either:
- make the documentation cristal clear
- Create a
khalorg new
that asks the user the information needed to create a new calendar, and that creates the required calendars in vdirsync behind the scenes - Create the
kharlorg sync
that follows the process you described (push
, runvdirsyncer
,list
)
from khalorg.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from khalorg.