• How to update file directory descriptions?

    From nelgin@VERT/EOTLBBS to All on Sun Nov 3 11:20:16 2024
    This is more to Digital Man but you never know...

    I want to update the descriptions for all the directories in a library. I am reading in line by line from a file ...anyway...

    I tried updating

    file_area.lib[libname].dir_list[i].description

    Where libname is the library I'm updating and i is the index of the directory I want to update. Not working, no error but also no change.

    I guess I can do it by updating the .ini file but that seems a bit clunky and I'm sure there's a better way.

    Open to advice...

    Thanks,

    ---
    ■ Synchronet ■ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Sun Nov 3 11:54:16 2024
    Re: How to update file directory descriptions?
    By: nelgin to All on Sun Nov 03 2024 11:20 am

    This is more to Digital Man but you never know...

    I want to update the descriptions for all the directories in a library. I am reading in line by line from a file ...anyway...

    I tried updating

    file_area.lib[libname].dir_list[i].description

    That's a read-only JavaScript property. Writing to it won't do anything.

    Where libname is the library I'm updating and i is the index of the directory I want to update. Not working, no error but also no change.

    I guess I can do it by updating the .ini file but that seems a bit clunky and I'm sure there's a better way.

    Open to advice...

    Editing the msgs.ini file is the only way (either manually or via JS). I'd recommend using cfglib.js, but it hasn't been extended to support the msgs.ini file yet. :-(
    --
    digital man (rob)

    Breaking Bad quote #45:
    Tough love, all right? Here goes: You 2 suck at peddling meth. period. - Saul Norco, CA WX: 67.0°F, 48.0% humidity, 1 mph E wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Digital Man on Sun Nov 3 17:21:59 2024
    Re: How to update file directory descriptions?
    By: Digital Man to nelgin on Sun Nov 03 2024 11:54:16

    file_area.lib[libname].dir_list[i].description

    That's a read-only JavaScript property. Writing to it won't do anything.

    I figured after reading the small print. I lamented about it on irc...

    Editing the msgs.ini file is the only way (either manually or via JS). I'd recommend using cfglib.js, but it hasn't been extended to support the msgs.ini file yet. :-(

    Sounds like an opportunity for improvement either by having access to write to object or some other method?

    ---
    ■ Synchronet ■ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Sun Nov 3 15:39:07 2024
    Re: How to update file directory descriptions?
    By: nelgin to Digital Man on Sun Nov 03 2024 05:21 pm

    Re: How to update file directory descriptions?
    By: Digital Man to nelgin on Sun Nov 03 2024 11:54:16

    file_area.lib[libname].dir_list[i].description

    That's a read-only JavaScript property. Writing to it won't do anything.

    I figured after reading the small print. I lamented about it on irc...

    Editing the msgs.ini file is the only way (either manually or via JS). I'd recommend using cfglib.js, but it hasn't been extended to support the msgs.ini file yet. :-(

    Sounds like an opportunity for improvement either by having access to write to object or some other method?

    cfglib.js could (and someday will) be updated to support modifying msgs.ini files, but that's probably about it. That'll make updates via JS a little easier, but if you look at init-fidonet.js, it's not that hard to using the File object as is.

    There are *tons* of read-only properties in the Sync JS object model that reflect the sysop configuration. I'm not about to make all of those properties writable (and put in the back-end work to update all the right config files any time they're changed). That would be a ton of work and additional code for every little gain.
    --
    digital man (rob)

    Breaking Bad quote #50:
    I've got your restraining order right here. [grabs crotch] Restrain this! - WW Norco, CA WX: 69.1°F, 40.0% humidity, 6 mph W wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Digital Man on Sun Nov 3 23:19:43 2024
    Re: How to update file directory descriptions?
    By: Digital Man to nelgin on Sun Nov 03 2024 15:39:07

    cfglib.js could (and someday will) be updated to support modifying msgs.ini files, but that's probably about it. That'll make updates via JS a little easier, but if you look at init-fidonet.js, it's not that hard to using the File object as is.

    Actually, that'd be file.ini right?

    There are *tons* of read-only properties in the Sync JS object model that reflect the sysop configuration. I'm not about to make all of those properties writable (and put in the back-end work to update all the right config files any time they're changed). That would be a ton of work and additional code for every little gain.

    That's fair enough.

    As I said, I managed to get done what I needed with getIniValur and setIniValue with file.ini so I'm all set.

    Thanks,

    ---
    ■ Synchronet ■ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Mon Nov 4 02:44:38 2024
    Re: How to update file directory descriptions?
    By: nelgin to Digital Man on Sun Nov 03 2024 11:19 pm

    Re: How to update file directory descriptions?
    By: Digital Man to nelgin on Sun Nov 03 2024 15:39:07

    cfglib.js could (and someday will) be updated to support modifying msgs.ini files, but that's probably about it. That'll make updates via JS a little easier, but if you look at init-fidonet.js, it's not that hard to using the File object as is.

    Actually, that'd be file.ini right?

    Ah, yes, and cfglib.js just supports a subset of file.ini sections (not libs or dirs). It's more than the msgs.ini suppport in cfglib.js (none), but not much.
    --
    digital man (rob)

    Synchronet "Real Fact" #38:
    Synchronet first supported Windows NT-based operating systems w/v3.00b (2000) Norco, CA WX: 62.6°F, 27.0% humidity, 1 mph WSW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net