]> git.deb.at Git - deb/packages.git/commitdiff
Drop NUL characters and collate whitespace in descriptions.txt
authorJeroen van Wolffelaar <jeroen@wolffelaar.nl>
Thu, 2 Feb 2006 00:16:06 +0000 (00:16 +0000)
committerJeroen van Wolffelaar <jeroen@wolffelaar.nl>
Thu, 2 Feb 2006 00:16:06 +0000 (00:16 +0000)
bin/parse-packages

index 40c4356eed0e140360366b4cb0eb29c360a0b0cd..4fd7e346113955634e25bde914faeed5dea12fc9 100755 (executable)
@@ -154,9 +154,10 @@ tie %descriptions_db, "DB_File", "descriptions.db.new",
        or die "Error creating DB: $!";
 open DESCR, "> descriptions.txt" or die "Error creating descriptions textfile";
 for (my $i=1; $i<= $#descriptions; $i++) {
-       my $null_d = $descriptions[$i];
-       $null_d =~ s/\n/\000/g;
-       print DESCR "$null_d\n";
+       my $plain_description = $descriptions[$i];
+       $plain_description =~ s/\n .\n/ /og;
+       $plain_description =~ s/[\n \t]+/ /og;
+       print DESCR "$plain_description\n";
        $descriptions_db{$i} = $descriptions[$i];
 }
 close DESCR;