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.
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.
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.
(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.
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).
I think the issue is that Sixelgallery should be checking the $PATH to call 'unzip', rather than needing it to reside in /sbbs/exec. ...
I think the issue is that Sixelgallery should be checking the $PATH to
call 'unzip', rather than needing it to reside in /sbbs/exec. ...
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.
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.
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
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.
| Sysop: | altere |
|---|---|
| Location: | Houston, TX |
| Users: | 76 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 09:10:22 |
| Calls: | 2,190 |
| Files: | 9,565 |
| Messages: | 323,396 |