This commit is contained in:
Nick Bebout 2013-02-08 20:40:54 -06:00
parent 543e344ac7
commit 32a552f56e
24 changed files with 6784 additions and 254 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: paypal_build_invoices,v 1.43 2012/12/15 00:15:56 gilles Exp gilles $
# $Id: paypal_build_invoices,v 1.45 2013/01/10 03:08:23 gilles Exp gilles $
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
@ -32,7 +32,8 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1963 /g/paypal/paypal_2012_09_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2047 /g/paypal/paypal_2012_10_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2133 /g/paypal/paypal_2012_11_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv
@ -59,20 +60,23 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1891 /g/paypal/paypal_2012_08_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1963 /g/paypal/paypal_2012_09_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2047 /g/paypal/paypal_2012_10_complet.csv
set -x
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2133 /g/paypal/paypal_2012_11_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
set -x
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
set +x
# La totale
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug \
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132' \
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug \
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132 2295 2296 2297 2298' \
/g/paypal/paypal_201?_??_complet.csv
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132' \
set -v
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132 2295 2296 2297 2298' \
/g/paypal/paypal_201?_??_complet.csv
set +v
echo 'sh paypal_build_invoices /g/var/paypal_invoices/2???'

View file

@ -1,6 +1,6 @@
#!/usr/bin/perl
# $Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $
# $Id: paypal_build_reply,v 1.20 2013/02/07 17:00:41 gilles Exp gilles $
use warnings;
use strict;
@ -40,10 +40,12 @@ while(<>) {
while(<>) {
if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*) \((.*)\)/) {
($amount, $name, $email) = ($1, $2, $3);
$debug and print "1 ($amount, $name, $email)\n" ;
last;
}
if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*)/) {
($amount, $name, $email) = ($1, "", $2);
$debug and print "2 ($amount, $name, $email)\n" ;
last;
}
}
@ -55,18 +57,20 @@ my $path_last = firstline( '/g/public_html/imapsync/dist/path_last.txt' ) ;
$url = "http://ks.lamiral.info/imapsync/dist/$path_last/" ;
#print "[$amount] [$name] [$email] [$paypal_line]\n";
$debug and print "[$amount] [$name] [$email] [$paypal_line]\n";
while(<>) {
if ( /^Acheteur/ ) {
$buyer .= "===== Acheteur =====\n";
$debug and print "1 $buyer\n" ;
last;
}
if ( /^Informations sur l'acheteur/ ) {
$buyer .= "===== Acheteur =====\n";
chomp( $name = <> );
$buyer .= "$name\n" ;
$debug and print "2 $buyer\n" ;
last;
}
}
@ -75,16 +79,17 @@ while(<>) {
$buyer .= $_ if ( ! /^-----------------------------------/ );
last if ( /^-----------------------------------/ );
}
$debug and print "3 $buyer\n" ;
while(<>) {
next if ( ! /^Description :(.*)/ );
while(<>) {
$debug and print "Search Description [$_]\n" ;
next if ( ! /Description..?:(.*)/ );
$object = $1 ;
$description = "===== Details =====\n";
$description .= $_;
last;
}
$debug and print "[$object] [$description]\n";
while(<>) {
@ -97,7 +102,7 @@ while(<>) {
my $address = 'gilles.lamiral@laposte.net';
my $address2 = 'gilles@lamiral.info';
my $rcstag = '$Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $';
my $rcstag = '$Id: paypal_build_reply,v 1.20 2013/02/07 17:00:41 gilles Exp gilles $';
my $download_info = "You will find the latest imapsync.exe binary (release $release_exe)
and the latest imapsync source code (release $release) at the following link:

View file

@ -240,7 +240,6 @@ paypal_all_dev() {
echo "Will send_reply $@"
send_reply "$@"
echo "Done send_reply $@"
}

View file

@ -7,7 +7,7 @@ set -e
# Add path to commands at home
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.32/lib
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
export PERL5LIB
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \

View file

@ -5,10 +5,9 @@
set -e
#set -x
# Add path to commands at home
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.32/lib
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
export PERL5LIB
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \

View file

@ -7,12 +7,12 @@ set -e
# Add path to commands at home
PATH=$PATH:/g/public_html/imapsync/paypal_reply
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.28/lib
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
export PERL5LIB
test -f /g/public_html/imapsync/paypal_reply/paypal_functions \
&& . /g/public_html/imapsync/paypal_reply/paypal_functions
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
&& . /g/public_html/imapsync/W/paypal_reply/paypal_functions
DATE_1=`date`