-
Notifications
You must be signed in to change notification settings - Fork 40
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
Import from Khal calendar #27
Comments
Remind me, how khal stores the events? Is it .ics or some native format as well? If it is .ics, then I am already working in this direction, if native file format, could you drop an example file with a few events? |
As I can see it's just .ics files. |
In this case, I think the import should become possible in the next version. Currently, I am working on the support for the .ics files, and users will be able to see events from external ics files or import events from ics files into native format. By the way, when you say import, do you mean like reading events from khal's file once and appending them to your calcure events, or more like continuous syncing with khal's file? |
I'm still experimenting calcure so I don't know if I'll make a total migration right now. In this case I would be doing a continuous syncing, even if that means run some code from caculre each time I need it to update. |
Just an FYI guys - Khal uses an SQLite db to store its entries. It's usually stored somewhere like It's common to use Khal in conjunction with something like vdirsyncer where you would configure Khal to parse ics files in a local directory, which I think is where OP might be getting confused. Here's a sample query to get all events SELECT item, recs_loc.href, dtstart, dtend, ref, etag, dtype, events.calendar
FROM recs_loc
JOIN events
ON recs_loc.href = events.href
AND recs_loc.calendar = events.calendar
ORDER BY dtstart; HTH |
Hello vdirsyncer gets individual files from remote repo Pro : vdirsyncer runs once, it is faster than with single ics file |
Hello @Tonus1 @diego-rapoport does that work for you? I mean I am afraid I won't write a real parcer from khal's sql database, so sync can be achieved via .ics files only. In the future, I am thinking to make an importer that turns items in .ics files into native calcure ones. |
Thank you for your quick reply Roman.
I just read some issues that explain very well the state of
developpement. A bit sorry to have written too fast !
I've got about a dozen calendars and it's not a trivial job to get
another synchro up. And it uses a bit more bandwith I would like.
Anyway, I will stick around here, the UI worths it ! I submited the
build script for Slackware-15.0 at slackbuilds.org and I think it will
be avaible next week. Hoping more folks will get involved and give some
help.
Regards,
Tonus
|
Actually, now as I think about it, it shouldn't be too difficult to support folders instead of single files. I'll just check if it's not ending with |
So, in bd8e9ae I implemented reading from ics folders. Now you can put either a folder or file or url in your config. Just pushed version 2.8 to Pypi please |
There's indeed something better now !
Got rid of most of this (my script still fails to find some in one of the huge folder). Strange thing, another crash occurs even after I removed/substitute the offending file...
File is
|
Interesting, could you also check info.log file (in your config folder)? It should specify what has gone wrong. I feel like it might be a specific .ics file, and errors are coming from py-ics library. To be honest I doubt I can do much about it, except excepting these errors and just skipping bad files, but I'll take a look. |
So, in version 2.8.1 I've added #710ba1fd5cbf46bb8ebe47e84b2966480885fbaa a general exception for now, so that the program does not crash. Now it should read all files except problematic ones, and in your If we knew which line in the file causes the problem, I could still skip this line before trying to parse the file with py-ics (like I do with other problematic lines), but like I said, I don't really see what's wrong here. Anyone else? |
Odd : got the same error even if I got rid of the problematic file. And still get the |
Sorry, more specifically? |
When I unpack the tarball, I had to modify my install script because the folder indicates 2.8 and not 2.8.1 |
Ah, sorry, I mean I pushed the update 2.8.1 to pypi but here on GitHub I tend to publish releases only for major changes. So, the new version can be installed only from pip. |
Hi
|
Hmm, that's strange. I'd say:
and so on, up to 10 colors. If you specified only a few (3 or 4 by default), only the first few calendars have different colors and the remaining assume the value of the last one. Is that what you mean? EDIT: Yes, the whole parsing breaks if one fie is broken. I fixed that now. I'll push the new version a bit later. |
Hi Thanks a lot for your help |
First find, the events on multiple days show as single day. This one in only visible on the first day :
I continue to search. |
Found that I was missing a few deps for holidays : I'll soon update the build scripts on slackbuilds.org. |
Also, note that this setting must be inside the Colors block of config.ini
No, only config.ini. But just to make sure that it's not some parameter causing trouble, try removing config.ini and starting the calcure. By default it should show US holidays. If still no luck, check in which "environments" you are. Sometimes people install general python libs into one environment but then run calcure from another. In general, I advise uninstalling everything related from pip, or AUR, or any other method, and the clean install:
|
Unfortunately, recurring events are not supported yet, because last time I checked py-ics does not support it yet |
That was the culprit ! I was replacing all reccuring event and had archived everything too old when I saw your message. Everything is ok now ! thank you very much ! Will you release the 2.8.2 on github or shall I stick packaging the Pypi version ? Best regards |
Great! Okay, I'll release on GitHub but later today. Right now I am literally on snowboard :D |
@diego-rapoport Since we now can use same folder as khal I believe this can be closed now :) |
Okay, so I released 2.8.2, and this perhaps indeed concludes discussion reading Khal. |
Is it possible make an import from Khal Calendar events as well? If there's anyway I can help with that, I would be glad.
The text was updated successfully, but these errors were encountered: