summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'decisions/makebugs')
-rwxr-xr-xdecisions/makebugs21
1 files changed, 20 insertions, 1 deletions
diff --git a/decisions/makebugs b/decisions/makebugs
index 854bf39..2042103 100755
--- a/decisions/makebugs
+++ b/decisions/makebugs
@@ -5,7 +5,7 @@ use LaTeX::Encode qw(latex_encode);
use XMLRPC::Lite;
use Data::Dumper;
-# three files:
+# four files:
# - bur: input file, unsorted list of bug numbers, may contain duplicates,
# generated by LaTeX
# - but: cache of bug titles; format: one bug per two lines
@@ -13,6 +13,10 @@ use Data::Dumper;
# * second line bug title
# maintained by this script, can be deleted any time but needs bugzilla
# access for recreation
+# - bux: manually generated index keyword file for bugs; format: one bug per two
+# lines
+# * first line bug number
+# * second line bug keywords, separated by ";"
# - bug: output file, LaTeX fragment that can be sourced
# Initialization for the BZ
@@ -54,6 +58,16 @@ chomp @butlist;
my %bugtitles=@butlist;
+
+# Read the bug index keywords
+open my $bux, '<', "decisions.bux";
+my @buxlist = <$bux>;
+close $bux;
+chomp @buxlist;
+
+my %bugkeywords=@buxlist;
+
+
# Loop through the referenced bug numbers, check if we already have the title,
# and if not fetch and add it.
foreach(@bugnumbers) {
@@ -81,6 +95,11 @@ print $bug '\renewcommand{\gentoobugtitle}[1]{%'."\n";
foreach(@bugnumbers) {
my $cur=$_;
my $title=encodebugtitle($bugtitles{$cur});
+
+ my @keywords=split /;/, $bugkeywords{$cur};
+ foreach(@keywords) {
+ $title=$title.'\index{'.$_.'}';
+ }
print $bug '\ifthenelse{\equal{#1}{'.$cur.'}}{'.$title.'}{}%'."\n";
};