Ignore:
Timestamp:
Sep 11, 2010, 5:59:26 PM (11 years ago)
Author:
roux
Message:

ajout parsing tags pour pjl/rapports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/batch/documents/parse_metas.pl

    r1333 r1351  
    3434$string =~ s/ +/ /g;
    3535$string =~ s/\s+/ /g;
     36$string =~ s/"//g;
    3637if ($dir == "rap") {
    3738  $string =~ s/L\W\W([AÀEÈÉÊIOUYH])/L'\1/g;
     
    115116  $keywords .= $line.".";
    116117}
    117 if ($string =~ /<meta name="MOTS_CLES"([^>]+)>/ && !$categorie) {
     118if ($string =~ /<meta name="MOTS_CLES"([^>]+)>/) {
    118119  $line = $1;
    119120  $line =~ s/^.*content="([^"]+)".*$/\1/;
     
    122123
    123124$keywords = lc $keywords;
     125$keywords =~ s/^\s+//;
     126$keywords =~ s/\s+$//;
     127$keywords =~ s/À/à/g;
     128$keywords =~ s/É/é/g;
     129$keywords =~ s/È/è/g;
     130$keywords =~ s/Ê/ê/g;
     131$keywords =~ s/Î/î/g;
     132$keywords =~ s/Ï/ï/g;
     133$keywords =~ s/Ô/ô/g;
     134$keywords =~ s/Ù/ù/g;
     135$keywords =~ s/Ç/ç/g;
    124136$keywords =~ s/ +\././g;
    125137$keywords =~ s/\. +/./g;
    126 $keywords =~ s/.+/./g;
    127 $keywords =~ s/^.+$//g;
     138$keywords =~ s/\.+/./g;
     139$keywords =~ s/^\.+//g;
     140$keywords =~ s/\.+$//g;
     141$keywords =~ s/([\s\(,\.])l\./\1L/gi;
     142
    128143if ($categorie =~ /Texte de la commission/i && $id =~ /-a0/) {
    129144  $categorie = "";
     
    131146}
    132147$categorie = lc $categorie;
     148$categorie =~ s/^\s+//;
     149$categorie =~ s/\s+$//;
    133150$categorie =~ s/À/à/g;
    134151$categorie =~ s/É/é/g;
     
    139156$categorie =~ s/Ô/ô/g;
    140157$categorie =~ s/Ù/ù/g;
     158$categorie =~ s/Ç/ç/g;
    141159
    142160
Note: See TracChangeset for help on using the changeset viewer.