summaryrefslogtreecommitdiff
path: root/Docs/Support/generate-text-files.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Docs/Support/generate-text-files.pl')
-rwxr-xr-xDocs/Support/generate-text-files.pl40
1 files changed, 40 insertions, 0 deletions
diff --git a/Docs/Support/generate-text-files.pl b/Docs/Support/generate-text-files.pl
new file mode 100755
index 00000000000..570e579d926
--- /dev/null
+++ b/Docs/Support/generate-text-files.pl
@@ -0,0 +1,40 @@
+#!/my/gnu/bin/perl -w -*- perl -*-
+# Generate text files from top directory from the manual.
+
+$from = shift(@ARGV);
+$fnode = shift(@ARGV);
+$tnode = shift(@ARGV);
+
+open(IN, "$from") || die;
+
+$in = 0;
+
+while (<IN>)
+{
+ if ($in)
+ {
+ if (/Node: $tnode,/)
+ {
+ $in = 0;
+ }
+ elsif (/^File: mysql.info/ || (/^/))
+ {
+ # Just Skip node begginigs
+ }
+ else
+ {
+ print;
+ }
+ }
+ else
+ {
+ if (/Node: $fnode,/)
+ {
+ $in = 1;
+ # Skip first empty line
+ <IN>;
+ }
+ }
+}
+
+close(IN);