! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Orage: ability to load an external .ics file
Status:
CLOSED: FIXED
Severity:
enhancement

Comments

Description Colin Leroy 2007-01-04 22:12:20 CET
Hi,

It would be great if Orage could handle a second calendar as a read-only source.
For example, ~/.config/xfce4/orage/external.ics.
If it could also use a ~/.config/xfce4/orage/externalrc or equivalent to be able to specify an action to run when editing an event from this external source, it'd be perfect.

This would allow other calendar applications to be able to show their events in Orage, and to change them using this application; I'm thinking about the Claws Mail vcalendar plugin, for example.

Thanks,
Colin
Comment 1 juha editbugs 2007-01-05 00:07:53 CET
chanching product
Comment 2 juha editbugs 2007-01-05 00:12:49 CET
There will be export/import in Orage 4.5.
In other words it will be possible to import other calendar files into Orage and
export Orage appointments into os calendar files.

Not sure if this is what you need?  
Comment 3 Colin Leroy 2007-01-05 07:13:03 CET
(In reply to comment #2)
> There will be export/import in Orage 4.5.
> In other words it will be possible to import other calendar files into Orage
> and export Orage appointments into os calendar files.

Good news!

> Not sure if this is what you need?  
 
That'll help, for sure. With this, users will be able to subscribe to any calendar. What would be nice however, is if an external program could add or remove a "feed"; to re-use my previous example: this way I could add a little checkbox in Claws' calendar plugin preferences, 
[x] Export calendar to Xfce's Orage

I don't know if I'm really clear :) but in any case, when you'll have done the hard import/export work in Orage, I may probably be able to dive into its code and propose a patch.
Comment 4 juha editbugs 2007-01-05 16:57:53 CET
sounds good. let's get back to this after Xfce 4.4 has been released.
Comment 5 Brian J. Tarricone (not reading bugmail) 2007-01-26 18:58:46 CET
Moving all bugs to new Orage product.
Comment 6 juha editbugs 2007-02-04 15:38:18 CET
Orage export import is now available in svn (orage version 4.5.7+).

Note that this is not  production version, so there are some extra messages etc.

But it would be great, if you could try and let me know if this is what you 
wanted? Or should Orage keep the external file separate permanently? Now import
combines it with other Orage appointments and the added file does not exist after
that.
Comment 7 Colin Leroy 2007-02-04 18:03:32 CET
(In reply to comment #6)

Cool, you've been fast! :)

> But it would be great, if you could try and let me know if this is what you 
> wanted? Or should Orage keep the external file separate permanently? Now import
> combines it with other Orage appointments and the added file does not exist
> after
> that.
 
Yes, that's what I thought about - it'd allow to have Orage display an external source that it doesn't really handle, and for which updates come from somewhere else (in my case, it'd be the mailer's events list, or it could also be a calendar downloaded off the web from a crontab, etc)...
Comment 8 Colin Leroy 2007-02-04 18:35:50 CET
Anyway, I tested the import/export in SVN, and it worked very nicely. It's just missing a little feedback to notify of import success, maybe ;)

By testing I had a look at the GUI, and maybe what I'd like could be achieved with two radio buttons in the Import tab:

Read file: [            ] [find]
(o) Merge file into Orage calendar
( ) Subscribe to this calendar
Comment 9 Colin Leroy 2007-02-04 19:25:16 CET
Or, also, what I need could be achieved with no GUI at all, by having Orage just scan a given directory, (~/.config/xfce4/orage/subscriptions/ for example) for .ics files, updating them when their mtime changes. 
Comment 10 juha editbugs 2007-02-04 21:40:46 CET
Thanks Colin, I think I get the idea now. But it will take some time, 
being a bit busy now.

I will update this BUG after there is progress in this.

(And by the way, the code is full of:
/* FIXME: proper messages to screen */
so I will add those feedback...I just was not sure which version of the import
I keep...)
Comment 11 Colin Leroy 2007-02-04 21:48:32 CET
Great, thank you !
Comment 12 juha editbugs 2007-03-16 15:49:03 CET
revision 25178 in svn contains now first draft of this feature.

There are known problems still (specially in handling ical strings that
libical is not able to handle or Orage expects to find), but I hope this
code is enough to get feedback if it is delivering what is needed in this
feature request.

Please, check and let me know how it looks like. The change was rather big.
Comment 13 Colin Leroy 2007-03-16 16:35:56 CET
Great! I'll test that asap.

svn updating... :)
Comment 14 Colin Leroy 2007-03-16 17:17:12 CET
Well, it seems to work great! It only doesn't bold the days which have events from the foreign files. Maybe that's on purpose? but I suppose it'd be nice to be able to differentiate these days with foreign events, even if differently...
Comment 15 Colin Leroy 2007-03-16 18:35:19 CET
Created attachment 1034 
patch against svn 25178

Hi,

this patch adds handling of foreign files adding/deleting via the command-line. Its inclusion would allow me to have a "Share calendar with Orage" checkbox in my MUA's preferences... I hope it's fine!
Comment 16 Colin Leroy 2007-03-16 19:19:55 CET
Created attachment 1035 
2nd patch against 25178

This second patch enables marking days from foreign ical files too.
Comment 17 juha editbugs 2007-03-16 20:48:13 CET
Thanks. 

Yes I forgot to add the markings.
And nice patch for the command line, too.

Will add soonish when I have a bit time to check those.
Comment 18 juha editbugs 2007-03-21 21:47:03 CET
Added your fixes to svn revision 25250.

Small differences:
1) added RW option to add foreign file (-a).
   makes it possible to add ReadWrite files from command line also

2) added check to prevent cmd line foreign file updates when orage
   foreign files maintenance window is open.

3) start orage when adding/deleting foreign file if orage is not started

Thanks alot for your help here!!
Comment 19 Colin Leroy 2007-03-22 07:13:37 CET
Thanks for your time and kindness! It's been really enjoyable to work together :)
Comment 20 Colin Leroy 2007-03-22 07:25:22 CET
Hmm, by the way, it looks like you forgot the patch about the marking of days ;)
Comment 21 juha editbugs 2007-03-22 10:32:17 CET
Not really, but I forgot to add code to do it immediately after the add/delete
foreign file

Should work now in svn revision 25253.

There may be more bugs on this. it is kind of big change and pretty complex....
Comment 22 Colin Leroy 2007-03-22 10:43:07 CET
Ok, thanks! I'll watch my Orage clock closely, and will open other bug(s) if I find any. 

Will it be released with Xfce 4.4.1? (I think it'll be a bugfix release, so I suppose it won't...)
Comment 23 juha editbugs 2007-03-22 12:03:58 CET
Yes 4.4.1 is for bug fixes only so this will not be there.

But I try my best to keep svn stabil so that it should be safe to use that.
Comment 24 juha editbugs 2007-04-12 08:43:35 CEST
in 4.5.9 (svn)

Bug #2712

Reported by:
Colin Leroy
Reported on: 2007-01-04
Last modified on: 2007-04-12

People

CC List:
1 user

Version

Version:
unspecified

Attachments

patch against svn 25178 (13.21 KB, patch)
2007-03-16 18:35 CET , Colin Leroy
no flags
2nd patch against 25178 (1.50 KB, patch)
2007-03-16 19:19 CET , Colin Leroy
no flags

Additional information