rtfm-filemanager 5.7.1 → 5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/rtfm +18 -14
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2af18af3c2d05afb1baf0a58d630b81b1b391d6cbbbc5bfb61bfc2e5f9a764f
|
4
|
+
data.tar.gz: 03f96975304611a76e08db2a6d974750c667bb8c5baa2e8afac5d408345ccbf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1dd0f689697528ec4a66cedb712f49b4050c1014e13131d878a1ca88d72a429dd38c0b9658e614db23988dc8a8ab1cfb27cda76a3e822ff0f080f7bf7b2000b
|
7
|
+
data.tar.gz: fc69c4b4fccbfacd3ddca202403be9a55b2ba9d69149fedbac9ee1d1238d6a5f13e69e24ee48a1d1d531d76e7c99579ab0c610753d7096c89a05fffe8d5c0db6
|
data/bin/rtfm
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
# get a great understanding of the code itself by simply sending
|
19
19
|
# or pasting this whole file into you favorite AI for coding with
|
20
20
|
# a prompt like this: "Help me understand every part of this code".
|
21
|
-
@version = '5.
|
21
|
+
@version = '5.8' # Fixed bug on images with space in file name
|
22
22
|
|
23
23
|
# SAVE & STORE TERMINAL {{{1
|
24
24
|
ORIG_STTY = `stty -g`.chomp
|
@@ -1650,8 +1650,7 @@ def render # RENDER ALL PANES {{{2
|
|
1650
1650
|
begin
|
1651
1651
|
if @selected&.match(@imagefile)
|
1652
1652
|
if cmd?('identify')
|
1653
|
-
meta = `identify #{Shellwords.escape(@selected)}
|
1654
|
-
| awk '{printf " [%s %s %s %s] ", $3,$2,$5,$6}' 2>/dev/null`
|
1653
|
+
meta = `identify -format " [%wx%h %m %[colorspace] %[bit-depth]-bit]" #{Shellwords.escape(@selected)} 2>/dev/null`
|
1655
1654
|
text += meta
|
1656
1655
|
end
|
1657
1656
|
elsif @selected&.match(@pdffile)
|
@@ -2145,18 +2144,23 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
|
|
2145
2144
|
img_max_h += 2
|
2146
2145
|
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
2147
2146
|
else
|
2148
|
-
|
2149
|
-
|
2150
|
-
img_h
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2147
|
+
# Use the already-escaped image for shell commands
|
2148
|
+
dimensions = `identify -format "%wx%h" #{image} 2>/dev/null`
|
2149
|
+
img_w, img_h = dimensions.split('x').map(&:to_i)
|
2150
|
+
|
2151
|
+
# Fix: Use simultaneous scaling to prevent overflow
|
2152
|
+
if img_w > img_max_w || img_h > img_max_h
|
2153
|
+
scale_w = img_max_w.to_f / img_w
|
2154
|
+
scale_h = img_max_h.to_f / img_h
|
2155
|
+
scale = [scale_w, scale_h].min
|
2156
|
+
|
2157
|
+
img_w = (img_w * scale).to_i
|
2158
|
+
img_h = (img_h * scale).to_i
|
2154
2159
|
end
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{image}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
2160
|
+
|
2161
|
+
# Fix: Unescape the filename for w3mimgdisplay protocol, then quote it
|
2162
|
+
unescaped = image.gsub(/\\(.)/, '\1') # Remove shell escaping
|
2163
|
+
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{unescaped}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
2160
2164
|
end
|
2161
2165
|
rescue
|
2162
2166
|
@pR.text = 'Error showing image'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtfm-filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: '5.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '7.4'
|
55
55
|
description: |-
|
56
56
|
Major release - RTFM v5: Complete rewrite using rcurses (https://github.com/isene/rcurses). Massive improvements. AI integration.
|
57
|
-
A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers. 5.
|
57
|
+
A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers. 5.8: Fixed bug on images with space in file name.
|
58
58
|
email: g@isene.com
|
59
59
|
executables:
|
60
60
|
- rtfm
|