Automatic lecture calendar for camtasia relay videos

Jeff Norden, Oct 26, 2011

I wrote a script this fall to automatically generate a calendar with clickable links to my lecture videos. My basic motivation was laziness—I got tired of having to copy and paste the link for each lecture. But it also provides a more convenient interface for the students to use. To see what it looks like, just go to

http://math.tntech.edu/jeff/m1010_11f

The script runs each time someone visits the link. It scans the directory it is called from and creates links for each lecture video. So, the lectures are available to the students as soon as Camtasia processes them, without any intervention by the instructor.

With some help from Mike Wheeler, we've installed the script to enable any faculty to use it. If you are interested in trying it out for your class(es), read on.


Setting up the lecture calendar for your class

To set up the calendar for a class, just follow these easy (well, not too terribly difficult) steps:

Step 0: If at all possible, create a separate directory on the cmat server for each class that you record lectures for. Hopefully, you've already done this. If you are only recording lectures for one class, you could skip this step for now. The calendar script works by scanning the directory it is called from. So, if there are lectures from multiple classes in one directory, you'll get unpredictable results—only one lecture for each day will be linked.

To set the directory that the lectures for a class go into, log into your camtasia.tntech.edu account and set a different "appended path" for each of your classes. To get to the correct screen, hover over the "Profiles" tab and then click on "Publish Account Setup". Stacy or I can probably help you with this step if needed.

Unfortunately, if you change this setting in mid-semester, then you'll also want to move or copy your old lecture files into the new directory (if you want the calendar to show the whole semester's lectures). Each lecture has five files: html, swf, mp4, xml, and jpg, all of which are needed.

Step 1: To enable the calendar, you need to create two special files in the directory on the cmat server that contains your lecture files. The files must be named .htaccess and Header.txt. You can start by getting the files from:

http://math.tntech.edu/jeff/lecture-cal-files/

After downloading the files (right click and do save-as), rename htaccess_prototype to .htaccess (note the period at the beginning of the file name), and upload it to your directory on the cmat server. The Header.txt file needs to be edited before you upload it.

Step 2 Edit the Header.txt file. This file serves two purposes. It provides the text (in html) that appears above the calendar, and it also tells the script what year and months to print the calendar for. At a minimum, change "Univ 9999" to your class (e.g., "Math 1010"), and "Fall 9999" to the correct semester (e.g., "Fall 2011", "Summer 2012", "Spring 2012", etc). You can also add your name or any other text you like. However, the semester and year must appear in the format shown. After you've edited it, upload Header.txt to your lecture directory on the cmat server.

Step 3 Type the appropriate url into your web browser and check that the calendar works. The address will be of the form

http://cmat.tntech.edu/yourname/path/

where yourname is your login name (e.g. jnorden) and path is the path to the lecture directory (whatever you chose in step 0). Then just let your students know about this address.

Additional notes and features

I also save a pdf file for each lecture I record, which has just the text of what I write on the tablet. These are fast to view, and make a good "study guide" for students to use before exams. If you upload the pdf files to the same directory that contains the videos, then the calendar script will also index them (and it provides a button to switch between video and pdf). For this to work, the name of each pdf file must be in a specific format which tells the script the date of the lecture. For the lecture I recorded today, the file is named: m1010-Oct-26.pdf   The characters at the end of the file name (before the .pdf extension) must be of the form: "-mmm-dd" where mmm is the name of the month (or an abbreviation) and dd is the day (you can use one or two digits at the beginning of the month, -Oct-3 or -Oct-03 both work). The part of the file name before the month can be anything you like, so math1010-October-26.pdf or math_concepts-Oct-26.pdf would also be fine. Note that the year isn't included in the file name. If you re-use a directory from a previous semester, be sure to remove the old pdf files or they might show up in the calendar.

There is a line at the end of Header.html which looks like this:
<!-- pagetitle="Lecture Archive" -->
This is an html comment that is used by the script to set the "page tile". This is used, e.g., as the default bookmark name if a student decides to bookmark the calendar page. If you like, you can change "Lecture Archive" to something specific for your class, e.g.,
<!-- pagetitle="Math 1010 Lectures, Fall 2011" -->

The dates for the video lectures are extracted from the corresponding xml files. Unfortunately, the versions of camtasia from before Fall 2011 didn't record the lecture dates (and the dates in the camtasia file names are sometimes incorrect). So it will require some work to create a calendar for lectures from previous semesters. (Let me know if there is a need for this.)

It you want something to appear after the calendar, create a file called Footer.txt with some text in it and upload it to the same directory. I'm using this to remind students about exam dates. You might also use it to list the topics covered in each lecture. (But then you'd have to edit the file after each class.)

The Header.txt and Footer.txt actually contain "snippets" of html, not plain text. This html gets inserted into the page at the appropriate places. It is possible to use an html editor to customize them, but you have to be a bit careful. First, change the file extension from txt to html, and then edit the file with your favorite html editor. Then, change the extension back to txt and open the file again. You now need to change the file from a genuine html file back into a "snippet". Remove everything at the top of the file from the "<doctype..." up through and including "<body>". Then, remove "</body>" and "</html>" from the end of the file. Make sure the semester still appears as something like "Spring 2012", with just one plain space between the semester-name and the year.


Please let me know if you find the program useful. Also, feel free to contact me if you have an suggestions and/or problems. My email is jnorden(at tntech.edu), and my phone is x3592.

-Jeff