• Re: Sixelgallery question

    From Gamgee@1:103/705 to Codefenix on Fri Mar 1 13:03:45 2024
    Re: Re: Sixelgallery question
    By: Codefenix to Gamgee on Mon Feb 12 2024 01:25 pm

    Re: Re: Sixelgallery question
    By: Gamgee to Codefenix on Sun Feb 11 2024 02:32 pm

    Yep, OK that works now. Thanks.

    Great!

    Thanks again. One last (minor cosmetic) thing I noticed - the "S" for scaling option is still displayed on the user prompt on main page. ;-)

    Dah... Ok, that's gone now. Thanks again.

    Hello again... :-)

    I'm now trying the sixel viewer (as a door) on a directory with ZIP files in it, and when I choose a ZIP file (by pressing Enter on it), the screen blinks quickly but nothing else seems to happen. Choosing GIF or JPG files works fine, but not ZIPs. Don't think I missed anything config-wise, as I don't see anything related to this in the settings file. Any clues? Thank you.

    ---
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Codefenix@1:103/705 to Gamgee on Fri Mar 1 17:48:51 2024
    Re: Re: Sixelgallery question
    By: Gamgee to Codefenix on Fri Mar 01 2024 01:03 pm

    I'm now trying the sixel viewer (as a door) on a directory with ZIP files in it, and when I choose a ZIP file (by pressing Enter on it), the screen blinks quickly but nothing else seems to happen. Choosing GIF or JPG files works fine, but not ZIPs. Don't think I missed anything config-wise, as I don't see anything related to this in the settings file. Any clues? Thank you.

    Hmmm..

    Are you running Windows or Linux out of curiosity? Either way, do you have an "unzip" utility located in /sbbs/exec? The script calls unzip to open the ZIP files. So if for some reason you don't have unzip in this path, that might explain the problem.

    (side note to self: I realize Synchronet now uses libarchive for direct ZIP file handling, so I really should update the script so it doesn't need to call unzip anymore. But I'm getting ahead of myself)

    Anyway, if you're using the Windows version of SBBS, then unzip.exe *should* already be in /sbbs/exec. I don't know if it's there on Linux; if it's not, then try installing it (i.e.: sudo apt install unzip) and see if that fixes you up.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...We Are Open Seven Days A Week, Including Sundays.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Codefenix on Sat Mar 2 07:47:00 2024
    Codefenix wrote to Gamgee <=-

    Re: Re: Sixelgallery question
    By: Gamgee to Codefenix on Fri Mar 01 2024 01:03 pm

    I'm now trying the sixel viewer (as a door) on a directory with ZIP files in it, and when I choose a ZIP file (by pressing Enter on it), the screen blinks quickly but nothing else seems to happen. Choosing GIF or JPG files works fine, but not ZIPs. Don't think I missed anything config-wise, as I don't see anything related to this in the settings file. Any clues? Thank you.

    Hmmm..

    Are you running Windows or Linux out of curiosity? Either way, do
    you have an "unzip" utility located in /sbbs/exec? The script
    calls unzip to open the ZIP files. So if for some reason you
    don't have unzip in this path, that might explain the problem.

    I'm running on Linux. I certainly do have unzip installed on the system
    (at /usr/bin/unzip), and it works fine in all system aspects, including viewing the contents of ZIP files in the file areas. More below...

    (side note to self: I realize Synchronet now uses libarchive for
    direct ZIP file handling, so I really should update the script so
    it doesn't need to call unzip anymore. But I'm getting ahead of
    myself)

    For grins, I copied 'unzip' to my /sbbs/exec directory, and... it now
    works as expected. But that surely isn't the "normal" way to use unzip,
    as it's defined in my system's $PATH already (to be in /usr/bin).

    Anyway, if you're using the Windows version of SBBS, then
    unzip.exe *should* already be in /sbbs/exec. I don't know if it's
    there on Linux; if it's not, then try installing it (i.e.: sudo
    apt install unzip) and see if that fixes you up.

    I think the issue is that Sixelgallery should be checking the $PATH to
    call 'unzip', rather than needing it to reside in /sbbs/exec. ...

    Thanks!



    ... Internal Error: The system has been taken over by sheep at line 19960
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Codefenix@1:103/705 to Gamgee on Sat Mar 2 15:24:59 2024
    Re: Re: Sixelgallery question
    By: Gamgee to Codefenix on Sat Mar 02 2024 07:47 am

    For grins, I copied 'unzip' to my /sbbs/exec directory, and... it now works as expected. But that surely isn't the "normal" way to use unzip, as it's defined in my system's $PATH already (to be in /usr/bin).

    Oh, agreed. I really only wanted to ascertain whether it would "fix" the problem.

    I think the issue is that Sixelgallery should be checking the $PATH to call 'unzip', rather than needing it to reside in /sbbs/exec. ...

    The thing is though, SBBS for Windows ships with unzip.exe in /sbbs/exec (at least it did in the latest non-dev release), so this would end up breaking it in Windows, where unzip.exe is expected to be found there.

    ANSIview opens ZIP files the same way, so I imagine you're almost certainly having the same issue there opening ZIP files containing packed artwork.

    A long-term solution will ultimately involve removing external calls to unzip altogether, and instead using the Archive class which was introduced into SBBS as of 3.19. I'll have to ponder this more though, since I don't want to break the script for folks who might still be running <= 3.18.

    So for now, as an inelegant workaround, we'll have SixelGallery test for the existence of unzip.exe in /sbbs/exec before calling it, and if it does not exist, then we'll simply call unzip without supplying its path, assuming the utility exists in the system path.

    When you get a chance, remove the copy of unzip you put in your /sbbs/exec directory and try the latest update I just made. If all goes well, it should create a temporary subdirectory containing your unzipped files, let you browse them, and then remove them when you go back to the menu.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...A conclusion is simply the place where someone got tired of thinking.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Gamgee on Sat Mar 2 13:20:39 2024
    Re: Re: Sixelgallery question
    By: Gamgee to Codefenix on Sat Mar 02 2024 07:47 am

    I think the issue is that Sixelgallery should be checking the $PATH to
    call 'unzip', rather than needing it to reside in /sbbs/exec. ...

    Ideally, it'd use the built-in Archive class instead. But if it's going to execute unzip, executing the command-line "%@unzip ..." would expand to "\sbbs\exec\unzip ..." on Windows and "unzip ..." on *nix:
    https://wiki.synchro.net/config:cmdline
    --
    digital man (rob)

    Rush quote #70:
    He's got a problem with his power, with weapons on patrol .. New World Man Norco, CA WX: 57.1øF, 80.0% humidity, 5 mph SW wind, 0.04 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Codefenix on Sat Mar 2 14:56:00 2024
    Codefenix wrote to Gamgee <=-

    For grins, I copied 'unzip' to my /sbbs/exec directory, and... it now works as expected. But that surely isn't the "normal" way to use unzip, as it's defined in my system's $PATH already (to be in /usr/bin).

    Oh, agreed. I really only wanted to ascertain whether it would
    "fix" the problem.

    I think the issue is that Sixelgallery should be checking the $PATH to call 'unzip', rather than needing it to reside in /sbbs/exec. ...

    The thing is though, SBBS for Windows ships with unzip.exe in
    /sbbs/exec (at least it did in the latest non-dev release), so
    this would end up breaking it in Windows, where unzip.exe is
    expected to be found there.

    Ahhh, didn't know that zip/unzip were not in the $PATH normally on
    Windows.

    ANSIview opens ZIP files the same way, so I imagine you're almost certainly having the same issue there opening ZIP files
    containing packed artwork.

    Haven't used ANSIview yet, but likely will soon...

    A long-term solution will ultimately involve removing external
    calls to unzip altogether, and instead using the Archive class
    which was introduced into SBBS as of 3.19. I'll have to ponder
    this more though, since I don't want to break the script for
    folks who might still be running <= 3.18.

    So for now, as an inelegant workaround, we'll have SixelGallery
    test for the existence of unzip.exe in /sbbs/exec before calling
    it, and if it does not exist, then we'll simply call unzip
    without supplying its path, assuming the utility exists in the
    system path.

    Seems elegant enough to me!

    When you get a chance, remove the copy of unzip you put in your
    /sbbs/exec directory and try the latest update I just made. If
    all goes well, it should create a temporary subdirectory
    containing your unzipped files, let you browse them, and then
    remove them when you go back to the menu.

    I did all that, and the new version works perfectly. Thanks very much
    for the prompt reply and fix!


    ... Honk if you love BBSing!
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Codefenix@1:103/705 to Digital Man on Mon Mar 4 10:06:19 2024
    Re: Re: Sixelgallery question
    By: Digital Man to Gamgee on Sat Mar 02 2024 01:20 pm

    Ideally, it'd use the built-in Archive class instead. But if it's going to execute unzip, executing the command-line "%@unzip ..." would expand to "\sbbs\exec\unzip ..." on Windows and "unzip ..." on *nix: https://wiki.synchro.net/config:cmdline

    Should %@ apply to system.exec calls as well?

    e.g.: system.exec( '%@unzip -o -qq "zipfile.zip" -d "c:\tempdir"' );

    Because this does not seem to work for me (Windows).

    I probably will switch to using the Archive class eventually, but for now I don't want to break compatibility with <= SBBS 3.18.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...A liberal is a man too broadminded to take his own side in a quarrel.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Codefenix on Mon Mar 4 14:09:01 2024
    Re: Re: Sixelgallery question
    By: Codefenix to Digital Man on Mon Mar 04 2024 10:06 am

    Re: Re: Sixelgallery question
    By: Digital Man to Gamgee on Sat Mar 02 2024 01:20 pm

    Ideally, it'd use the built-in Archive class instead. But if it's going to execute unzip, executing the command-line "%@unzip ..." would expand to "\sbbs\exec\unzip ..." on Windows and "unzip ..." on *nix: https://wiki.synchro.net/config:cmdline

    Should %@ apply to system.exec calls as well?

    e.g.: system.exec( '%@unzip -o -qq "zipfile.zip" -d "c:\tempdir"' );

    In JS, the bbs.cmdstr() function does the specifier expansion. https://wiki.synchro.net/config:cmdline

    Because this does not seem to work for me (Windows).

    You would also need to either double-up that backslash or use a forward-slash instead.

    I probably will switch to using the Archive class eventually, but for now I don't want to break compatibility with <= SBBS 3.18.

    Something like this then:

    system.exec(bbs.cmdstr("%@unzip -o -qq zipfile.zip -d c:\\tempdir\*"));
    --
    digital man (rob)

    This Is Spinal Tap quote #36:
    Bobbi Flekman: Money talks, and bullshit walks.
    Norco, CA WX: 59.9øF, 56.0% humidity, 1 mph W wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)