Differences between revisions 3 and 15 (spanning 12 versions)
Revision 3 as of 2010-01-26 21:57:04
Size: 1997
Editor: trogdor
Comment:
Revision 15 as of 2010-09-13 15:58:46
Size: 2818
Editor: trogdor
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Scheduler is a simple python script that creates Instructional Lab Schedules (example: [[attachment:103_4320.ps]]<<FootNote(You can go to http://pages.cs.wisc.edu/~ghost/gsview/index.htm to get a viewer for ps files)>>) from a set of simple text files. By default, the program creates a summary page that has a 12-up view of all the schedules, and detail pages for each of the individual schedules (these are about 8 inches square). Scheduler is a python script that creates Instructional Lab Schedules from a set of text files. By default, the program creates a summary page that has a 12-up view of all the schedules, and detail pages (8.5" x 5") for each of the individual schedules that are suitable for labeling the lab rooms (please print these on green cardstock).
Line 4: Line 4:
== Example == == Configuration ==
Line 20: Line 20:
Input files must be named in the form `<lab num>_<room num>.txt`. The first column has a comma (',') with no space on either side separating the day of the week and the start time. Times are in 24-hour format. Columns are separated by any amount of tabs or spaces but cannot span lines. Lines may begin with an octothorpe/hash/pound-sign ('#') and they will be ignored. Blank lines are also allowed, so please include them between days for readability. Input files must be named in the form `<lab num>_<room num>.txt`. The first column has a comma (',') with no space on either side separating the day of the week and the start time. Times are in 24-hour format. Columns are separated by any amount of tabs or spaces but cannot span lines. Lines that begin with a pound-sign ('#') will be ignored. Blank lines are also allowed, so please include them between days for readability.
Line 22: Line 22:
To run the file just execute it from the command line (it takes no arguments): == Usage ==

To run the script just [[http://effbot.org/pyfaq/how-do-i-make-a-python-script-executable-on-unix.htm|execute]] it from the command line (it takes no arguments). An example of the output:
Line 25: Line 27:
[cwilson@trogdor]$ chmod +x scheduler.py
Line 34: Line 35:
Windows:
{{{
C:\Documents and Settings\user\Desktop\scheduler> scheduler.py
Generating summary in [summary.ps]...DONE
Generating individual in [103_4320.ps]...DONE
Generating individual in [104_3328.ps]...DONE
Generating individual in [201_4314.ps]...DONE
Generating individual in [207_4310.ps]...DONE
}}}

=== Extras ===

To aid in production of other associated materials (PNG images of the schedules). There is now included a [[http://en.wikipedia.org/wiki/Makefile|Makefile]] that can be used to automatically generate correctly-sized images (e.g. for use in the wiki). Running {{{make img}}} will run {{{scheduler.py}}} to build the PS files and then invoke {{{process.sh}}} which will convert the PS files to PNG files.

To run {{{make img}}} you will need to have:
 * [[http://www.ghostscript.com/|GhostScript]]
 * [[http://www.imagemagick.org/script/index.php|ImageMagick]]
 * Bash, or equivalent shell ({{{process.sh}}} is a shell script)
Line 36: Line 56:
 * tarball [[attachment:scheduler.tgz]]
Line 38: Line 57:
/!\ Please ignore the `.git/` directory in these archive files, this is for version control and can be ignored (unless you want to send me patches :) ). ''sha1sum''
{{{
0fd22360a93c4c9f05253166df94cdbba50088e6 scheduler.zip
}}}

Overview

Scheduler is a python script that creates Instructional Lab Schedules from a set of text files. By default, the program creates a summary page that has a 12-up view of all the schedules, and detail pages (8.5" x 5") for each of the individual schedules that are suitable for labeling the lab rooms (please print these on green cardstock).

Configuration

This is an example of the layout of an input file (called '103_4320.txt'):

M,12:05 301     Ojalvo    14:00
M,14:25 302     Carmody   16:20
M,16:35 303     Ojalvo    18:30
M,19:05 304     N/A       21:00

T,7:45  305     Carmody    9:40
T,9:55  306     Zeng      11:50
T,12:05 307     Zeng      14:00
...

and so on...

Input files must be named in the form <lab num>_<room num>.txt. The first column has a comma (',') with no space on either side separating the day of the week and the start time. Times are in 24-hour format. Columns are separated by any amount of tabs or spaces but cannot span lines. Lines that begin with a pound-sign ('#') will be ignored. Blank lines are also allowed, so please include them between days for readability.

Usage

To run the script just execute it from the command line (it takes no arguments). An example of the output:

[cwilson@trogdor]$ ./scheduler.py 
Generating summary in [summary.ps]...DONE
Generating individual in [103_4320.ps]...DONE
Generating individual in [104_3328.ps]...DONE
Generating individual in [201_4314.ps]...DONE
Generating individual in [207_4310.ps]...DONE

Windows:

C:\Documents and Settings\user\Desktop\scheduler> scheduler.py
Generating summary in [summary.ps]...DONE
Generating individual in [103_4320.ps]...DONE
Generating individual in [104_3328.ps]...DONE
Generating individual in [201_4314.ps]...DONE
Generating individual in [207_4310.ps]...DONE

Extras

To aid in production of other associated materials (PNG images of the schedules). There is now included a Makefile that can be used to automatically generate correctly-sized images (e.g. for use in the wiki). Running make img will run scheduler.py to build the PS files and then invoke process.sh which will convert the PS files to PNG files.

To run make img you will need to have:

Download

sha1sum

0fd22360a93c4c9f05253166df94cdbba50088e6  scheduler.zip

Bugs/Questions/Comments

Please contact cwilson@physics.wisc.edu

il: Scheduler (last edited 2017-04-21 14:38:46 by ChadSeys)