#! /bin/rc awkadd1='{ if (substr($2, 5, 1) == 5) { if (substr($2, 4, 1) == 5) { if(substr($2, 3, 1) == 5) { if(substr($2, 2, 1) == 5) { if(substr($2, 1, 1) == 5) { s = $2 + 44445 } else { s = $2 + 4445 } } else { s = $2 + 445 } } else { s = $2 + 45 } } else { s = $2 + 5 } } else { s = $2 + 1 } } { printf("%05d", s) }' nl=' ' if(test -n $5 ){ if(test -w /srv/slov.cmd){ echo '! f host : feed ! ' >> /srv/slov.cmd line=`{read /srv/slov.dat} while(~ `{read /srv/slov.dat} [~!]*){ a='clearing excess' } entrynumber=`{echo $line | awk $awkadd1} nameup=`~{echo $1 | tr 'a-z_' 'A-Z '} namelo=`~{echo $1 | tr 'A-Z ' 'a-z_'} e='F '^$entrynumber^' '^$nameup h=' HOST : feed'^$nl t=' TYPE : feed'^$nl br=' BREF : '^$2^$nl td=`{date -f 'YYYY[-]MM[-]DD[T]hh[:]mm[:]ssZZ'} d=' NDATE : '^$td^$nl td=`~{date -f 'WW[, ]DD[ ]MMM[ ]YYYY[ ]hh[:]mm[:]ss[ ]Z'} pb=' NPUB : '^$td p=' PAGE : ' if(test -z $3){ p=$p^`~{echo -n $e | tr 'A-Z ' 'a-z_'} } if not { p=$p^$3^$nl } ta=' TAGS'^$nl echo $5 | tr 'A-Z_' 'a-z ' | sed 's!^! !' > /tmp/tag b=' BODY'^$nl echo $4 | sed 's!^! !' > /tmp/body echo -n $e^$h^$t^$br^$d^$pb^$p^$ta >> /lib/slov/newfeed.ndtl cat /tmp/tag >> /lib/slov/newfeed.ndtl echo -n $b >> /lib/slov/newfeed.ndtl cat /tmp/body >> /lib/slov/newfeed.ndtl echo $nl >> /lib/slov/newfeed.ndtl } if not echo 'slov must be running' cd /lib/slov/ cat i *ndtl eof >> /srv/slov.cmd } if not { #get tags if(test -w /srv/slov.cmd){ echo '! f type : tag ! ' >> /srv/slov.cmd echo '' > /tmp/ft1 line=`{read /srv/slov.dat} while(~ $line [~!]*){ echo $line >> /tmp/ft1 line=`{read /srv/slov.dat} } cat /tmp/ft1 } if not echo 'slov must be running' echo 'usage: feeder name bref linkpage body tags' }