• htick

    From apam@21:1/126 to All on Sun Nov 8 10:14:34 2020
    Hi

    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.

    Andrew


    --- Talisman v0.1-dev (Linux/x86_64)
    * Origin: Talisman BBS - Experimental BBS (21:1/126)
  • From Netsurge@21:4/154 to apam on Sat Nov 7 19:40:10 2020
    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.

    |15frank |08// |15netsurge
    |07disksh0p|08!|07bbs |08% |07bbs.diskshop.ca |08% |07mystic goodness |11SciNet |03ftn hq |08% |07https://scinet-ftn.org

    --- Mystic BBS v1.12 A47 2020/10/31 (Linux/64)
    * Origin: % disksh0p!bbs % bbs.diskshop.ca % SciNet ftn hq % (21:4/154)
  • From Al@21:4/106 to apam on Sat Nov 7 16:48:02 2020
    Hello apam,

    Is anyone familiar with htick from the husky project?

    Yes, I use htick here.

    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?

    I think there probably is but I haven't looked into that.

    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.

    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 one long line.

    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.

    I know it will create a files.bbs with whatever description it finds so you could import files found there but you have to go looking for them.

    There are hooks for nodelist that might be usable also but I haven't used them and I don't know off hand how they work.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From apam@21:1/126 to Netsurge on Sun Nov 8 11:39:28 2020
    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.

    Thanks!

    Andrew


    --- Talisman v0.1-dev (Linux/x86_64)
    * Origin: Talisman BBS - Experimental BBS (21:1/126)
  • From apam@21:1/126 to Al on Sun Nov 8 11:39:38 2020
    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.

    Thanks Al!

    Andrew


    --- Talisman v0.1-dev (Linux/x86_64)
    * Origin: Talisman BBS - Experimental BBS (21:1/126)
  • From Black Panther@21:1/186 to Al on Sun Nov 8 15:08:42 2020
    On 07 Nov 2020, 04:48p, Al said the following...

    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


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2020/10/31 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From Al@21:4/106 to Black Panther on Sun Nov 8 16:42:54 2020
    Hello Black,

    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. :)

    Yep, that can be an issue. BBBS and MBSE handle that issue OK but I've had mixed results in other places.

    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 into multiple LDesc lines?

    Does Mystic import the description from LDesc better?

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From Black Panther@21:1/186 to Al on Sun Nov 8 17:55:26 2020
    On 08 Nov 2020, 04:42p, Al said the following...

    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?

    Yup, the LDesc lines import just fine. The long Desc line gets truncated if it's too long.


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2020/10/31 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From Al@21:4/106 to Black Panther on Sun Nov 8 17:41:12 2020
    Hello Black,

    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.

    Cool, I'll have to grab that. I have been bothered by that in but never figured out a way to do it better.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)