~ubuntu-branches/ubuntu/wily/sgt-puzzles/wily

« back to all changes in this revision

Viewing changes to mkmanpages.pl

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2013-06-30 03:20:16 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20130630032016-v8xqt6vtg6tgs420
Tags: 9872-1
* New upstream version
  - Add an explicit -lm to the link lines in Makefile.gtk (Closes: #713476)
  - Add Undead by Steffen Bauer, an implementation of 'Haunted Mirror Maze'
  - Add Unruly by Lennard Sprong, an implementation of a puzzle usually
    called 'Tohu wa Vohu'
* Add DEP-3 headers to patches
* pearl: Require width or height to be at least 6 for Tricky
  (Closes: #667963)
* debian/watch: Update ViewVC URL regex
* Add 'sgt-' prefix to all command names and remove 'game' suffix, but
  retain symlinks under the old names (see #684193)
* Use upstream short descriptions in English manual pages and package
  description
* Update German translation, thanks to Helge Kreutzmann

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
my $section_no = "6";
30
30
my $man_dir = "doc/man-$language";
31
31
 
32
 
# Name of command corresponding to each game-specific chapter name
33
 
my %commands = (blackbox        => 'blackboxgame',
34
 
                bridges         => 'bridges',
35
 
                cube            => 'cube',
36
 
                dominosa        => 'dominosa',
37
 
                fifteen         => 'fifteen',
38
 
                filling         => 'filling',
39
 
                flip            => 'flipgame',
40
 
                galaxies        => 'galaxies',
41
 
                guess           => 'guess',
42
 
                inertia         => 'inertia',
43
 
                keen            => 'keen',
44
 
                lightup         => 'lightup',
45
 
                loopy           => 'loopy',
46
 
                magnets         => 'magnets',
47
 
                map             => 'map',
48
 
                mines           => 'mines',
49
 
                net             => 'netgame',
50
 
                netslide        => 'netslide',
51
 
                pattern         => 'pattern',
52
 
                pearl           => 'pearl',
53
 
                pegs            => 'pegs',
54
 
                range           => 'range',
55
 
                rectangles      => 'rect',
56
 
                samegame        => 'samegame',
57
 
                signpost        => 'signpost',
58
 
                singles         => 'singles',
59
 
                sixteen         => 'sixteen',
60
 
                slant           => 'slant',
61
 
                solo            => 'solo',
62
 
                tents           => 'tents',
63
 
                towers          => 'towers',
64
 
                twiddle         => 'twiddle',
65
 
                unequal         => 'unequal',
66
 
                untangle        => 'untangle');
67
 
my %short_descs = (blackboxgame => gettext('guessing game'),
68
 
                   bridges      => gettext('topological deduction game'),
69
 
                   cube         => gettext('tile manipulation puzzle game'),
70
 
                   dominosa     => gettext('domino puzzle game'),
71
 
                   fifteen      => gettext('tile manipulation puzzle game'),
72
 
                   filling      => gettext('puzzle game'),
73
 
                   flipgame     => gettext('tile manipulation puzzle game'),
74
 
                   galaxies     => gettext('puzzle game'),
75
 
                   guess        => gettext('guessing game based on Mastermind'),
76
 
                   inertia      => gettext('puzzle game'),
77
 
                   keen         => gettext('game based on KenKen'),
78
 
                   lightup      => gettext('puzzle game'),
79
 
                   loopy        => gettext('topological deduction game'),
80
 
                   magnets      => gettext('magnets puzzle game'),
81
 
                   map          => gettext('map colouring game'),
82
 
                   mines        => gettext('game based on Minesweeper'),
83
 
                   netgame      => gettext('tile manipulation puzzle game based on FreeNet'),
84
 
                   netslide     => gettext('tile manipulation puzzle game'),
85
 
                   pattern      => gettext('nonogram puzzle game'),
86
 
                   pearl        => gettext('puzzle game based on Masyu'),
87
 
                   pegs         => gettext('peg solitaire puzzle game'),
88
 
                   range        => gettext('puzzle game based on Kurodoko'),
89
 
                   rect         => gettext('puzzle game based on Divide by Squares'),
90
 
                   samegame     => gettext('puzzle game'),
91
 
                   signpost     => gettext('puzzle game based on Pfeilpfad'),
92
 
                   singles      => gettext('puzzle game based on Hitori'),
93
 
                   sixteen      => gettext('tile manipulation puzzle game'),
94
 
                   slant        => gettext('topological deduction game'),
95
 
                   solo         => gettext('puzzle game based on Sudoku'),
96
 
                   tents        => gettext('puzzle game'),
97
 
                   towers       => gettext('puzzle game based on Skyscrapers'),
98
 
                   twiddle      => gettext('tile manipulation puzzle game'),
99
 
                   unequal      => gettext('puzzle game based on Futoshiki'),
100
 
                   untangle     => gettext('puzzle game based on Planarity'));
 
32
my %commands;
 
33
my %short_descs;
 
34
my $gamedesc = new IO::File('gamedesc.txt', 'r');
 
35
while (<$gamedesc>) {
 
36
    (my $name, undef, undef, my $desc) = split /:/;
 
37
    $commands{$name} = $ENV{BINPREFIX} . $name;
 
38
    $short_descs{$name} = $desc;
 
39
}
 
40
close $gamedesc;
101
41
 
102
42
# We should be able to look these up with strftime('%A') but that
103
43
# requires the relevant locale to be installed on the build host
114
54
 
115
55
# Gather chapters from the original documentation
116
56
my $source_name =
117
 
    $language eq 'en' ? 'puzzles.but' : "doc/puzzles.but.$language";
 
57
    $language eq 'en' ? 'preprocessed.but' : "doc/preprocessed.but.$language";
118
58
my $source = new IO::File($source_name, 'r') or die "$source_name: $!";
119
59
while (<$source>) {
120
60
    # Look for chapter/appendix heading
148
88
      . $contents{__HEADER__}
149
89
      . "\\C{man-$command} $command\n\n" # dummy chapter
150
90
      . "\\H{man-$command-name} " . gettext('NAME') . "\n\n"
151
 
      . "\\c{$command} \\- $short_descs{$command}\n\n"
 
91
      . "\\c{$command} \\- $short_descs{$chapter}\n\n"
152
92
      . "\\H{man-$command-synopsis} " . gettext('SYNOPSIS') . "\n\n"
153
93
      # Translator: abbreviation for 'number'
154
94
      . "\\cw{$command} [\\cw{--generate }\\e{" . gettext('n') . "}]\n"