summaryrefslogtreecommitdiff
path: root/fml/doc/en/tutorial/changes
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-08-03 13:22:38 +0000
committerfukachan <fukachan>2005-08-03 13:22:38 +0000
commit7bf24dc52e3d469739e0da8c868578ac5e4f64dc (patch)
tree65436f5e2bad379a719a700709f63cac88f7b246 /fml/doc/en/tutorial/changes
parent739a089af9c28c84aa6877453952355ed0b7d266 (diff)
downloadfml8-7bf24dc52e3d469739e0da8c868578ac5e4f64dc.tar.gz
fml8-7bf24dc52e3d469739e0da8c868578ac5e4f64dc.tar.bz2
fml8-7bf24dc52e3d469739e0da8c868578ac5e4f64dc.zip
sync.
Diffstat (limited to 'fml/doc/en/tutorial/changes')
-rw-r--r--fml/doc/en/tutorial/changes/conv2sgml.pl55
1 files changed, 55 insertions, 0 deletions
diff --git a/fml/doc/en/tutorial/changes/conv2sgml.pl b/fml/doc/en/tutorial/changes/conv2sgml.pl
new file mode 100644
index 00000000..0d50fc0d
--- /dev/null
+++ b/fml/doc/en/tutorial/changes/conv2sgml.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/env perl
+#
+# $FML: conv2sgml.pl,v 1.2 2005/06/25 12:06:58 fukachan Exp $
+#
+
+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;
+ }
+}
+
+print "\n<!-- 注意!!! 自動生成されたファイル、手動編集禁止 !!! -->\n\n";
+
+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;