Changeset 3


Ignore:
Timestamp:
Apr 1, 2011, 12:01:42 PM (13 years ago)
Author:
g7moreau
Message:
  • Add dep on /etc/biblehal/biblehal.conf
  • Detele dep on LEGI laboratory name
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/biblehal-pop

    r2 r3  
    22#
    33# gabriel 2010/06/03
     4# gabriel 2011/04/01 update to biblehal
    45#
    56# apt-get install libwww-mechanize-perl libwww-perl
     
    1112use HTML::Form;
    1213
    13 my $year = shift @ARGV;
    14 
    15 die "Usage /usr/lib/biblehal/biblehal-pop year\n" if $year < 1990 or $year > 2020;
     14my $laboratory = shift @ARGV;
     15my $year       = shift @ARGV;
     16
     17die "Usage /usr/lib/biblehal/biblehal-pop laboratory year\n" if $year < 1990 or $year > 2020;
    1618
    1719mkdir '/var/cache/biblehal/download', 0750;
     
    8890
    8991# On intègre le second formulaire qui se remplit normalement via un javascript
    90 my $parser = HTML::Form->parse("$F", 'http://hal.archives-ouvertes.fr/LEGI');
     92my $parser = HTML::Form->parse("$F", "http://hal.archives-ouvertes.fr/$laboratory");
    9193    print($@) if $@;
    9294#print Dumper $parser;
     
    9496
    9597# Création du bot
    96 my $url = 'http://hal.archives-ouvertes.fr/LEGI';
     98my $url = "http://hal.archives-ouvertes.fr/$laboratory";
    9799my $bot = WWW::Mechanize->new;
    98100   $bot->proxy(['http', 'ftp'], 'http://194.254.66.70:3128');
  • trunk/biblehal-popall

    r2 r3  
    22#
    33# gabriel 2010/06/03
     4# gabriel 2011/04/01 update to biblehal
    45
    56export PATH="/bin:/usr/bin:/usr/lib/biblehal"
    67
    78
     9if [ -f /etc/biblehal/biblehal.conf ]
     10then
     11   . /etc/biblehal/biblehal.conf
     12fi
     13
     14if "z${LABORATORY}" = "z" ]
     15then
     16   echo "LABORATORY must be configure in /etc/biblehal/biblehal.conf"
     17   exit 1
     18fi
     19
     20
    821for year in 1990 1994 1995 1996 1997 $(seq 1999 $(date +%Y))
    922do
    10    biblehal-pop $year
     23   biblehal-pop ${LABORATORY} ${year}
    1124   
    12    biblehal-explode $year
     25   biblehal-explode ${year}
    1326done
    14 
  • trunk/biblehal-poplast

    r2 r3  
    22#
    33# gabriel 2010/06/15
     4# gabriel 2011/04/01 update to biblehal
    45
    56export PATH="/bin:/usr/bin:/usr/lib/biblehal"
    67
    78
     9if [ -f /etc/biblehal/biblehal.conf ]
     10then
     11   . /etc/biblehal/biblehal.conf
     12fi
     13
     14if "z${LABORATORY}" = "z" ]
     15then
     16   echo "LABORATORY must be configure in /etc/biblehal/biblehal.conf"
     17   exit 1
     18fi
     19
     20
    821for year in  $(( $(date +%Y) -1 )) $(date +%Y)
    922do
    10    biblehal-pop $year
     23   biblehal-pop ${LABORATORY} ${year}
    1124   
    12    biblehal-explode $year
     25   biblehal-explode ${year}
    1326done
    14 
Note: See TracChangeset for help on using the changeset viewer.