# # htmlizer.conf.pl # J. Uckelman (uckelman@nomic.net) # 25 February 2001 # # Targets for htmlizer.pl @all = qw( Event_Log Judgments_Archive Judgments_Archive_Index Judgments_Live Motions_Archive Motions_Archive_Index Motions_Live Motions_Voting Proposals_Archive Proposals_Archive_Index Proposals_Live Proposals_Voting Officers_Historical Officers_Live Officers_Voting Roster Rules_Categorical Rules_Categorical_Index Rules_Chronological Rules_Chronological_Index Rules_Historical Rules_Historical_Index Rules_Initial Rules_Numerical Rules_Numerical_Index Standings ); # Records per page for multipage targets $Judgments_Archive_perpage = 25; $Motions_Archive_perpage = 25; $Proposals_Archive_perpage = 25; $Rules_Historical_perpage = 100; $Rules_Numerical_perpage = 100; # Category hierarchy for Rules_Categorical* @Rules_Categorical_hierarchy = ( [ "Actions", -1 ], [ "Agents" , -1 ], [ "Players", 1 ], [ "The Bank", -1 ], [ "Contests", -1 ], [ "Contracts", -1 ], [ "Definitions, Conventions, and Protocols", -1 ], [ "Fora", -1 ], [ "Judiciary", -1 ], [ "Motions", -1 ], [ "Proposals", 9 ], [ "Objects", -1 ], [ "Offices and Officers", -1 ], [ "Orders", -1 ], [ "Scoring", -1 ], [ "The Game", -1 ], [ "The Rules", -1 ], [ "Voting", -1 ], [ "Winning", -1 ], [ "Miscellaneous", -1 ] ); # Target functions sub Event_Log { my $head = interpolate_file("$TPL/standard.header", 'pagetitle', 'Event Log') . "
Statement:\n
$statement\n
Ruling:\n
$ruling\n
Plaintiff's Analysis:\n
$p_analysis\n
Judge's Analysis and Orders:\n
$j_analysis\n$history\n"; } $body = add_break_tags($body); my $foot = interpolate_file("$TPL/standard.footer", 'pagedate', @{[`date -u '+%a %d %b %Y %T %Z'`]}); write_file("$WWW/Judgments.Archive.$page.html", "$head$links$body$links$foot"); } return 'ok'; } sub Judgments_Live { my $head = interpolate_file("$TPL/standard.header", 'pagetitle', 'Live Judgments') . "\n
Statement:\n
$statement\n
Ruling:\n
$ruling\n
Plaintiff's Analysis:\n
$p_analysis\n
Judge's Analysis and Orders:\n
$j_analysis\n$history\n"; } $body = add_break_tags($body); my $foot = interpolate_file("$TPL/standard.footer", 'pagedate', @{[`date -u '+%a %d %b %Y %T %Z'`]}); write_file("$WWW/Judgments.Live.html", "$head$body$foot"); return 'ok'; } sub Rules_Chronological { my @page = query("select distinct truncate((unix_timestamp(start)-970444800)/864000+1, 0) as page from rule order by page"); my $page; foreach $page (@page) { my $head = interpolate_file("$TPL/paged.header", 'pagetitle', "Chronological Ruleset, Nweek $page"); my $links = "
$text\n$history\n"; } $body = add_break_tags($body); my $foot = interpolate_file("$TPL/standard.footer", 'pagedate', @{[`date -u '+%a %d %b %Y %T %Z'`]}); write_file("$WWW/Rules.Chronological.$page.html", "$head$links$body$links$foot"); } return 'ok'; } sub Rules_Chronological_Index { my $head = interpolate_file("$TPL/standard.header", 'pagetitle', 'Chronological Ruleset Index') . "
$text\n
\$text\n\$history\n", "select motion0history.revision, event.event, date_format(event.date, '%d %b %Y %T') as date from motion0history, event where motion0history.number = \$number and motion0history.id = event.id order by event.date", "\$revision. \$event, \$date
/gs; $out .= $body . "
\$text\n\\n\$history\n
/gs; $out .= $body . interpolate_file("$TPL/standard.footer", 'pagedate', @{[`date -u '+%a %d %b %Y %T %Z'`]}); write_file("$WWW/Motions.Live.html", $out); return 'ok'; } sub Motions_Voting { my $out = interpolate_file("$TPL/standard.header", 'pagetitle', 'Motions Voting') . "
" . (voting_summary("select distinct date from motion0voting order by date", "\$date\n", 'binary', "select max(length(concat(number, '/', revision))) as length from motion0voting where date = '\$date'", "select distinct name.name from name, motion0voting where name.id = motion0voting.id and motion0voting.date = '\$date' and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) order by name.name", 3, "select distinct number, revision from motion0voting where date = '\$date' order by number, revision", "\$number/\$revision", "\n", "select motion0voting.vote from motion0voting, name where motion0voting.date = '\$date' and motion0voting.id = name.id and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) and motion0voting.number = \$number and motion0voting.revision = \$revision order by motion0voting.number, motion0voting.revision, name.name", "\$column_fill\$vote", "", "") or '') . "\n
\n" . voting_summary("select distinct date from election0voting order by date", "\$date\n", 'election', "select max(length(office.office)) as length from office, election0voting where date = '\$date' and election0voting.office = office.id", "select distinct name.name from name, election0voting where name.id = election0voting.id and election0voting.date = '\$date' and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) order by name.name", 3, "select distinct office.office, repeat(' ', \$max_issue_length - length(office.office)) as padding from office, election0voting where date = '\$date' and election0voting.office = office.id order by office.office", "\$office\$padding", "\n", "select lpad(election0voting.vote, 2, ' ') as vote from election0voting, name, office where election0voting.date = '\$date' and election0voting.id = name.id and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) and election0voting.office = office.id and office.office = '\$office' order by office.office, name.name", "\$column_fill\$vote", "select distinct name.name, election0voting.vote from election0voting, name where election0voting.date = '\$date' and election0voting.vote = name.id and election0voting.vote <> '-' and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) order by name.name", "\$name, \$vote\n") . "\n
\$text\n\$history\n", "select proposal0history.revision, event.event, date_format(event.date, '%d %b %Y %T') as date from proposal0history, event where proposal0history.number = \$number and proposal0history.id = event.id order by event.date", "\$revision. \$event, \$date
/gs; $out .= $body . "
\$text\n\\n\$history\n
/gs; $out .= $body . interpolate_file("$TPL/standard.footer", 'pagedate', @{[`date -u '+%a %d %b %Y %T %Z'`]}); write_file("$WWW/Proposals.Live.html", $out); return 'ok'; } sub Proposals_Voting { my $out = interpolate_file("$TPL/standard.header", 'pagetitle', 'Proposals Voting') . "
" . voting_summary("select distinct date from proposal0voting order by date", "\$date\n", 'binary', "select max(length(concat(number, '/', revision))) as length from proposal0voting where date = '\$date'", "select distinct name.name from name, proposal0voting where name.id = proposal0voting.id and proposal0voting.date = '\$date' and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) order by name.name", 3, "select distinct number, revision from proposal0voting where date = '\$date' order by number, revision", "\$number/\$revision", "\n", "select proposal0voting.vote from proposal0voting, name where proposal0voting.date = '\$date' and proposal0voting.id = name.id and name.start <= '\$date' and (isnull(name.end) or '\$date' <= name.end) and proposal0voting.number = \$number and proposal0voting.revision = \$revision order by proposal0voting.number, proposal0voting.revision, name.name", "\$column_fill\$vote", "", "") . "\n
\$text\n\n\$history\n
/gs; $out .= $body . "
\$text\n\$history\n", "select rule0history.revision, event.event, date_format(event.date, '%d %b %Y %T') as date from rule0history, event where rule0history.number = \$number and rule0history.id = event.id order by event.date", "\$revision. \$event, \$date
/gs; $out .= $body . "
\$text\n\n\$history\n
/gs; $out .= $body . "
name | since | |
---|---|---|
\$name | \$address | \$start |
Former Players\n
name | from | to | |
---|---|---|---|
\$name | \$address | \$start | \$end |
name | score |
---|---|
\$name | \$score |