rtfm-filemanager 1.1.1 → 1.3.0
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 +41 -1
- metadata +27 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f074d7e27f2d2eec77ff1d33aaf4e783e2bf7c4624aba2882e6edfea1f9eacd8
|
4
|
+
data.tar.gz: 4a4a1b915e8ec445918b0ae774d67c798b6823b19ddc49ce1d92a49f229796a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4086961612be3e5e2a3d9a3f39dba7cd6686fcf803a568215de2c535a06a044edd497370729bcb16314fdd707e8825aeb97e6c066fa322e2d8191afbac79b6dd
|
7
|
+
data.tar.gz: 7970bcf40bf96f79d213f8787feafc66ec52c7693df5e580872830e3562ca9b3d5149eb2aa3ae47c14289ed4e37c5fc87fe695529d64fbe6e0c5e87fe978b5b8
|
data/bin/rtfm
CHANGED
@@ -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)
|
@@ -1016,6 +1050,12 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1016
1050
|
@w_b.setpos(0,pretext.length + pos)
|
1017
1051
|
@w_b.refresh
|
1018
1052
|
chr = getchr
|
1053
|
+
if chr == "C-G"
|
1054
|
+
Curses.curs_set(0)
|
1055
|
+
Curses.noecho
|
1056
|
+
@w_b.update = true
|
1057
|
+
return ""
|
1058
|
+
end
|
1019
1059
|
case chr
|
1020
1060
|
when 'UP'
|
1021
1061
|
unless @w_b.nohistory
|
metadata
CHANGED
@@ -1,19 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtfm-filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
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-
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
date: 2021-10-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: curses
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.3.2
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.2
|
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.0: Added ''grep'' functionality via the ''g'' key'
|
17
37
|
email: g@isene.com
|
18
38
|
executables:
|
19
39
|
- rtfm
|