- B8CE803DC74070A6BA41B992E99050526777D4E12076268EEE0D47A4051BA343BD3D16E9695438F7E9AB5343DFE6C17773CE018BE63912978E4AD58BB8409297
+ 4BEA5BD0E9D8015EDD85BA003F76FD2AC0D42611AA03BBF8232E1681D8F1BDA22D6CC3EB707EAF54E604CC690A14BFBA85A487F45CB98490530F6A2B449D014D
logotron/logconverters/irssi2tmsr/convert.sh
(5 . 14)(5 . 17)
38 exit 1
39 fi
40
41 awk -v mindex=$1 '/Day changed/ {Month=$5; Day=$6; Year=$7;}
42 /Log opened/ {Month=$5; Day=$6; Year=$10;}
43 ! /-|<--|>/ {count++; sep=";";
44 w= Year " " Month " " Day " " $1 " " $2 " 00";
45 if ($3 == "*") {
46 pp=$3 sep $4 " "; $4=""; n=5;
47 awk -v mindex=$1 'BEGIN{months="JanFebMarAprMayJunJulAugSepOctNovDec"}
48 /Day changed/ {Month=int((index(months,$5)+2)/3); Day=$6; Year=$7;}
49
50 /Log opened/ {Month=int((index(months,$5)+2)/3); Day=$6; Year=$8;}
51 ! /(-->)|(<--)|(---)/ {count++; sep=";";
52 w= Year " " Month " " Day " " substr($1, 1, 2) " " substr($1, 4, 5) " 00";
53 if ($2 == "*") {
54 pp= $2 sep $3 " "; $3=""; n=4;
55 } else {
56 pp=$3 sep; n=4;};
57 $1=""; $2=""; $3="";
58 pp=substr($2, 1, length($2)-1) sep; n=3;};
59 $1=""; $2="";
60 print count+mindex-1 sep mktime(w) sep pp substr($0,n);
61 }'
62