Schedule Generator is a Perl script that creates a weekly schedule as a Scalable Vector Graphics image.
The script is implemented as a module, giving the flexibility to use the same code in a CGI script, such as on the demo site, or a Perl one-liner. It is dependent on the SVG module. You can access the primary method of Schedule Generator, called "as_string", from any Perl program, which is explained in the POD embedded in Schedule_Generator.pm.
To create a schedule quickly, input a YAML data structure, then use the following command: cat example.yml | perl -e 'use Local::Schedule_Generator; use YAML; print Local::Schedule_Generator->as_string(%{Load do {local $/; < STDIN >;}});' > /tmp/sched.svg; inkview /tmp/sched.svg. Replace "example.yml" with your desired file name and "inkview" with your preferred SVG viewer. The program also includes an example YAML file for reference.
If a bitmap version of the output is needed, open the image with Inkscape or use ImageMagick to convert the SVG. The author of the script chose to place Schedule_Generator.pm in the "Local" namespace because it is too specific for CPAN but belongs somewhere distinct. Anyone can edit the numeric variables in Schedule_Generator.pm that control the proportions of the schedule for more control over the output.
Despite the author's unconventional brace style, the script is Pythonic in appearance and easy to read. To learn the YAML data serialization language used in the input file of Schedule Generator, a five-minute guide is available. More information can be found in the documentation for Perl's YAML module.
Version 1.0: N/A