summaryrefslogtreecommitdiff
path: root/fml/doc/ja/tutorial/changes/conv2sgml.pl
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-04-02 04:39:48 +0000
committerfukachan <fukachan>2004-04-02 04:39:48 +0000
commiteb94482e1eb41e9e41f204c27d29aeda8eb5ca0a (patch)
tree0bb799bd61891a63b387a69c489f72f292c32b5f /fml/doc/ja/tutorial/changes/conv2sgml.pl
parente45b33c0cbfe6fac049875c33509ef580d5c7ee1 (diff)
downloadfml8-snap-20040402.tar.gz
fml8-snap-20040402.tar.bz2
fml8-snap-20040402.zip
changes between fml4 and fml8.snap-20040402
Diffstat (limited to 'fml/doc/ja/tutorial/changes/conv2sgml.pl')
-rwxr-xr-xfml/doc/ja/tutorial/changes/conv2sgml.pl54
1 files changed, 54 insertions, 0 deletions
diff --git a/fml/doc/ja/tutorial/changes/conv2sgml.pl b/fml/doc/ja/tutorial/changes/conv2sgml.pl
new file mode 100755
index 00000000..23a5985f
--- /dev/null
+++ b/fml/doc/ja/tutorial/changes/conv2sgml.pl
@@ -0,0 +1,54 @@
+#!/usr/bin/env perl
+#
+# $FML$
+#
+
+use strict;
+use Carp;
+
+my $i = 0;
+my $key = '';
+my $value = '';
+my $table = {};
+
+while (<>) {
+ if (/^\s*$/o || /^\#/) {
+ undef $key;
+ next;
+ }
+
+ if (/^([Q48]):\s*(.*)/) {
+ ($key, $value) = ($1, $2);
+ $i++ if $key eq 'Q';
+ $table->{ $i }->{ $key } = $value;
+ next;
+ }
+
+ if (/^\s+(.*)/) {
+ $table->{ $i }->{ $key } .= "\n";
+ $table->{ $i }->{ $key } .= $1;
+ }
+}
+
+
+for my $i (sort {$a <=> $b} keys %$table) {
+ print "<!-- $i -->\n";
+ print "<row>\n";
+
+ print "\n<entry>\n";
+ print $table->{ $i }->{ Q };
+ print "\n</entry>\n";
+
+ print "\n<entry>\n";
+ print $table->{ $i }->{ 4 };
+ print "\n</entry>\n";
+
+ print "\n<entry>\n";
+ print $table->{ $i }->{ 8 };
+ print "\n</entry>\n";
+
+ print "\n</row>\n";
+ print "\n";
+}
+
+exit 0;