Hello Dan,
Thursday December 26 2019, Dan Richter wrote to Michael Dukelsky:
MD>> DR> I'm thinking a script that will take the Desc line, and
MD>> create
MD>> DR> multiple LDesc lines within the tic file before it gets
MD>> processed
MD>> DR> would be the best way to work around this...
MD>>
MD>> Maybe it is possible to ask the sysop who hatches files with a
MD>> long Desc line to hatch with short Ldesk lines instead of it?
DR> It might be possible, but this gave me an excuse to work on my bash
DR> scripting... ;)
That's OK. :)
DR> Now to see if it works on the production system. Do you know if the
DR> tic file needs to have the Desc line, or can it just have multiple
DR> LDesc lines?
If you have no downlinks, then it does not matter. If you have, some downlink
may want just one short line. Should she/he also develop a script to leave one
line only? :)
DR> Here's what I've got for a script:
DR> #!/bin/bash
DR> ticlength=""
DR> cd ~/mystic/echomail/in/
DR> for filename in ~/mystic/echomail/in/*.tic; do
DR> [ -e "$filename" ] || continue
DR> ticlength=`cat "$filename" | grep "^Desc " | wc -c`
DR> if [ $ticlength -gt 45 ]
DR> then
DR> sed -i 's/^Desc/LDesc/g' $filename
DR> fmt -w 45 -p LDesc $filename > test.tic
DR> cp test.tic $filename
DR> rm test.tic
DR> fi
DR> done
A good script, but there is a space to improve it if you take into account a
possibility of having both Desk and LDesk in one tic. A good tic should have
both Desk and LDesk so everyone can choose what he likes.
Michael
... node (at) f1042 (dot) ru
--- GoldED+/LNX 1.1.5-b20170303
* Origin: Moscow, Russia (2:5020/1042)
|