W3C CVS Root

2003/weekly-view/

Weekly-view from an RDF calendar document

Weekly view from an RDF calendar document

weekly.pl is a Perl script generating an XHTML weekly view of an RDF calendar document.

This is experimental. Below is the documentation for both the tool usage and the information supported and the list of files.

Usage

In order to see how to use weekly.pl, type:

./weekly.pl -h

Basically, call weekly.pl with the URL for the RDF calendar document as an argument; here is the help message for version 1.3, which may not be the latest version:

hugo@jibboom ~/weekly-view> ./weekly.pl -h
Usage: ./weekly.pl <URL>

  -f <day>      First day to show (default: Monday)
  -l <day>      Last day to show (default: Sunday)
  -b <time>     First time to show (default: 8am)
  -e <time>     Last time to show (default: 8pm)
  -i #          Step, in minutes (default: 30)
  -z #          Timezone offset for display, in hours
  -w #          Width of the time column, in percent (default: 5)
  -o            Show only worked hours
  -s <URL>      Add URL as a stylesheet in the output
  -c <encoding> Specify output encoding (default: iso-8859-1)
  -n <file>     Specify output filename (default: STDOUT)

  -h            This help message
  -v            Show version
  -d            Debug mode
  -q            Quiet mode

See http://dev.w3.org/cvsweb/2003/weekly-view/ for more information.

Example

The following generates the XHTML document /tmp/openingHours.html representing the weekly schedule for the opening hours use case, from 8am to 11.30pm, from Monday to Sunday, using the example style sheet:

./weekly.pl -n /tmp/openingHours.html \
    -e 11:30pm \
    -s http://dev.w3.org/cvsweb/~checkout~/2003/weekly-view/exampleStyleSheet.css \
    http://www.w3.org/2002/12/cal/test/openingHours.rdf

Support for XHTML classes in the output

The class attribute of the XHTML 1.0 namespace attribute is recognized and used in the output.

Support for working hours

@@@ Need more explanation

It is possible to define working hours outside of which events or ignored. See the -o switch and the type attribute in the http://www.w3.org/2003/07/wsched# namespace.

Note: is this the right way to do that?

Example

    <component>
    <Vevent wsched:type='working'>
      <dtstart rdf:parseType='Resource'>
        <dateTime>2003-07-07T03:00:00</dateTime>
      </dtstart>
      <dtend rdf:parseType='Resource'>
        <dateTime>2003-07-07T14:00:00</dateTime>
      </dtend>
      <rrule rdf:parseType='Resource'>
      <byday>MO</byday>
      <freq>WEEKLY</freq>
      <interval>1</interval>
      </rrule>
    </Vevent>

Support for links

It is currently done using xlink:href on Vevent.

Example

    <component>
    <Vevent html:class='phone' xlink:href="http://my-local-mall.example/">
      <dtstart rdf:parseType='Resource'>
        <dateTime>2003-07-09T11:00:00</dateTime>
      </dtstart>
      <summary>Going shopping</summary>
      <dtend rdf:parseType='Resource'>
        <dateTime>2003-07-09T12:00:00</dateTime>
      </dtend>
      <rrule rdf:parseType='Resource'>
      <byday>WE</byday>
      <freq>WEEKLY</freq>
      <interval>1</interval>
      </rrule>
    </Vevent>
    </component>

Status

A to-do list can be found at the top of the code. Contributions, ideas, suggestions welcome.

The most important item is that the parsing of the RDF document should be done with RDF::Core instead of using the XML DOM as it is done right now.


Hugo Haas

Click on a directory to enter that directory. Click on a file to display its revision history and to get a chance to display diffs between revisions.

Current directory: [Public] / 2003 / weekly-view


File Rev. Age Author Last log entry
[BACK] Parent Directory        
[TXT] README.cvs.html 1.7 20 years hugo Added link to list of files
[TXT] weekly.pl 1.6 20 years hugo Moved xlink:href from summary to Vevent to use valid RDF
[TXT] exampleStyleSheet.css 1.2 20 years hugo Added wsoff class

General options
,

Webmaster