Browse Source

fix parsing of latest dict.leo.org output

Ralf S. Engelschall 18 years ago
parent
commit
6ab6b652fa
2 changed files with 14 additions and 4 deletions
  1. 13 3
      leo/leo.patch
  2. 1 1
      leo/leo.spec

+ 13 - 3
leo/leo.patch

@@ -1,6 +1,6 @@
 Index: leo
 --- leo.orig	2007-02-14 09:20:42 +0100
-+++ leo	2007-02-14 20:03:04 +0100
++++ leo	2007-10-20 10:06:00 +0200
 @@ -34,8 +34,8 @@
  #
  my $highlight = 1;
@@ -12,7 +12,17 @@ Index: leo
  
  my $ip        = "dict.leo.org";
  my $port      = "80";
-@@ -399,6 +399,9 @@
+@@ -378,6 +378,9 @@
+   # remove hard whitespaces
+   $site =~ s/ //gs;
+ 
++  # remove special characters
++  $site =~ s/ //gs;
++
+   # remove remaining tags (beside td and tr)
+   $site =~ s/<\/*(i|a|b|font|small|strong)>//gsi;
+ 
+@@ -399,6 +402,9 @@
    # remove javascript links
    $site =~ s/<a onclick[^>]*>//gsi;
  
@@ -22,7 +32,7 @@ Index: leo
    # make single line per entry
    my @segments = split /<\/TR>\s*<TR>/i, $site;
    my $progress;
-@@ -517,18 +520,13 @@
+@@ -517,18 +523,13 @@
      # dict entry
      $entry->{left} =~ s/^(.*)$/$1 . " " x ($maxsize - length($1))/e;
      if ($highlight) {

+ 1 - 1
leo/leo.spec

@@ -33,7 +33,7 @@ Class:        EVAL
 Group:        Searching
 License:      GPL
 Version:      1.26
-Release:      20070214
+Release:      20071020
 
 #   list of sources
 Source0:      http://www.daemon.de/files/mirror/ftp.daemon.de/scip/Scripts/leo-%{version}.tar.gz