31 |
$all_quotes->{$v}++; |
$all_quotes->{$v}++; |
32 |
return ''; |
return ''; |
33 |
} |
} |
34 |
$t =~ s#([_'])([^_']+?)\1 \(qv\)#qv_print($2)#ge; |
$t =~ s#([_'"])([^_'"]+?)\1 \(qv\)#qv_print($2)#ge; |
35 |
} |
} |
36 |
|
|
37 |
my $i = 0; |
my $i = 0; |
46 |
if (/^#\s+(.*)\s*$/) { |
if (/^#\s+(.*)\s*$/) { |
47 |
$title = $1; |
$title = $1; |
48 |
if ($title =~ m#^("*)(.*)\1\s*\((\d+)\)(:?\s*\(\w+\))*$#) { |
if ($title =~ m#^("*)(.*)\1\s*\((\d+)\)(:?\s*\(\w+\))*$#) { |
49 |
$year = $3; |
($title, $year) = ($2,$3); |
50 |
$all_titles->{$2}++; |
$all_titles->{$title}++; |
51 |
$all_years->{$3}++; |
$all_years->{$3}++; |
52 |
} else { |
} else { |
53 |
$year = undef; |
$year = undef; |
72 |
|
|
73 |
# add attributes to the document object |
# add attributes to the document object |
74 |
$doc->add_attr('@uri', "file://localhost/trivia/$i"); |
$doc->add_attr('@uri', "file://localhost/trivia/$i"); |
75 |
|
|
76 |
$doc->add_attr('@title', $title); |
$doc->add_attr('@title', $title); |
77 |
|
$doc->add_hidden_text( |
78 |
|
($title x $title_rank) |
79 |
|
); |
80 |
|
|
81 |
$doc->add_attr('@size', length($trivia)); |
$doc->add_attr('@size', length($trivia)); |
82 |
|
|
83 |
$doc->add_attr('year', $year) if ($year); |
$doc->add_attr('year', $year) if ($year); |
88 |
|
|
89 |
# add the body text to the document object |
# add the body text to the document object |
90 |
$doc->add_text($trivia); |
$doc->add_text($trivia); |
|
$doc->add_hidden_text( |
|
|
($title x $title_rank) |
|
|
); |
|
91 |
|
|
92 |
|
|
93 |
# register the document object to the database |
# register the document object to the database |