logiciel_dlfix
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
logiciel_dlfix [2008/09/14 16:02] – thierry | logiciel_dlfix [2012/03/26 21:02] – thierry | ||
---|---|---|---|
Ligne 6: | Ligne 6: | ||
**'' | **'' | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== Telecharger ===== | ===== Telecharger ===== | ||
- | Télécharger la version 0.2 BETA => {{: | + | |
+ | |||
+ | | | ||
+ | | Télécharger la version 0.22 BETA | => {{: | ||
$ unzip dlfix.zip | $ unzip dlfix.zip | ||
Ligne 24: | Ligne 31: | ||
$ dlfix configure --create --login mon_compte_free --password mon_pass_de_compte | $ dlfix configure --create --login mon_compte_free --password mon_pass_de_compte | ||
$ dlfix manage --add ./ | $ dlfix manage --add ./ | ||
+ | |||
Ligne 36: | Ligne 44: | ||
* La commande " | * La commande " | ||
* Diffuser la liste des relations " | * Diffuser la liste des relations " | ||
+ | |||
+ | |||
+ | ===== Techniques ===== | ||
+ | *L' | ||
+ | *Lorsqu' | ||
+ | *Lorsqu' | ||
===== En pratique ===== | ===== En pratique ===== | ||
Ligne 46: | Ligne 60: | ||
$ dlfix manage --add ./ | $ dlfix manage --add ./ | ||
$ dlfix manage --add ./ | $ dlfix manage --add ./ | ||
+ | |||
+ | Pour ajouter la totalité d'un répertoire (mais pas les sous répertoires): | ||
+ | |||
+ | $ dlfix manage --glob-timeout 90d --glob ./ | ||
==== activer l' | ==== activer l' | ||
Ligne 74: | Ligne 92: | ||
06-nine_inch_nails-still_it.mp3 http:// | 06-nine_inch_nails-still_it.mp3 http:// | ||
(Ce ne sont pas des liens valides: ce ne sont que des exemples) | (Ce ne sont pas des liens valides: ce ne sont que des exemples) | ||
+ | |||
Ligne 133: | Ligne 152: | ||
+ | ===== CGI Perl ===== | ||
+ | Lien: http:// | ||
+ | |||
+ | Exemple, soit un lien comme cela **'' | ||
+ | |||
+ | # | ||
+ | | ||
+ | use strict; | ||
+ | use warnings; | ||
+ | | ||
+ | { | ||
+ | if ( defined( $ENV{QUERY_STRING} ) ) { | ||
+ | if ( my ( $filename ) = $ENV{QUERY_STRING} =~ / | ||
+ | if ( open( my $h, '<' | ||
+ | my $dllink; | ||
+ | | ||
+ | while( my $li = readline( $h ) ) { | ||
+ | if ( my ( $fn, $dl ) = split(/ | ||
+ | if ( $fn eq $filename ) { | ||
+ | $dllink = $dl; | ||
+ | last; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | close( $h ); | ||
+ | | ||
+ | if ( $dllink ) { | ||
+ | print STDOUT << | ||
+ | Status: 302 Found | ||
+ | Location: $dllink | ||
+ | | ||
+ | HEAD | ||
+ | exit( 0 ); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | print STDOUT << | ||
+ | Status: 302 Found | ||
+ | Location: / | ||
+ | | ||
+ | HEAD | ||
+ | | ||
+ | 0; | ||
+ | } | ||
===== dlfix ? ===== | ===== dlfix ? ===== | ||
Ligne 377: | Ligne 443: | ||
dlfix version | dlfix version | ||
| | ||
+ | |||
===== un cron ===== | ===== un cron ===== | ||
$ crontab -l | $ crontab -l | ||
- | | + | |
*/10 * * * * cd / | */10 * * * * cd / | ||
45 * * * * cd / | 45 * * * * cd / | ||
+ | |||
+ | | :!: Il faut eviter que le scripte demarre en même temps, à cause du " | ||
logiciel_dlfix.txt · Dernière modification : 2012/04/12 10:52 de thierry