User:Slaporte/GSoC2010/USCodeTool

This tool processes a title of the United States Code for bot upload.

Input
Specify the input file in ?u= in the URL. This script is designed to process the U.S. Code in HTML format available from the GPO. You can download these files from http://www.gpo.gov/fdsys/browse/collectionUScode.action?collectionCode=USCODE.

For example: FDSysCode.php?u=http://www.gpo.gov/fdsys/pkg/USCODE-2009-title1/html/USCODE-2009-title1.htm

Output
Each section, and the main page for each title, subtitle, chapter, subchapter, and part is formatted as a separate page, beginning with and ending with.

The pages can be added to Wikisource using pywikipediabot's pagefromfile.py. Use the -notitle option to avoid including the page name in each article. More information on pywikipediabot and pagefromfile.py is available at http://pywikipediabot.sourceforge.net/ and http://meta.wikimedia.org/wiki/Pywikipediabot/pagefromfile.py.

Necessary templates

 * sc
 * ref
 * note
 * USC-header
 * textinfo-fdsys

More information on templates, formatting, and style for the United States Code is available at WikiProject US Code.