Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 94 lines (57 sloc) 2.765 kb
667da2f simonthum Initial commit
authored
1 # ical2org.rb
2
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
3 An iCalendar to org-mode converter in pure ruby
667da2f simonthum Initial commit
authored
4
5 Converts iCalendar (rfc2445) to org-mode files using the
6 tremendous RiCal gem.
7
4ba19a5 simonthum change license to CC zero
authored
8 2012 by Simon Thum (released under CC0)
667da2f simonthum Initial commit
authored
9
5d820cf simonthum a bit more readme
authored
10 ## Features
11
12 * Filtering input based on date or todo state (more is easy to add)
13 * Proper handling of (most) repeating dates
14 * Handles vTODOs, not just events
15 * can be adapted to your setup by you ;)
16
17 This is intended for ruby-savy people; until it grows command-line
18 options that is the conditio sine qua non.
19
667da2f simonthum Initial commit
authored
20 ## Install
21
22 Requires
23
2117000 simonthum tested with ruby 1.9
authored
24 * ruby (tested with standard ruby 1.8.7, 1.9.2)
667da2f simonthum Initial commit
authored
25 * the rical and tzinfo gems
26
5d820cf simonthum a bit more readme
authored
27 Just invoke using `ruby` or do `chmod u+x ical2org.rb`.
28
667da2f simonthum Initial commit
authored
29 ## Useage
30
31 Pack ical2org into a script containing roughly
32
47dfac4 simonthum emacs markdown mode is not a good reference for github markdown
authored
33 ical2org.rb <input.ics | cat my.orgheader - >my_calendar.org
667da2f simonthum Initial commit
authored
34
35 Yes, this prepends a header which is suggested to at least declare the PROPERTIES
36 and ICALENDAR drawers - or, just remove the latter from the built-in org templates.
5d820cf simonthum a bit more readme
authored
37 In that case, you do not need a header at all.
667da2f simonthum Initial commit
authored
38
39 I recommend setting the resulting files read-only to avoid unwanted changes. This
40 script is not fit for round-trip org<->ical synchronization.
41
5d820cf simonthum a bit more readme
authored
42 ## Advanced syncing
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
43
44 The headers I prepend to my synced stuff look approximately like:
45
47dfac4 simonthum emacs markdown mode is not a good reference for github markdown
authored
46
47 #+TITLE: Department dates
48 #+DRAWERS: PROPERTIES ICALENDAR
49 #+FILETAGS: :@work:imported:
50 #+LINK: edit https://webstuff.company.com/groupCal/%s.ics/edit
51
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
52
53 The title is pretty straightforward. Next, I declare the two drawers
54 so I don't see iCalendar text unless I want to - you can also simply
55 cancel the output by removing the ERb tag.
56
de1791a simonthum minor README fix
authored
57 Then, I declare the tags I use for agenda filtering - including
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
58 "imported" in case I want to get rid of anything not natively org.
59
47dfac4 simonthum emacs markdown mode is not a good reference for github markdown
authored
60 The `#LINK:` part is the cool stuff. It declares an "edit" link type
de1791a simonthum minor README fix
authored
61 which points to my calendar in our groupware and has a `%s` where the
62 iCal UID is normally placed. Guess what - my template has a line that
63 (roughly) says
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
64
47dfac4 simonthum emacs markdown mode is not a good reference for github markdown
authored
65
66 [[edit:<%= ev.uid %>][edit this in the webby webs]]
67
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
68
69 Neat, huh? No syncing issues - just edit the origin source. Of course
70 this requires a REST-savy web interface, so I've commented out that
de1791a simonthum minor README fix
authored
71 part in the default templates.
635f022 simonthum Make it easy to add backlinks into a web groupware
authored
72
73 ### Notes
667da2f simonthum Initial commit
authored
74
75 This script is intended to be modified to suit your purposes.
76 If you add something of value to others, please consider
77 contributing.
78
79 It should be easier to adapt than the comparable awk-based solution,
80 but certainly it is far from perfect.
81
82 ## License
83
4ba19a5 simonthum change license to CC zero
authored
84 I declare this work to be useable under the provisions of the CC0 license.
667da2f simonthum Initial commit
authored
85
4ba19a5 simonthum change license to CC zero
authored
86 http://creativecommons.org/publicdomain/zero/1.0/
87
88 Attribution is appreciated, but not required.
667da2f simonthum Initial commit
authored
89
90 ## Thanks
91
92 Thanks go to the org-mode community for providig such a fine product, and to my
93 employer, Fraunhofer IGD, for supporting the publication of this script.
Something went wrong with that request. Please try again.