This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS2044 Homework 2 March 8, 2010 CS2044 Homework 2 Due: March 14th, 11:59pm. Submit solutions to CMS, http://cms.csuglab.cornell.edu Turn in: gen-toc.sh , gen-page.sh , and gen-makefile.sh Introduction This homework is mostly about shell scripts, but will include a bit on make and makefiles at the end. What youll be implementing is a simple set of scripts to generate a web site, automatically maintaining a table of contents of the site on all the pages in site. This homework requires some familiarity with HTML. The web is littered with introductions to html, here is one http://www.web-nation.com/lessons/html-pri.htm Heres a quick overview of the setup I have in mind. You want to create a small web site, say made up of three web pages. You want each of these pages to have some content, but also to have a table of contents allowing you to go to any of the other pages. You do not want to manage this by hand: adding a new page to the site requires you to change the table of contents on all the other pages, a process that is both error-prone, and sheer tedious. Enter automation. Instead of writing the web pages directly, you create corresponding to every web page two files. The first contains the title of the web page, and the second contains the content of the web page. For example, you may have a file main.title : Main page and a file main.content : <p> This web page only has the following sentence. Its pretty lame. </p> Notice that the content file contains HTML code, the HTML code that will be used to create the final web page. By convention, well assume that all titles go in files with extension .title , and all contents go in files with extension .content (and the prefix of those files is the same). In the end, the pair foo.title and foo.content will be used to create a file foo.html , the actual web page that will be part of the site. But for now, your web-site-to-be is a set of .title files and corresponding .content files....
View Full Document
This document was uploaded on 03/15/2010.
- Spring '09