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.
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.
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
The class attribute of the XHTML 1.0 namespace attribute is recognized and used in the output.
@@@ 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?
<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>
It is currently done using xlink:href
on
Vevent
.
<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>
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.
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 | |
---|---|---|---|---|---|
Parent Directory | |||||
README.cvs.html | 1.7 | 20 years | hugo | Added link to list of files | |
weekly.pl | 1.6 | 20 years | hugo | Moved xlink:href from summary to Vevent to use valid RDF | |
exampleStyleSheet.css | 1.2 | 20 years | hugo | Added wsoff class |