rtfm-filemanager 1.1.2 → 1.3.1
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 +44 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57acc3fd855429b917e9bf15aa39bc49914145422bb04ab0ed1f78d5835f36e
|
4
|
+
data.tar.gz: 4880805ff17008e773d8e77f88e92a4cab2d0b61ecf6da74f062f147f4551a42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4e7b23944de6af366b41d4b17494cfa679e0889a4e8155bf714540abab128d8bd81af78bc743eaebe89ae36a7bbd22f0702c481abeb913a27c0b249a46657d3
|
7
|
+
data.tar.gz: 4ad1f7c88a038505e57c5cc07008e0b80d04a7529fbe7ce4b7ac2b8b5b60849609ad155ad2b7b3b7f1a6e3ddda72a4db3ccfe03307649a2f40a0702193ab2584
|
data/bin/rtfm
CHANGED
@@ -23,7 +23,7 @@ BASIC KEYS
|
|
23
23
|
? = Show this help text
|
24
24
|
r = Refresh RTFM (recreates all windows. Use on terminal resize or when there is garbage somewhere)
|
25
25
|
R = Reload configuration (~/.rtfm.conf)
|
26
|
-
W = Write parameters to ~/.rtfm.conf (@lsall, @lslong, @border, @width, @preview, @tagged, @marks)
|
26
|
+
W = Write parameters to ~/.rtfm.conf (@lsall, @lslong, @lsorder, @border, @width, @preview, @tagged, @marks)
|
27
27
|
q = Quit
|
28
28
|
Q = QUIT (without writing changes to the config file)
|
29
29
|
|
@@ -81,13 +81,43 @@ RIGHT PANE
|
|
81
81
|
|
82
82
|
ADDITINAL COMMANDS
|
83
83
|
/ = Enter search string in bottom window to highlight matching items
|
84
|
-
|
84
|
+
g = Run 'grep' to show files that contains the MATCH in current directory
|
85
|
+
: = Enter "command mode" in bottom window (press ENTER to execute, press Ctrl-G to escape)
|
85
86
|
; = Show command history in right pane
|
86
87
|
y = Copy path of selected item to primary selection (for pasting with middle mouse button)
|
87
88
|
Y = Copy path of selected item to clipboard
|
88
89
|
|
89
90
|
COPYRIGHT: Geir Isene, 2020-1. No rights reserved. See http://isene.com for more.
|
90
91
|
HELPTEXT
|
92
|
+
|
93
|
+
@firstrun = <<FIRSTRUN
|
94
|
+
|
95
|
+
Welcome to RTFM - the Ruby Terminal File Manager. This help text is shown on the first run.
|
96
|
+
To benefit fully from all the features, you need to install some auxilliary software.
|
97
|
+
On Ubuntu Linux you would use "apt install":
|
98
|
+
|
99
|
+
Basic requirments is "x11-utils" and "xdotool": apt install x11-utils xdotool
|
100
|
+
Syntax highlighting of text uses "bat": apt install bat
|
101
|
+
Viewing PDFs uses "pdftotext": apt install poppler-utils
|
102
|
+
Viewing LibreOffice docs uses "odt2txt": apt install odt2txt
|
103
|
+
Viewing MS docx uses "docx2txt": apt install docx2txt
|
104
|
+
Viewing MS pptx uses "unzip": apt install unzip
|
105
|
+
Viewing MS xlsx uses "ssconvert": apt install gnumeric
|
106
|
+
Viewing MS doc/xls/ppt uses "catdoc, xls2csv and catppt": apt install catdoc
|
107
|
+
Viewing Images uses "w3m and ImageMagick": apt install w3m imagemagick
|
108
|
+
Viewing Video thumbnails uses "ffmpegthumbnailer" apt install ffmpegthumbnailer
|
109
|
+
|
110
|
+
FIRSTRUN
|
111
|
+
|
112
|
+
unless File.exist?(Dir.home+'/.rtfm.conf')
|
113
|
+
puts @firstrun
|
114
|
+
puts "... hit ENTER to show the RTFM help text."
|
115
|
+
STDIN.gets
|
116
|
+
puts @help
|
117
|
+
puts "\n... hit ENTER to start RTFM. Enjoy :-)"
|
118
|
+
STDIN.gets
|
119
|
+
end
|
120
|
+
|
91
121
|
begin # BASIC SETUP
|
92
122
|
require 'fileutils'
|
93
123
|
require 'io/console'
|
@@ -230,6 +260,7 @@ def getchr # PROCESS KEY PRESSES
|
|
230
260
|
when "" then chr = "WBACK"
|
231
261
|
when "" then chr = "LDEL"
|
232
262
|
when "" then chr = "C-T"
|
263
|
+
when "" then chr = "C-G"
|
233
264
|
when "\r" then chr = "ENTER"
|
234
265
|
when "\t" then chr = "TAB"
|
235
266
|
when /./ then chr = c
|
@@ -366,6 +397,9 @@ def main_getkey # GET KEY FROM USER
|
|
366
397
|
Dir.chdir(File.dirname(File.readlink(@selected)))
|
367
398
|
end
|
368
399
|
@w_b.update = true
|
400
|
+
when 'g' # Run 'grep' in the current directory
|
401
|
+
cmd = w_b_getstr(": ", "grep -s MATCH *")
|
402
|
+
w_b_exec(cmd)
|
369
403
|
when 'L' # Run 'locate' and let user jump to a result (by '#')
|
370
404
|
cmd = w_b_getstr(": ", "locate ")
|
371
405
|
w_b_exec(cmd)
|
@@ -610,6 +644,8 @@ def conf_write
|
|
610
644
|
conf += "@lslong = #{@lslong}\n"
|
611
645
|
conf.sub!(/^@lsall.*\n/, "")
|
612
646
|
conf += "@lsall = \"#{@lsall}\"\n"
|
647
|
+
conf.sub!(/^@lsorder.*\n/, "")
|
648
|
+
conf += "@lsorder = \"#{@lsorder}\"\n"
|
613
649
|
conf.sub!(/^@width.*\n/, "")
|
614
650
|
conf += "@width = #{@width}\n"
|
615
651
|
conf.sub!(/^@border.*\n/, "")
|
@@ -1016,6 +1052,12 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1016
1052
|
@w_b.setpos(0,pretext.length + pos)
|
1017
1053
|
@w_b.refresh
|
1018
1054
|
chr = getchr
|
1055
|
+
if chr == "C-G"
|
1056
|
+
Curses.curs_set(0)
|
1057
|
+
Curses.noecho
|
1058
|
+
@w_b.update = true
|
1059
|
+
return ""
|
1060
|
+
end
|
1019
1061
|
case chr
|
1020
1062
|
when 'UP'
|
1021
1063
|
unless @w_b.nohistory
|
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: 1.1
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -30,10 +30,11 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.3.2
|
33
|
-
description:
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
description: 'A full featured terminal browser with syntax highlighted files, images
|
34
|
+
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
35
|
+
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
36
|
+
other features. New in 1.3.1: Added sort order to be written to .rtfm.conf via the
|
37
|
+
W key.'
|
37
38
|
email: g@isene.com
|
38
39
|
executables:
|
39
40
|
- rtfm
|