bs2gs

FreeSoftwareToFreeTeachers

Learning Guile Scheme is helping me to implement D.R.Y. for teachers. The script below opens .csv files (encoded in the troublesome SJIS or cp932 Japanese character set). For each .csv file the script saves three files: two html files and a scheme file. Printing the html files provides a seating chart to start the semester, and a roll sheet for use throughout the semester. The scheme file is provides a way to end the semester by printing a simple html page to show class dates and attendance. That second script still needs to be made presentable. But the starting script may be useful.

Developing the script let me discover compact expressions to open and write files. Longer expressions derived from Kent Dybvig's /The Scheme Programming Language: Fourth Edition/ worked. Shorter expressions from the Guile Manual helped. There must be a simpler way to print scheme definitions to a file but now I use and output string and juggle symbols and strings. It's awkward, but it works for now.

With simple html (generated by sxml->xml) and .css (view2.css file) the pages have a good “ink to data” ratio. I think the style is consistent with that found in Koreo Kinoshita's (木下是雄) books: “Writing Techniques for Science Majors” 理科系の作文技術 and “Putting Together Reports” レポートの組み立て方 .

Here is a collage of samples from the script's generated pages, and Kinoshita's book on reports.

Read more...