rtfm-filemanager 3.26 → 3.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +9 -6
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c368f9da8daffeb9d96a7146461f4096e8ccf318f4d0d73aca2ab3e7ff75d6f
4
- data.tar.gz: c2dfc4cd08b433889845f9ba6dd8db9e1e5d3808823122512f296e4d9504526c
3
+ metadata.gz: b639327d67faed186b2ec530f4bb665ef85fdec299bbdbaabb599d2b74ea7f67
4
+ data.tar.gz: 6dc2a2c89f7feab66434c378aadcb34c0cf94d83cddf5354045389c238a7e7e2
5
5
  SHA512:
6
- metadata.gz: 19830eba041d7e3fe97761dba69b1feabefff19e5e434acdaf9449383aaf31da63f01a28e0c43fa29ac524ebd1bf1487462f00ef0609976c4c434ebe9c725a3c
7
- data.tar.gz: 26ec6f0a1df169afab02a4b245121d2639591cfa241bee40f3e54ae47cdba65d2b2ec14cc44dd9bc54b96ec51c505553b4073cbdda66646c8020d166f1a656f8
6
+ metadata.gz: d2b8c1691faab4720727b5fe0bcd695651e19b265a7a0ea8530df08eb1dcf6d86fd8b27ff7bcc11f892731a170c4bb458ecda15cd9a145226813b3dcb873ede1
7
+ data.tar.gz: 5ffa3ba36e7c965831961aefb7ef5ae869e228db26464b07d7c81c7fdeebe3985daf5dd56bfc435c253a62da107b90ad45413fc05e10780c2dc6d860573e6129
data/bin/rtfm CHANGED
@@ -14,7 +14,7 @@
14
14
  # for any damages resulting from its use. Further, I am under no
15
15
  # obligation to maintain or extend this software. It is provided
16
16
  # on an 'as is' basis without any expressed or implied warranty.
17
- @version = "3.26"
17
+ @version = "3.3"
18
18
 
19
19
  # PRELIMINARIES
20
20
  @help = <<HELPTEXT
@@ -254,6 +254,7 @@ begin # BASIC SETUP
254
254
  @preview = true
255
255
  @runmailcap = false # Set to 'true' in .rtfm.conf if you want to use run-mailcap instead of xdg-open
256
256
  @batuse = true # Use batcat for syntax highlighting
257
+ @aimodel = "gpt-3.5-turbo-instruct" # The default OpenAI model, set another in .rtfm.conf if you like
257
258
  ## These are automatically written on exit
258
259
  @marks = {} # Initialize (book)marks hash
259
260
  @hash = {} # Initialize the sha directory hashing
@@ -395,7 +396,7 @@ def getchr # PROCESS KEY PRESSES
395
396
  when /[[:print:]]/ then chr = c
396
397
  else chr = ""
397
398
  end
398
- stdin_clear
399
+ #stdin_clear
399
400
  return chr
400
401
  end
401
402
  def main_getkey # GET KEY FROM USER
@@ -1414,11 +1415,13 @@ def openai # INTERFACE TO OPENAI
1414
1415
  p += "#{f}? "
1415
1416
  p += "Give a brief summary of its content: " + c unless File.directory?(@selected) and c == ""
1416
1417
 
1417
- response = client.completions( parameters: { model: "text-davinci-003", prompt: p, max_tokens: 200 })
1418
- if response["error"]["message"] == ""
1418
+ begin
1419
+ response = client.completions( parameters: { model: @aimodel, prompt: p, max_tokens: 200 })
1419
1420
  text = "OpenAI description:\n" + response["choices"][0]["text"]
1420
- else
1421
- text = response["error"]["message"]
1421
+ rescue
1422
+ text = "Error retrieving OpenAI request.\n\n"
1423
+ text += "Check your connection and @ai secret key (in .rtfm.conf).\n\n"
1424
+ text += response.to_s
1422
1425
  end
1423
1426
 
1424
1427
  @w_r.fg = 229
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: '3.26'
4
+ version: '3.30'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-21 00:00:00.000000000 Z
11
+ date: 2024-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -47,7 +47,8 @@ dependencies:
47
47
  description: 'A full featured terminal browser with syntax highlighted files, images
48
48
  shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
49
49
  easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
50
- other features. New in 3.26: Safeguarded against potential input bugs.'
50
+ other features. New in 3.30: Updated default OpenAI model and adding the option
51
+ to add own by setting @aimodel in .rtfm.conf.'
51
52
  email: g@isene.com
52
53
  executables:
53
54
  - rtfm