summaryrefslogtreecommitdiff
path: root/helpcontent2/helpers/create_ilst.pl
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-11-26 12:54:10 +0000
committerRüdiger Timm <rt@openoffice.org>2004-11-26 12:54:10 +0000
commit353a112d28f123ee98b5bc232e1574bfee01f8c5 (patch)
tree9145c7e67648bed2f2e271ec636f6215fa3955fd /helpcontent2/helpers/create_ilst.pl
parent4210d96d8179eae7604090cea09ae86db2e66183 (diff)
INTEGRATION: CWS helpcontentbeta (1.1.2); FILE ADDED
2004/09/16 12:03:24 fpe 1.1.2.1: *** empty log message ***
Diffstat (limited to 'helpcontent2/helpers/create_ilst.pl')
-rw-r--r--helpcontent2/helpers/create_ilst.pl38
1 files changed, 38 insertions, 0 deletions
diff --git a/helpcontent2/helpers/create_ilst.pl b/helpcontent2/helpers/create_ilst.pl
new file mode 100644
index 0000000000..7da6f425cd
--- /dev/null
+++ b/helpcontent2/helpers/create_ilst.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+# creates the ilst control file for the
+# help specific images
+
+$helpdirprefix = "helpcontent2/source/";
+
+$params = join "|", "",@ARGV,"";
+($params =~ /-dir/) ? ($startdir = $params) =~ (s/.*-dir=([^\|]*).*$/$1/gs) : (($startdir = `pwd`) =~ s/\n//gs);
+($params =~ /-out/) ? ($outdir = $params) =~ (s/.*-out=([^\|]*).*$/$1/gs) : (($outdir = `pwd`) =~ s/\n//gs);
+($params =~ /-pre/) ? ($outdir = $params) =~ (s/.*-pre=([^\|]*).*$/$1/gs) : ($pre = "/res/helpimg/");
+
+if (opendir DIR, $startdir) {
+ print $startdir;
+ @files = grep /png$/, readdir DIR;
+ for (sort(@files)) {
+ print "%GLOBAL%".$pre.$_."\n";
+ }
+} else {
+ &terminate("Cannot access $startdir.");
+}
+
+
+sub terminate {
+ $err = shift;
+ print "$err\n\n";
+ $msg = <<"MSG";
+create_ilst.pl -dir=[directory name] -out=[directory name]
+ -dir root directory for the help images to
+ be searched (default=current dir)
+ Only *.png will be found.
+ -pre directory prefix (default=/res/helpimg/)
+ -out output directory for the helpimg.ilst file
+ (default=current dir)
+
+MSG
+ die "$msg\n";
+} \ No newline at end of file