TIP: Click on subject to list as thread! ANSI
echo: bbbs.english
to: TONY COMANDINI
from: JANIS KRACHT
date: 2016-12-20 12:05:00
subject: Annoucements new files

Hi Tony,

> sorry if I ask too much but is a sort of doc add-on :-) How can I do the new
> files announcements in the correct are using some script?

The way I do it is kind of involved, using 3 scripts.  Maybe Kim will have some
easier way to do this that I didn't think of at the time.  I wrote these
scripts a long time ago, and they work for me 

I use these scripts to grab the new file announcements from
/home/bbbs/work/tickinfo.txt, and copy it to a message area and post it, and I
also copy the info to my web page's "new files" section.

Script one is called 'parsefile':

===start parsefile===
#!/bin/sh
cd /home/bbbs/test
if test -e /home/bbbs/work/tickinfo.txt ; then
 echo "File Exists"
 cp /home/bbbs/work/tickinfo.txt /home/bbbs/test
 cat tickinfo.txt | sed 's/Area/\
  Area/' > test.txt
  cat test.txt | sed 's/Origin/\
   Origin/' > test2.txt
   cat test2.txt /home/bbbs/htdocs/tickinfo.txt > new.txt
   cp new.txt /home/bbbs/test/newtick.txt
   cp new.txt /home/bbbs/htdocs/tickinfo.txt
   cp test2.txt /home/bbbs/work/tickinfo.txt
   cd /home/bbbs
   ./shareware.rpt
   else
    echo "no file to process"
    fi
    cd /home/bbbs/bin
    sudo ./cpticinfo
    cd /home/bbbs
===end parsefile===

As you can see, parsefile is the master script, calling shareware.rpt and
cpticinfo.

===shareware.rpt===
cd /home/bbbs
rm File_Announce_*
mv -f work/tickinfo.txt /home/bbs/oldlist.txt split -l 24 oldlist.txt
File_Announce_ chmod 700 File_Announce*
dir -1 File_Announce* > msglst
for file in `cat msglst`
do
./bbbs btxt2bbs fido.shareware_support $file /f The IFDC FileGate /t All /s New
file Arrival
sleep 5
done
./bbbs bogus f echotoss.log
===

===cpticinfo===
#!/bin/sh
cd /home/bbbs/htdocs
if test /home/bbbs/htdocs/tickinfo.txt -nt /var/www/tickinfo.txt ; then
 cp /home/bbbs/htdocs/tickinfo.txt /var/www/tickinfo.txt
 fi
===

This is a file that I keep in my bbbs directory since cpticinfo needs it:

===echotoss.log===
fido.SHAREWARE_SUPPORT
=== end echotoss.log==

SHAREWARE_SUPPORT is the echo I post the announcements in.

Hope this helps.. If I had to write this whole thing again today, I'd probably
faint LOL

Take care,
Janis

--- BBBS/Li6 v4.10 Toy-3
* Origin: Prism bbs (1:261/38)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.