xrpn 1.3.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/xcmd/copy +23 -0
- data/xcmd/getfile +3 -3
- data/xcmd/getfilea +3 -3
- data/xcmd/move +23 -0
- data/xcmd/open +24 -0
- data/xrpn.gemspec +2 -2
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a270f73ff7966f8a5f28def1881aca7cbccd491fbd17e6f8be18a0a8ad423319
|
4
|
+
data.tar.gz: e1aa37a38e2ce9b9ebc7561053374fe0ed78b45c2a4e069047a5e96953f0700f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17429308f52f6dc00b1b2ff7ce2ef8cb4fda18326e8eec0ba902c39b222d6b75792da79f6a5769dc1cd45925982204850ced2e1ccd91afcb6da771ed14a20ef0
|
7
|
+
data.tar.gz: a65735d8ff489cc55567850697e4d7a9c7748a6de7e9a130886c6d4c858234496370fe5f18accd306df2306972c66bb948889100df9369b74f9f0e4795e04a30
|
data/xcmd/copy
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
class XRPN
|
2
|
+
# Copy file named in Alpha to filename in X
|
3
|
+
def copy
|
4
|
+
begin
|
5
|
+
require 'fileutils'
|
6
|
+
rescue
|
7
|
+
puts "Ruby FileUtils needs to be installed."
|
8
|
+
return
|
9
|
+
end
|
10
|
+
item = @a
|
11
|
+
dest = @x
|
12
|
+
while File.exist?(dest)
|
13
|
+
dest = dest.chop + (dest[-1].to_i + 1).to_s
|
14
|
+
end
|
15
|
+
begin
|
16
|
+
FileUtils.cp_r(item, dest)
|
17
|
+
rescue StandardError => err
|
18
|
+
puts err.to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# vim:ft=ruby:
|
data/xcmd/getfile
CHANGED
data/xcmd/getfilea
CHANGED
@@ -2,11 +2,11 @@ class XRPN
|
|
2
2
|
# Read any file named in Alpha into Alpha
|
3
3
|
def getfilea
|
4
4
|
begin
|
5
|
-
@a = File.read(@a)
|
5
|
+
@a = File.read(@a).chomp
|
6
6
|
rescue
|
7
|
-
return "Cannot read the file
|
7
|
+
return "Cannot read the file \"#{a}\""
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
# vim:ft=ruby:
|
12
|
+
# vim:ft=ruby:
|
data/xcmd/move
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
class XRPN
|
2
|
+
# Move file named in Alpha to filename in X
|
3
|
+
def move
|
4
|
+
begin
|
5
|
+
require 'fileutils'
|
6
|
+
rescue
|
7
|
+
puts "Ruby FileUtils needs to be installed."
|
8
|
+
return
|
9
|
+
end
|
10
|
+
item = @a
|
11
|
+
dest = @x
|
12
|
+
while File.exist?(dest)
|
13
|
+
dest = dest.chop + (dest[-1].to_i + 1).to_s
|
14
|
+
end
|
15
|
+
begin
|
16
|
+
FileUtils.mv(item, dest)
|
17
|
+
rescue StandardError => err
|
18
|
+
puts err.to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# vim:ft=ruby:
|
data/xcmd/open
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
class XRPN
|
2
|
+
# Open a file system file or make directory the current directory
|
3
|
+
def open
|
4
|
+
if File.directory?(@a) # Rescue for permission error
|
5
|
+
begin
|
6
|
+
Dir.chdir(@a)
|
7
|
+
rescue
|
8
|
+
puts "Cannot move to directory \"#{@a}\""
|
9
|
+
end
|
10
|
+
else
|
11
|
+
begin
|
12
|
+
if File.read(@a).force_encoding("UTF-8").valid_encoding?
|
13
|
+
system("exec $EDITOR #{@a}")
|
14
|
+
else
|
15
|
+
Thread.new { system("xdg-open #{@a} 2>/dev/null") }
|
16
|
+
end
|
17
|
+
rescue
|
18
|
+
puts "Cannot open file \"#{@a}\""
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# vim:ft=ruby:
|
data/xrpn.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'xrpn'
|
3
|
-
s.version = '1.3.
|
3
|
+
s.version = '1.3.5'
|
4
4
|
s.licenses = ['Unlicense']
|
5
5
|
s.summary = "XRPN - The eXtended RPN (Reverse Polish Notation) programming language"
|
6
|
-
s.description = "A full programming language and environment extending the features of the venerable HP calculator programmable calculators. With XRPN you can accomplish a wide range of modern programming tasks as well as running existing HP-41 FOCAL programs directly. XRPN gives modern life to tens of thousands of old HP calculator programs and opens the possibilities to many, many more. New in 1.3.
|
6
|
+
s.description = "A full programming language and environment extending the features of the venerable HP calculator programmable calculators. With XRPN you can accomplish a wide range of modern programming tasks as well as running existing HP-41 FOCAL programs directly. XRPN gives modern life to tens of thousands of old HP calculator programs and opens the possibilities to many, many more. New in 1.3.5: Removed READ (already had that with GETFILE."
|
7
7
|
|
8
8
|
s.authors = ["Geir Isene"]
|
9
9
|
s.email = 'g@isene.com'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrpn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-prompt
|
@@ -28,8 +28,8 @@ description: 'A full programming language and environment extending the features
|
|
28
28
|
the venerable HP calculator programmable calculators. With XRPN you can accomplish
|
29
29
|
a wide range of modern programming tasks as well as running existing HP-41 FOCAL
|
30
30
|
programs directly. XRPN gives modern life to tens of thousands of old HP calculator
|
31
|
-
programs and opens the possibilities to many, many more. New in 1.3.
|
32
|
-
|
31
|
+
programs and opens the possibilities to many, many more. New in 1.3.5: Removed READ
|
32
|
+
(already had that with GETFILE.'
|
33
33
|
email: g@isene.com
|
34
34
|
executables:
|
35
35
|
- xrpn
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- xcmd/cmdadd
|
96
96
|
- xcmd/cmddel
|
97
97
|
- xcmd/cmdhelp
|
98
|
+
- xcmd/copy
|
98
99
|
- xcmd/correct
|
99
100
|
- xcmd/cos
|
100
101
|
- xcmd/crflas
|
@@ -175,11 +176,13 @@ files:
|
|
175
176
|
- xcmd/mdy
|
176
177
|
- xcmd/mean
|
177
178
|
- xcmd/mod
|
179
|
+
- xcmd/move
|
178
180
|
- xcmd/multiply
|
179
181
|
- xcmd/oct
|
180
182
|
- xcmd/octdec
|
181
183
|
- xcmd/off
|
182
184
|
- xcmd/on
|
185
|
+
- xcmd/open
|
183
186
|
- xcmd/p_r
|
184
187
|
- xcmd/pack
|
185
188
|
- xcmd/page
|