ICal's ".ics" File: Conversion of Standards-Based Data Objects to Tiddlers

150 views
Skip to first unread message

Brian Litman

unread,
Nov 13, 2019, 5:39:30 PM11/13/19
to TiddlyWiki
Further to the theme of portability and privacy (especially if encrypted) I wonder if there exists any historical work on a converter that will read an *.ics calendar file and turn it into a "Date-Formatted" Tiddler?

If I could code, I'd write it myself.

TiddlyWiki is my new attempt to liberate myself from the tyranny of Apple, Google and Microsoft-readable data (in the areas their AI knows to look!)

Further encryption will really do the job "good enough".

Any experienced users with ideas?

Kindly,  >>> B <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

TonyM

unread,
Nov 13, 2019, 6:15:13 PM11/13/19
to TiddlyWiki
Brian,

My comments on VCF largely apply to ics as well. From Google Calendar I exported a zip of all my calendar files. Dropping an ics on tiddlywik imports it as text. It looks like a data dictionary tiddler however it re-uses the same key names for each calendar entry. 

ics files can be whole calendars not simply single events. 

I would not be surprised if there is a way to convert ics files to csv files and import those as tiddlers. 

I have no doubt you can be liberated from the tyranny of Apple, Google and Microsoft with tiddlywiki but a little work (by you and the community) may need to be done, to remain interactive with them.

Regards
Tony

Brian Litman

unread,
Nov 14, 2019, 8:05:51 AM11/14/19
to TiddlyWiki
As long as one can at least download the data of the "Surveillance Capitalists" in a universal form, that is a good start.

##B

@TiddlyTweeter

unread,
Nov 14, 2019, 9:17:48 AM11/14/19
to TiddlyWiki
As far as I understand it .ics /iCalendar is formatted like this ...

BEGIN:VCALENDAR
VERSION
:2.0
PRODID
:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID
:uid1@example.com
DTSTAMP
:19970714T170000Z
ORGANIZER
;CN=John Doe:MAILTO:john.doe@example.com
DTSTART
:19970714T170000Z
DTEND
:19970715T035959Z
SUMMARY
:Bastille Day Party
GEO
:48.85299;2.36885
END:VEVENT
END:VCALENDAR

See: https://en.wikipedia.org/wiki/ICalendar

That structure looks the same as a simple TiddlyWiki Data Dictionary (ContentType:  application/x-tiddler-dictionary ) (see https://tiddlywiki.com/#DataTiddlers:DataTiddlers%20DictionaryTiddlers)

It would be a matter of creating a macro to read the data and assemble it in the layout you wanted. And the date fields could be read (DTSTAMP,DTSTART,DTEND) and converted to TW style.

.ics data can be very rich so part of issue would be determining the "fields" you needed.

It may be someone has done it already for TW because its not a fantastically difficult problem and I vaguely remember someone did, either for this or, similar, .vcf cards. 

But a question remains about the utility in TW. I mean you get the data. So what you gonna DO with it? :-)

Best wishes
TT 

PMario

unread,
Nov 14, 2019, 10:36:38 AM11/14/19
to TiddlyWiki
On Thursday, November 14, 2019 at 3:17:48 PM UTC+1, @TiddlyTweeter wrote:
...
It may be someone has done it already for TW because its not a fantastically difficult problem and I vaguely remember someone did, either for this or, similar, .vcf cards. 

>...its not a fantastically difficult problem...

hihi ... It actually is. The very first definition "3.1. Content Lines" in the spec RFC5545 already shows, that the format has nothing to do with a data-tiddler.

   For example, the line:

     DESCRIPTION:This is a long description that exists on a long line.

   Can be represented as:

     DESCRIPTION:This is a lo
      ng description
       that exists on a long line.

The iCAL format is very complex, because it is extremely powerful. First version of the spec seems to be by Oracle from 2009. Updates: 5546, 6868, 7529, 7953, 7986 come from Apple Inc.

Happily there seems to be a iCAL library from mozilla: https://github.com/mozilla-comm/ical.js that would allow parsing iCAL and vCARD data.

It is about 80kByte in size, but I don't think that there is any plugin yet. Docs can be found at: https://github.com/mozilla-comm/ical.js/wiki

have fun!
mario

@TiddlyTweeter

unread,
Nov 14, 2019, 11:23:50 AM11/14/19
to tiddl...@googlegroups.com
Far be it to for me to naysay you. The wrap needs unwrapping. But I can't see huge problems after that.

You are right that it proliferates fields. 

I think the question is WHAT would you need it in TW for? Is it worth pursuing?

TT, x

Brian Litman

unread,
Nov 14, 2019, 6:53:05 PM11/14/19
to tiddl...@googlegroups.com
First, I am absolutely new to this world.  But, the modularization of data has long been my Holy Grail.

Given the age of TWK, I suspected that experienced hands might have tackled common data representation problems long ago.

Of course, time and events are core to our lives. I envisaged that maybe there was a handle .ics to (favorable Tiddler format) already created by a kind coder.

I even surmised that there was a Tiddler or some coding of fields that could render a Calendar (block or linear).

I should probably clam up until I learn about the various Data Tiddlers that seem to exist.

That said CONTACT representation (.vcf conversion) is of far greater gravity.  And TonyM has been most kind in giving direction there.
###

TonyM

unread,
Nov 14, 2019, 8:25:18 PM11/14/19
to TiddlyWiki
Folks,

Although the devil is often in the detail, I think first, taking a strategic approach to tiddlifying such content and parsing the text field of a vcf or ics file into fields within the tiddler, is the smart approach (Leave data tiddlers aside, single tiddler solutions are better). When none unique keys occur add a number at the end of the fieldname. The thing is, a generic method of retaining all data but parsing it into a rich tiddler is all we need to do to convert such standards to tiddlywiki. Once we have such tiddlers it is then trivial to edit and change and regenerate such file formats to export using standard tiddlywiki features. This could also be developed to allow such rich tiddlers to drag and drop the item into another app. eg drag tiddler.ics to an email client to attach.

We could quickly build a library of text formats to rich tiddlers, and rich tiddlers to text versions (like the original file) and an export format.
The library will inform others how to build another converter so if one does not exist we can send them in the right direction quickly.

Its about developing the ecosystem, not the details of different formats, then participants with a direct interest in a particular file format do the work and share back.

Regards
Tony

On Thursday, November 14, 2019 at 9:39:30 AM UTC+11, Brian Litman wrote:

PMario

unread,
Nov 15, 2019, 8:46:55 AM11/15/19
to tiddl...@googlegroups.com
Hi Brian,

On Friday, November 15, 2019 at 12:53:05 AM UTC+1, Brian Litman wrote:
First, I am absolutely new to this world.  But, the modularization of data has long been my Holy Grail.

I think, that was a reason, for may of us to get / be interested in TW.
 
Given the age of TWK, I suspected that experienced hands might have tackled common data representation problems long ago.

There is a possibility to import .CSV file content into tiddlers, which probably solved many "batch import" problems.
The .tid and tiddlywiki .json format is easy enough to be created by many systems. ... So I think batch processing was solved that way. 

Your desire is a bit different.
 
Of course, time and events are core to our lives. I envisaged that maybe there was a handle .ics to (favorable Tiddler format) already created by a kind coder.

I don't think so. .. but there are several "calendar" projects.

 
I even surmised that there was a Tiddler or some coding of fields that could render a Calendar (block or linear).

see: link above.
 
I should probably clam up until I learn about the various Data Tiddlers that seem to exist.

We (I) don't want to "calm you down", if that is what you wanted to write. It's always good to see ideas and problems, that new users have.
So just keep posting ;)
 
That said CONTACT representation (.vcf conversion) is of far greater gravity.  And TonyM has been most kind in giving direction there.

Yea, we could have had the same discussion at your other thread. IMO vCARD and iCAL formats are similar enough to be parsed by the same code. ... The usecases are different.


As you wrote in your OP:

TiddlyWiki is my new attempt to liberate myself from the tyranny of Apple, Google and Microsoft-readable data (in the areas their AI knows to look!)

...made me think, that you need a lot more and different functionality from TW, that it actually has. eg: Activate the call-app from within a TW contact.

Also exchanging vCards with other systems ... Which basically means, that we need a proper UI in TW to deal with that kind of info. ... and so on.

have fun!
mario



TonyM

unread,
Nov 15, 2019, 5:06:58 PM11/15/19
to TiddlyWiki
Mario

The call app is that just the tel: protocol like mailto:

click to dial?

The protocol opens the app to handle it tiddlywiki just considers it a link.

Tony

bdli...@gmail.com

unread,
Nov 17, 2019, 8:14:23 PM11/17/19
to tiddl...@googlegroups.com, PMario

Thank you Mario.

I am encouraged (as a noob) to see that this TW5 pond is dynamic and responsive.

It bodes well for the project.

.......................................................................

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4fc9fce6-bd6b-4cfa-ade2-7f4280c17b6e%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages