I was hoping there was a hook that went something along the lines of "importing this file with this description into this area" so I could use the description from the tic file.
Is anyone familiar with htick from the husky project?
I'm wanting to use it to import tic files into my BBS, I see it moves files in a specified directory, but is there a hook to call something
to add it to the file database?
At present it's looking like I will have to scan each file directory
and add files missing from the database by importing their
descriptions from file_id.diz.
I was hoping there was a hook that went something along the lines of "importing this file with this description into this area" so I could
use the description from the tic file.
htick uses the standard files.bbs format for listing files and their descriptions. I'm sure you could whip something up that would import the files.bbs file.
Htick will add files it tosses to the files.bbs. It will take descriptions from a file_id.diz if there is one or from LDesc lines if there are any and last it will get the description from the Desc line in the tic.
If it gets the description from the Desc line the description will be on onelong line.
If it gets the description from the Desc line the description
will be on onelong line.
I had that issue here, and did a little 'bash-fu' to correct it. :)
for file in /home/dan/mystic/echomail/in/*.tic; do
[ -e "$file" ] || continue
ticlength=`cat "$file" | grep "^Desc " | wc -c`
if [ $ticlength -gt 45 ]
then
cat $file | grep "Desc " | cut -c6- | fold -sw45 > ticdesc.txt ticdesc=`cat ticdesc.txt`
sed -i 's/^Desc/LDesc/g' $file
fmt -w 45 -p LDesc $file > test.tic
cp test.tic $file
rm test.tic
rm ticdesc.txt
fi
done
I also did a little more 'bash-fu' to get the size field in the .tic
files that are missing.
for file in /home/dan/mystic/echomail/in/*.tic; do
[ -e "$file" ] || continue
filesize=0
filesize=`cat $file | grep "^Size " | sed 's/.*Size //'`
filename=`cat $file | grep "^File " | sed 's/^File //' | sed
's/\r$//'` if [ "$filesize" = '' ] then
filesize=`wc -c "$filename" | awk '{print $1}'`
echo "Size $filesize" >> $file
fi
filesize=0
done
I'll have to scrape that. It looks like you are folding a single desc
line intomultiple LDesc lines?
Does Mystic import the description from LDesc better?
Does Mystic import the description from LDesc better?
Yup, the LDesc lines import just fine. The long Desc line gets
truncated if it's too long.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,035 |
Nodes: | 15 (0 / 15) |
Uptime: | 12:28:53 |
Calls: | 718 |
Calls today: | 11 |
Files: | 95,167 |
U/L today: |
3 files (545K bytes) |
D/L today: |
9,479 files (715M bytes) |
Messages: | 298,214 |
Posted today: | 1 |