HellOnline

Icon

Eran's blog

mini-Project: RSS Transformer

Finals are here and I’m looking for anything to get my mind off of studying, what a great time to start a new mini project!

The final goal for this project is a web application that can generate and mangle RSS feeds in various ways. I’ll start off with 2 options:

  1. Import an iCal calendar and generate an RSS feed of hCal events.
  2. Randomize the order of items in a given RSS feed

These are simply based on things I wanted to do in the past (import Niall Kennedy‘s tech events file and randomize the order of photos in my flickr feed). I’ll be glad to play with any additional ideas so just go ahead and post your favorite transformations here.

update: RSS results of version 0.1 ical importer are available.

Advertisements

Filed under: Projects, The Net

3 Responses - Comments are closed.

  1. Tantek says:

    Eran,

    This is awesome. What a great way to repurpose .ics feeds.

    I took a look at the sample http://smallweb.cs.usfca.edu/events.xml

    and there are a few minor things you can do to make the hCal markup valid XML (valid XHTML even):

    First, you may omit the “”, because it is optional, and should only be used if you really mean to post separate whole calendars rather than just separate events in one calendar stream.

    Attribute values must be quoted in XML, thus this would be better:

    Next:

    This is the second of Stanford University’s 2005…

    I would recommend simply omitting the , because first, it is invalid inside a , and second, with as much text is in some of these event “summaries” you really want to let it wrap naturally.

    Ok.

    For compatibility with XHTML 1.0 Appendix C, you should put a space ” ” before the empty tag closing “/”, e.g.:

    Thu May 12 16:30:00 PDT 2005

    A few things here. First, the class and title attributes should be quoted. Second, you want “dtstart”, NOT “dtstat”. I’m sure that’s a typo. Third, you want to put the letter “T” between the date and time, and put the time zone offset at the end of the ISO8601 date:

    Thu May 12 16:30:00 PDT 2005

    And that’s it. The rest looks great!

    Thanks for writing this useful tool.

  2. Tantek says:

    Oops, looks like the sample markup didn’t get escaped by the comment system. Let me try again. -Tantek

    ===========

    Eran,

    This is awesome. What a great way to repurpose .ics feeds.

    I took a look at the sample http://smallweb.cs.usfca.edu/events.xml

    and there are a few minor things you can do to make the hCal markup valid XML (valid XHTML even):

    <span class=”vcalendar”>

    First, you may omit the “<span class=”vcalendar”>”, because it is optional, and should only be used if you really mean to post separate whole calendars rather than just separate events in one calendar stream.

    <span class=vevent>
    <span class=summary>

    Attribute values must be quoted in XML, thus this would be better:
    <span class=”vevent”>
    <span class=”summary”>

    Next:

    <pre>This is the second of Stanford University’s 2005…

    I would recommend simply omitting the <pre>, because first, it is invalid inside a <span>, and second, with as much text is in some of these event “summaries” you really want to let it wrap naturally. If you want to make the summary its own block from a display perspective, simply put style=”display:block” on the summary span, e.g.:

    <span class=”summary” style=”display:block”>

    Next:

    <br/>

    For compatibility with XHTML 1.0 Appendix C, you should put a space ” ” before the empty tag closing “/”, e.g.: <br />

    <abbr class=dtstat title=200505121630>Thu May 12 16:30:00 PDT 2005</abbr>

    A few things here. First, the class and title attributes should be quoted. Second, you want “dtstart”, NOT “dtstat”. I’m sure that’s a typo. Third, you want to put the letter “T” between the date and time, and put the time zone offset at the end of the ISO8601 date:

    <abbr class=”dtstart” title=”20050512T1630-0700″>Thu May 12 16:30:00 PDT 2005</abbr>

    And that’s it. The rest looks great!

    Thanks for writing this useful tool.

    Tantek

  3. limbo says:

    Thanks Tantek,

    proposed fixes incorporated into current version. Source should be available soon.

    limbo.

%d bloggers like this: