3 $uno_hid = "/handbuch/WORKBENCH/helpcontent2/helpers/uno_hid.lst";
4 $uno_cmd = "/handbuch/WORKBENCH/helpcontent2/helpers/unocmds.txt";
5 $startdir = "/handbuch/WORKBENCH/helpcontent2/source/text/";
7 if (open HID
, $uno_hid) {
10 ($shid,$nhid,$uno) = split ",";
11 $hid{lc($uno)} = $shid;
15 die "Cannot open $uno_hid: $!\n";
17 print scalar keys(%hid) . " entries read\n";
19 if (open UNO
, $uno_cmd) {
22 ($uno,$file) = split ";";
24 if (defined $hid{lc($uno)}) {
25 if (open XML
, "$startdir$file") {
30 if ($xml =~ /hid\/$hid{lc($uno)}/ig
) {
31 print "OK $startdir$file\n";
33 print "MISS $startdir$file\n";
34 open XML
, ">$startdir$file.org";
37 open XML
, ">$startdir$file";
38 $id = "bm_id" . int(rand(10000000));
39 $xml =~ s/(<bookmark[^>]*branch=\"hid\/$uno\"[^>]*>)/<bookmark xml
-lang
=\"en
-US
\" branch
=\"hid\
/$hid{lc($uno)}\" id=\"$id\" localize=\"false\"\/><!-- HID added by script
-->\n$1/ig
;
44 print "Cannot open $startdir$file: $!\n";
49 die "Cannot open $uno_cmd: $!\n";