Bug 2712 - Orage: ability to load an external .ics file
: Orage: ability to load an external .ics file
Status: CLOSED FIXED
Product: Orage
general
: unspecified
: PC (x86) Linux
: Medium enhancement
: ---
Assigned To: juha
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-01-04 22:12 UTC by Colin Leroy
Modified: 2007-04-12 08:43 UTC (History)
1 user (show)

See Also:


Attachments
patch against svn 25178 (13.21 KB, patch)
2007-03-16 18:35 UTC, Colin Leroy
Details | Diff
2nd patch against 25178 (1.50 KB, patch)
2007-03-16 19:19 UTC, Colin Leroy
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description Colin Leroy 2007-01-04 22:12:20 UTC
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 UTC
chanching product
Comment 2 juha editbugs 2007-01-05 00:12:49 UTC
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 UTC
(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 UTC
sounds good. let's get back to this after Xfce 4.4 has been released.
Comment 5 Brian J. Tarricone editbugs 2007-01-26 18:58:46 UTC
Moving all bugs to new Orage product.
Comment 6 juha editbugs 2007-02-04 15:38:18 UTC
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 UTC
(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 UTC
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 UTC
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 UTC
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 UTC
Great, thank you !
Comment 12 juha editbugs 2007-03-16 15:49:03 UTC
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 UTC
Great! I'll test that asap.

svn updating... :)
Comment 14 Colin Leroy 2007-03-16 17:17:12 UTC
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 UTC
Created an attachment (id=1034) [details]
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 UTC
Created an attachment (id=1035) [details]
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 UTC
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 UTC
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 UTC
Thanks for your time and kindness! It's been really enjoyable to work together
:)
Comment 20 Colin Leroy 2007-03-22 07:25:22 UTC
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 UTC
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 UTC
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 UTC
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 UTC
in 4.5.9 (svn)