You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terminal emulator and version: Terminator 1.91, Terminology 1.3.2
Python version: 3.7.2
Ranger version/commit: 1.9.2
Locale: en_GB
Context
We're making a handful of convert calls in scope.sh, some of which could be easily avoided if we reworked the code for previewing images.
Notably, working on #1443 which implements font previews, I couldn't get our previews to open a .png preview despite using the proper hash. It wasn't coming form w3m either because it can handle .png just fine. Reviewing the code, I've stumbled upon this:
So, .jpg are hard-coded, and since the program I use to generate font previews only outputs .png or .bmp, I have to resort to a convert call which is not an elegant solution.
Whilst the aforementioned is clearly something that we could avoid by modifying actions.py, there are other calls to convert inside scope.sh which we could also reconsider for the sake of efficiency.
Runtime Environment
Context
We're making a handful of
convert
calls inscope.sh
, some of which could be easily avoided if we reworked the code for previewing images.Notably, working on #1443 which implements font previews, I couldn't get our previews to open a
.png
preview despite using the proper hash. It wasn't coming formw3m
either because it can handle.png
just fine. Reviewing the code, I've stumbled upon this:ranger/ranger/core/actions.py
Lines 1019 to 1023 in b4cb267
So,
.jpg
are hard-coded, and since the program I use to generate font previews only outputs.png
or.bmp
, I have to resort to aconvert
call which is not an elegant solution.ranger/ranger/data/scope.sh
Lines 132 to 151 in f9de84d
Whilst the aforementioned is clearly something that we could avoid by modifying
actions.py
, there are other calls toconvert
insidescope.sh
which we could also reconsider for the sake of efficiency.ranger/ranger/data/scope.sh
Lines 97 to 100 in b4cb267
ranger/ranger/data/scope.sh
Lines 102 to 111 in b4cb267
HTH
The text was updated successfully, but these errors were encountered: