A Project On Integrating VCard File Format For Import And Export

The VCard Contacts .vcf file format seems to me to be the most universal handled by all kinds of devices. It makes sense to have TiddlyWiki one of the ways we can store our contacts.

@pmario posted at “Any CalDAV or WebDAV server plugin?” that .vcf files can be imported properly. I tried it and it works! Thank you, Mario.

Naturally, the thing would be to enable an export of those tiddlers so that they are returned in their original .vcf. The information on how to do that can be found at TiddlyWiki.com:

https://tiddlywiki.com/#Creating%20a%20custom%20export%20format

The instructions take only a couple of minutes to follow. So importing and exporting are IN THE BAG!

However, there remains a small issue. When importing a .vcf file or any file for that matter, the extensions are included in the tiddler title. And that results in the extensions being duplicated when exporting. You might get something like this: AlfieA.vcf.vcf

. So that might need to be worked on.

Another thig that Mario brought up is a way to make the vcards presentable. So perhaps we could work on a list filter tiddler which will show the contacts as you would have them shown on one of your devices (phones).

There are some other things we might want to include such as filtering (work/home/friends, etc.).

Next, we could handle ICalendar ics. That’s going to be a big one.

Your thoughts.

3 Likes

One more thing: I know it’s bad manners to dump a AI chat into a post like this. But it may be helpful to the readers to include an upload of the the query in say, a tiddler. I have saved hundreds of such queries and I would like to share the one I had on this particular topic. I hope this is acceptable, but if it is not, please be sure to let me know. Thank you.
202504-161543-202504-161543-TWRS25-INQR00-Query-TiddlyWiki-VCARD-Adaptability-Import-Export.tid (7.6 KB)

Update: VCards and iCalendars and .gpx and all sorts of files are importable to TiddlyWiki. Are they exportable? They most certainly are! Do this for every .wtv (WhaTdeVer) and you will get the raw text and extension you are looking for. Instructions are here:

[TiddlyWiki v5.3.6 — a non-linear personal web notebook](https://tiddlywiki.com/#Creating%20a%20custom%20export%20format)

VCards, iCalendars, GPX Tracks, and everything are importable and exportable through TiddlyWiki.

Ok.

Now. What to do with the iCalandar? VCard and iCalandar are established formats.

That’s what I am working on now.

But there’s more… !! hint: can TW interpret email .eml? Answer:yes. Just a matter of time.

Could TiddlyWiki ever handle emails? Of course! So, for Project 2036 TW, let’s make it happen.

2 Likes

HTML mailto:// links work in TiddlyWiki and you can place details and body text in these links if carefuly crafted. The key gap is attachments, as a rule we need to convert the payload/attachments to a mime type to embed in the body of a generated email.

  • This allows the local machine or email handler to do the sending

I have long dreamed of being able to send an email with an attachment derived from the activity of a user on a website as a form of content generation and capture.

  • It needs this conversion to mime process.

No doubt there are Already javascript projects that could be installed for tiddlywiki to convert to mime types including images and binaries.

I’ve been thinking about TWX / TW 2036, and this, and I’m thinking that I’d like to see TW understand a wide range of data formats in core.

By “understand” I mean that it can take the data, and present it in a reasonably human readable format, which then provides a foundation for the building of full fledged tools that use it. The pretty-visual handling of text/csv is a good existing example of the idea

So - gpx, vcf, ics all sound fantastic to me. eml in it’s raw format is almost .tid format … or perhaps better to say that .tid is pretty close to RFC2822 format - and from that similarity I’ve been thinking about creating a trivial TW5 (node) → imap folder export script as a proof of concept.

I’m sure there are a bunch of other formats that would be useful (.pem format for SSL certs is one that springs to my mind, but that’s just because I deal with them a bunch professionally already)

A note on ics calendar format - timertools looks like it handles them within it’s calendar solution already, though I’ve not tested any of that myself: It's About Time! — TiddlyTools: "Small Tools for Big Ideas!" (tm)

1 Like

Please note that https://tiddlytools.com/timer.html is obsolete and has not been updated since August 2022.

The most up-to-date revision of TiddlyTools/Time/Calendar (and all other TiddlyTools add-ons) is hosted directly at https://TiddlyTools.com.

TiddlyTools/Time/Calendar can display “events” defined in several different ways:

  • “Event Lists” are tiddlers tagged with events. The format for an event list tiddler is plain text, where each event is defined on a single line using a simple format of: YYYYMMDD;description text. Multi-day events can be entered using YYYYMMDD-YYYYMMDD;description text to specify the starting and ending dates of the event. If an event is to be repeated on a yearly basis (e.g., the same date each year), then the YYYY portion of the date is replaced with four dots (....). For example: ....0101;New Year's Day, or ....1225;Christmas Day
  • “Time lines” consist of a timeline definition tiddler, tagged with timeline, and a SET of related tiddlers that define individual “timeline events” within that timeline. Timeline events can be associated with a timeline definition in several different ways:
    • by tagging the event with the title of the timeline definition tiddler
    • or, by including the event tiddler title within the list field of the timeline definition tiddler
    • or by matching a filter contained in a filter field of the timeline definition tiddler
  • Each timeline event tiddler consists of a text field containing some description of the event. This content can include any wikitext formatting you like, and can be a single-line, or many paragraphs with transclusions, images, tables, etc. A timeline event tiddler can be used to define “single day”, “multiple day range”, or “repeating annual” events using a combination of timeline.start, timeline.end, timeline.days, and timeline.type fields. See the “TiddlyTools/Time/Events” documentation (TiddlyTools/Time/Info) for more details.
  • TiddlyTools/Time/Calendar can also parse ICalendar files that have been imported as tiddlers whose title ends in .ics. This parsing is currently limited to recognizing the “DTSTART” and “SUMMARY” records with the tiddler to define single day events. The TiddlyTools Calendar admin interface can also be used to convert .ics tiddlers into simple “event list” tiddlers to improve processing performance as well as save space.

enjoy,
-e

1 Like

I agree, completely. Maybe we can have a further discussion on “understand”. As you point out it means to present the data.

Sometimes, more often than not, TW surprises me (in a good way).

Regarding the RFC2822 email text format:
Information on RFC 2822 » RFC Editor

You do not need to go to that link (sorry if you already have). But the main point is that it walks through the “Obsoletes: …” and “Obsoleted by … /Updated by …”. The TW36 project wants to maintain backward compatibility. Of course it can, should and will.

Here’s my biggest beef. TW, I love you right down to the core… but here it comes: Why are so many of the great plugins all over the place? The cleverly entitled “Its About Time” really says it all. I can’t think of anything that TiddlyWiki needs more than a calendar. That, and a spreadsheet. And an SVG drawing tool. And an email SMTP handler. And a file-manager-like tiddler manager.

Little tip for everyone. You can use files and file folders as your calendar.
2025 > 04 > 25 >TW Talk Message -Reply to nemo-san.txt

All while using .txt files and .tid files. Who needs software?

Am I preaching to the choir? It’s all doable.

Sorry this took a bit of time to get back to. My understanding with backwards compatibility is that it’s not as high a priority with TWX as it is within TW5 - which seems fair to me. Sometimes a break is worth it for genuine improvements, but shouldn’t be unless the value is there.

That’s a good direction. I used “Understand” in a very personification way, which really doesn’t help when designing IT systems. Thinking on it, I would say it would mean that TW core can take a file of a format it understands and turn it into TW-code consumable data (ie, field:value pairs that future plugins can search/filter/manipulate/etc), and human-readable data (a relatively simple function that displays the format in a friendly manner. Email again makes a useful example, where headers have a ton of field:value pairs, which email clients use to find threads and perform complex searches, but only display the most basic to users (from/to/date/subject)

So I’d imagine core as being able to understand files, and present data from them in field:value pairs that plugins can then utilise to build complex applications.

A while ago, I arranged to chat with a very close friend of mine who lives half-way 'cross the world and he sent to me an appointment in the form of an .ics (iCalendar) file. It went handsomely into my “Googly” and Outlook schedules. Upon looking into the standard, I found that there’s a whole lot of documentation on it and if we could comply (don’t you just love that word!), we could have an import-export for TW where we could “talk” (isn’t this Apple/Mac terminology) with our beloved scheduling applications. I now use Thunderbird.
The VCard and ICalendar formats are similar and are both basic and complex. Basic: because they require only three “fields”; BEGIN: VCARD, VERSION: 2.0 END:VCARD and N: John DOE, etc… But complex as they can include an infinite number of other fields.
If anything’s a perfect fit for a Tiddler, surely it must be VCards and iCalendars.

2 Likes

@AlfieA it seems to me the first step is to allow an .ics file to be imported by choosing a tiddler title, perhaps based on the filename and feeding all the provided data into fields. Now a designer / user has access to the ics and can write solutions to use them. If these are modified it would be helpful to be able to export an ics file as well.

  • Once we have an ics file tiddler, people can write there solutions to also interpret ics tiddlers, write and provide a view template and even an editor for such tiddlers.
  • The same mechanisium can then be used to import/view/edit/export other “found” filetypes and we build tiddlywikis ability to handle such imports nativly. By setting the tiddler format it is easier to write additional file handlers based on existing ones, and write solutions that leverage each file format.
  • Qnce used and established we can consider moving the the support into plugins and/or the core.

The above approach allows step by step development of facilities to handle a myriad of common files found in the wild. Rather than make it one big project we can build a powerful resource piece by piece, and it is more likely to happen.

For Example;

Drop an ics file on tiddlywiki.com its imported and given the title of filename, has the type set to text/calendar and the content placed in the text field.

It is now possible to build;

  • a viewer for text/calendar items
  • a converter to parse and store in fieldnames
  • an exporter of ics files

You can see in this example if we had a way to interogate the text field of a text/calendar to get fieldnames and fieldname values we could use this to;

  • Obtain the fields and values
  • Move into fieldnames with any fieldname disabiguations
  • Apply this according to documented standards of ics files
  • Use the same process to include support for additional and similar file formats.

Now we can get somewhat meta about this;

Build a tool to allow someone to import a representative file into a tiddler, then build on all the different components to support a given filetype;

  • Custom importer/exporter
  • View and edit templates
  • Export the resulting tiddlers as a tool for a give filetype

This would allow anyone comming accross an, as yet, unsupported filetype to build support for that file type then share with the community.

Why wouyld we move content into fieldnames?

Because fields already have a suite of tools to access, view and edit them independantly rather than reading from and writting to somewhere in the text field.

  • But when you export such a tiddler a “synthetic” text field can be generated from the fieldnames to export as a “flat file”.
  • More expierenced users like myself are used to itterating all non standard fieldnames and their values from a tiddler, be it as found or from a defined set of fieldnames.

note:
I think the tiddler may be imported with the filename but this should also be stored in a filename field, and allow the tiddler to be given a user friendly event name.

As voiced elsewhere tiddlers and their fields could be accessed as rows in a table, in the form of other database solutions, by filtering them based on a filter you then define a table, made up of rows.

  • A small set of additional standards would allow us to mark items (table rows/tiddlers) as canceled, past or archived without loosing information by deletion.
  • In this case you would then have a table of events you can list and manage or view as desired.

One area I have identified with email handling is the ability to handle embeding files into the body or text field with mime types and appropriate encoding. I belive support for this will allow us to build emails from tiddlywiki content and interactions as well as import full emails including attachements, even if these are ultimatly externalised.

  • So I belive we need to investigate extending tiddlywiki support to embeded mime types (some support already exists) is has just no being brought forward for designers and non-coders to use.

Are you considering embedding multiple mime-types inside a single tiddler, or making any attachments separate tiddlers that are included by reference, by transclusion, or by some other mechanism?

To me the former is closer to the Philosophy of Tiddlers. But the latter is certainly possible with data-uris. We discussed this a few months ago; I demonstrated that it’s not terribly difficult to do, but it took an argument from @Springer to convince me that it’s a good idea; that the Philosophy of Tiddlers is more contextual than absolute.

1 Like

Certianly both, depending on how we recieve or build an email, the body can contain text and mime encoded files and even if we parse them into seperate tiddlers, when we go to send them they need to be combined again. So yes both.

Since this is needed if we then allow the user/designer clear power and visability of this they can explore and develop ideas we have not even thought of.

  • eg tool to collect and email icons

There already exists a parser like that for ICS files: GitHub - tiddly-gittly/ical-calendar-importer: Import *.ical calendar file exported from services like GoogleCalendar into TiddlyWiki.

I didn’t get on with it as it requires a very specific workflow where it creates a separate tiddler with tags, etc. It also doesn’t escape a lot of characters and I’d often end up with erroneous behaviour, so I quickly stopped using it.

As I previously commented, TiddlyTools/Time/Calendar can also parse ICalendar files that have been imported as tiddlers whose title ends in .ics. This parsing currently recognizes the DTSTART, DTEND and SUMMARY records within the .ics tiddler to define single-day and multi-day events.

To try this, just visit https://TiddlyTools.com and then drag-and-drop any .ics file to import it. Then, open the TiddlyTools Calendar admin interface (the gear icon above the calendar) and, in the “Events and Timelines” section, select the checkbox for the newly imported .ics tiddler. That’s it… your events will now appear in the TiddlyTools Calendar display.

Note that the TiddlyTools Calendar admin interface can also be used to convert .ics tiddlers into simple “event list” tiddlers to improve processing performance as well as save space. Just click on the “menu” icon next to the listed .ics tiddler and choose the “copy” icon. This will create a new “event list” tiddler based on the contents of the .ics tiddler. You can then delete the .ics tiddler and select the checkbox for the new event list tiddler to complete the process.

Also note that TiddlyTools/Time/Calendar is a single stand-alone wikitext tiddler (no dependencies or javascript add-ons required!) that can be easily added to your own TiddlyWiki file simply by using drag-and-drop to import it from https://TiddlyTools.com.

enjoy,
-e

2 Likes