Welcome to CS1315. Click on the python to add comments.
This page removed for FERPA compliance
Homework 5- Fall 2007
Due: Monday November 12th, 2007 at 7:00 PM
Quick Overview
For this assigment you are going to write a set of functions in JES which will make an html page based on the contents of a directory. Your html page will be made of links to media instances in the directory (sound or picture). Please read on for REMOVED information....
Details, Details, Details...
Your function should be named media (case sensitive) and your file should be named hw5.py
Your function should take in a directory
Your function should generate a html file named media.html
Rows: Rows: Your table should have one row per media item. Note: A media item is either a .jpg picture or a .wav sound If your directory only has 2 pictures and 2 sounds only 4 rows should be created
Columns: Your table should have 3 columns in the following order: A picture that links to either the sound file or the larger version of the picture, the filename, and finally the height of the image or the length of the sound
For each image, you will display a 75 pixel height version of the image (by setting height="someNumberHERE" in the img tags) and make the image a clickable link which takes you to the full size version of the picture
For each sound, you will display the filename of the sound and a special sound picture that you pick out, it must be renamed to "soundPic.jpg" (make sure that it is appropriate). Note: The filename of the sound should appear in the second column and the soundPic should be the same for every sound and appear in the first column.
You must account for pictures ending with .jpg, .JPG, .jpeg, and .JPEG and sounds files ending with .wav and .WAV
At the bottom of your page you should have the total number of media items
REMOVEDmmary/Checkoff list
You will be graded on the following:
Your function name and file are correct
Your function takes in a directory
Your function generates a html file named correctly
You use at least two functions
Your html file displayes the required information in the correct order
You accounted for both .jpg, .jpeg, .JPEG, and .JPG endings
You have the correct number of pictures in the directory displayed
How the TA will grade
Your TA, after loading your code into JES will type the following:
>>> setMediaPath() (to where soundPic.jpg is located)
>>> dir = pickAFolder()
>>> media(dir)
Then your TA will navigate to the directory orginally chosen and open the html file created.
At last extra credit
5 points of extra credit - Instead of just setting the heigth to 75 using the height attribute of the picture generate you must generate new pictures using writePictureTo which are 75 pixels tall. When you click on the small version of the picture it should take you to the original picture.
Please note that you are NOT allowed to use the scaling utility to do this!
Extra Credit: +15 points For this section, you need to upload the page you generated to your prism account. In your collaboration statement, you need to specify whether you have done the extra credit.
Rename the html page you created above to index1.html.
Follow these instructions on this page - its the same instructions for Windows or Mac
When your are done, go to the following link and see if your page is there - http://www.prism.gatech.edu/~prismID/index1.html
This is extra-credit so we may not show how to do it in class or recitation. You are expected to work on it and ask questions. Remember to add a line to your collaboration statement saying that you did the extra credit.