• Linux addfiles from CD

    From Clogan@1:229/2 to All on Monday, August 19, 2019 06:16:00
    From: clogan@vert.synchro.net.remove-fo-this

    In trying to add a CD to the file libraries on a Linux system I've run into
    the following problem. On the CD, all files.bbs files have filenames in uppercase. But the actual filenames on the CD are lower case. When running addfiles, all files show as "not found". By copying a couple of the CD's directories to the HDD so I can edit/modify them, then either modifying
    the filenames in files.bbs to lowercase, OR renaming all the actual files
    to uppercase, addfiles works perfectly adding all files and descriptions.
    Is there a way for addfiles to ignore the difference in case when doing
    a bulk add using files.bbs?


    --- MultiMail/Linux v0.52
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Mortifis@1:229/2 to All on Monday, August 19, 2019 14:57:19
    From: mortifis@ALLEYCAT.remove-kjv-this

    To: Clogan
    @MSGID: <5D5A86A5.6161.sync@vert.synchro.net>
    @TZ: c1e0
    In trying to add a CD to the file libraries on a Linux system I've run into the following problem. On the CD, all files.bbs files have filenames in uppercase. But the actual filenames on the CD are lower case. When running addfiles, all files show as "not found". By copying a couple of the CD's directories to the HDD so I can edit/modify them, then either modifying
    the filenames in files.bbs to lowercase, OR renaming all the actual files
    to uppercase, addfiles works perfectly adding all files and descriptions.
    Is there a way for addfiles to ignore the difference in case when doing
    a bulk add using files.bbs?

    I am sure someone can come up with a better script. Try this with jsexec (save it to a file in /sbbs/exec or whereever

    // usage:
    // to copy ALL files from directory use /sbbs/jsexec copyfiles and when prompted for
    // Path from: end the path with /*
    // ie: /sbbs/mods/*
    //
    // there is no need to add a trailing / at the end of Copy to

    load("sbbsdefs.js");

    var os = system.os_version;
    var myos = os.split(" ");
    print('OS = ' + myos[0] +'\r\n');

    if(myos[0].toLowerCase() == 'windows')
    var bs = '\\';
    else var bs = '/';

    if (argc==0)
    path = prompt("Path from");
    else
    path = argv[0];

    if (path==undefined) exit();

    if (path.indexOf('*')<0 && path.indexOf('?')<0)
    path += "*"; // No pattern specified

    path1 = prompt("Copy to");

    if(path1==undefined) exit();

    var lastChar = path1[path1.length -1];



    dir = directory(path,GLOB_PERIOD);


    for (i in dir) {
    if(this.bbs && bbs.sys_status&SS_ABORT) break;
    var fn = dir[i].split(bs);
    var rn = fn[fn.length-1];
    if(rn != '.' || rn != '..') {
    try {
    print('Renaming '+ dir[i] + ' to ' + path1 + bs + rn.toUpperCase());
    js.global.file_copy(dir[i], path1 + bs + rn.toLowerCase());
    }
    catch(err) {
    print("Fuck! " + err);
    }
    }
    }


    then you can use addfiles as per usual (I tested this on windows but it should work on linux



    My doctor said I have the body of a 25 year old ... and the mind of a 10 :-/

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Gamgee@1:229/2 to Clogan on Monday, August 19, 2019 11:52:00
    From: gamgee@PALANT.remove-2w3-this

    To: Clogan
    Clogan wrote to All <=-

    In trying to add a CD to the file libraries on a Linux system
    I've run into the following problem. On the CD, all files.bbs
    files have filenames in uppercase. But the actual filenames on
    the CD are lower case. When running addfiles, all files show as
    "not found". By copying a couple of the CD's directories to the
    HDD so I can edit/modify them, then either modifying the
    filenames in files.bbs to lowercase, OR renaming all the actual
    files to uppercase, addfiles works perfectly adding all files and descriptions. Is there a way for addfiles to ignore the
    difference in case when doing a bulk add using files.bbs?

    Probably easiest to just convert the files.bbs to lowercase...

    This command in linux will do that:

    cat files.bbs | tr '[A-Z]' '[a-z]' > newlist.bbs

    (and then move/rename the list files before importing).



    ... A day without sunshine is like night.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Digital Man@1:229/2 to All on Monday, August 19, 2019 13:22:21
    From: digital.man@vert.synchro.net.remove-11l7-this

    To: Clogan
    Re: Linux addfiles from CD
    By: Clogan to All on Mon Aug 19 2019 06:16 am

    In trying to add a CD to the file libraries on a Linux system I've run into the following problem. On the CD, all files.bbs files have filenames in uppercase. But the actual filenames on the CD are lower case. When running addfiles, all files show as "not found". By copying a couple of the CD's directories to the HDD so I can edit/modify them, then either modifying
    the filenames in files.bbs to lowercase, OR renaming all the actual files
    to uppercase, addfiles works perfectly adding all files and descriptions.
    Is there a way for addfiles to ignore the difference in case when doing
    a bulk add using files.bbs?

    I just committed an update to addfiles.c that should address this. Thanks for the detailed problem report.

    digital man

    Synchronet/BBS Terminology Definition #17:
    DCE = Data Communications Equipment (or Deuce, Stephen Hurd)
    Norco, CA WX: 84.0øF, 51.0% humidity, 5 mph E wind, 0.00 inches rain/24hrs
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Mortifis@1:229/2 to All on Monday, August 19, 2019 19:20:18
    From: mortifis@ALLEYCAT.remove-5kl-this

    To: Digital Man
    @MSGID: <5D5B04FD.6189.sync@vert.synchro.net>
    @REPLY: <5D5A86A5.6161.sync@vert.synchro.net>
    @TZ: c1e0
    Re: Linux addfiles from CD
    By: Clogan to All on Mon Aug 19 2019 06:16 am

    In trying to add a CD to the file libraries on a Linux system I've run into the following problem. On the CD, all files.bbs files have filenames in uppercase. But the actual filenames on the CD are lower case. When running addfiles, all files show as "not found". By copying a couple of the CD's directories to the HDD so I can edit/modify them, then either modifying
    the filenames in files.bbs to lowercase, OR renaming all the actual files to uppercase, addfiles works perfectly adding all files and descriptions. Is there a way for addfiles to ignore the difference in case when doing
    a bulk add using files.bbs?

    I just committed an update to addfiles.c that should address this. Thanks for the detailed problem report.

    LOL, like I said in my reply, "I am sure someone(DM :) has a better solution" than the script I posted :-P


    My doctor said I have the body of a 25 year old ... and the mind of a 10 :-/

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Clogan@1:229/2 to All on Monday, August 19, 2019 16:10:13
    From: clogan@vert.synchro.net.remove-qxq-this

    To: Digital Man
    Re: Linux addfiles from CD
    By: Digital Man to Clogan

    I just committed an update to addfiles.c that should address this. Thanks for the detailed problem report.

    Thanks for the quick response! I'll check out the new commit.

    And thanks to all that responded with ideas and suggestions!

    Chuck
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From mark lewis@1:229/2 to you on Tuesday, August 20, 2019 09:15:14
    From: mark.lewis@1:3634/12.73.remove-mhw-this

    To: Gamgee

    On 2019 Aug 19 11:52:00, you wrote to Clogan:

    Probably easiest to just convert the files.bbs to lowercase...

    This command in linux will do that:

    cat files.bbs | tr '[A-Z]' '[a-z]' > newlist.bbs

    that'll convert the descriptions, too... then we lose all that BeauTiFuL CaMeL/LeeT CaSe text :P

    )\/(ark

    Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.
    ... We can't have a crisis today, my schedule is already full.
    ---
    * Origin: (1:3634/12.73)
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Dan Clough@1:229/2 to mark lewis on Tuesday, August 20, 2019 15:11:00
    From: dan.clough@1:123/115.remove-n0j-this

    To: mark lewis
    mark lewis wrote to Gamgee <=-

    Probably easiest to just convert the files.bbs to lowercase...
    This command in linux will do that:
    cat files.bbs | tr '[A-Z]' '[a-z]' > newlist.bbs

    that'll convert the descriptions, too... then we lose all that
    BeauTiFuL CaMeL/LeeT CaSe text :P

    Ooooh... good catch.

    Hmmmm, better to change the case of the filenames on disk then, I
    guess.

    But probably neither is needed now, saw that DM has made a fix
    for this in the Addfiles code.



    ... Gone crazy, be back later, please leave message.
    === MultiMail/Linux v0.52
    --- SBBSecho 3.08-Linux
    * Origin: Palantir * palantirbbs.ddns.net * Pensacola, FL * (1:123/115)
    --- Synchronet 3.17c-Win32 NewsLink 1.110
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)