category: remove

as not used for a long time by now
This commit is contained in:
Milan
2021-04-11 12:49:27 +02:00
parent 6ede3d84b3
commit 873d546e13
11 changed files with 299 additions and 71 deletions

View File

@@ -67,30 +67,11 @@ sub extractEventFromWikiText($;$) {
#extract categories from title
my @categories = ();
while ( $title =~ /\((.*?),(.*?)\)/ ) {
my $category = $1;
$category =~ s/\s+/ /g;
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if defined $category && $category =~ /\S/;
$category = '';
$category = $2 if ( defined $2 );
$category =~ s/\s+/ /g;
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if defined $category && $category =~ /\S/;
$title =~ s/\((.*?),(.*?)\)/\($2\)/;
}
if ( $title =~ /\((.*?)\)/ ) {
my $category = $1;
$category =~ s/\s+/ /g;
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if defined $category && $category =~ /\S/;
$title =~ s/\((.*?)\)//;
}
$event->{categories} = \@categories if ( @categories > 0 );
$event->{title} = $title;
$event->{title} =~ s/^\s+|\s+$//g;