livetext 0.9.05 → 0.9.06

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20018f4ffc0706839f4d17412fd107ed9525b6c0958d29fa3e52dd4be8e6eb36
4
- data.tar.gz: f3805cf9788faf459c3abd3b5145d16d806802e641d432a4d0045180115a8ea1
3
+ metadata.gz: 4070b2fad292adbaaf7e01d3436d352e91c4af4d51a9cdf4217af97ab9650d2f
4
+ data.tar.gz: 483229184f006895624ab5bb9abecf3c64e131d813ad7ec5f7dca761d148890b
5
5
  SHA512:
6
- metadata.gz: 559f0f7ef52b6b09d47c20577b2febd3ccfdd125d647deb91b71947b5ce9531fa12156889c2f58ea7cad88666aa332eb91cafd58a071fcd2380e88e2e7482274
7
- data.tar.gz: 5f658b46c63d9fdc5b4786ff9f5b9be9cf2bb85e2c2215348b65f0e717af65fc20e8351dea7168765e9149c3f6c0c5ec5c632e20cd90fac4da9bc6d5974eb319
6
+ metadata.gz: 8fa6323f64814746b0181b7440b3f85638c1a42275816aa541d41dccbfccf20d2730f6a4d151981a7232f7c89fb3f165d6f35ec1d2df1b8bfcf81b9ccaeec854
7
+ data.tar.gz: 89f65b89dd48f01ea6afa008fbd5db90ff68349cdc5fc2a45e7653830d631d230962b0c04b5a0b3406ad3fccd95b8c0eff21afdf84016a3186721257cc081dc6
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.9.05"
2
+ VERSION = "0.9.06"
3
3
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
4
4
  end
5
5
 
@@ -35,7 +35,7 @@ class Livetext
35
35
  def _error!(err, abort=true, trace=false)
36
36
  where = @sources.last || @save_location
37
37
  puts @parent.body
38
- STDERR.puts "Error: #{err} (at #{where[1]} line #{where[2]})"
38
+ STDERR.puts "Error: #{err} " # (at #{where[1]} line #{where[2]})"
39
39
  STDERR.puts err.backtrace if err.respond_to?(:backtrace) # && trace
40
40
  exit if abort
41
41
  end
@@ -49,6 +49,13 @@ EOS
49
49
  Livetext::Functions.class_eval func_def
50
50
  end
51
51
 
52
+ def h1; _out "<h1>#{@_data}</h1>"; end
53
+ def h2; _out "<h2>#{@_data}</h2>"; end
54
+ def h3; _out "<h3>#{@_data}</h3>"; end
55
+ def h4; _out "<h4>#{@_data}</h4>"; end
56
+ def h5; _out "<h5>#{@_data}</h5>"; end
57
+ def h6; _out "<h6>#{@_data}</h6>"; end
58
+
52
59
  def shell!
53
60
  cmd = @_data.chomp
54
61
  system(cmd)
@@ -94,7 +94,7 @@ module Livetext::UserAPI
94
94
  lines
95
95
  end
96
96
  rescue => err
97
- str << err.inspect + "\n"
97
+ str = err.inspect + "\n"
98
98
  str << err.backtrace.map {|x| " " + x }.join("\n")
99
99
  _error!(str)
100
100
  end
@@ -43,7 +43,7 @@ def alpha_columns
43
43
  words << line.chomp
44
44
  end
45
45
  words.sort!
46
- _out "<table cellpadding=10>"
46
+ _out "<table cellpadding=2>"
47
47
  words.each_slice(n) do |w|
48
48
  items = w.map {|x| "<tt>#{x}</tt>" }
49
49
  _out "<tr><td width=5% valign=top></td><td>" + items.join("</td><td>") + "</td></tr>"
@@ -93,7 +93,7 @@ def chapter
93
93
  next_output
94
94
  _out "<title>#{@chapter}. #{title}</title>"
95
95
  _out <<-HTML
96
- <h2>Chapter #{@chapter}</h1>
96
+ <h2>Chapter #{@chapter}</h2>
97
97
  <h1>#{title}</h1>
98
98
 
99
99
  HTML
@@ -109,7 +109,7 @@ def chapterN
109
109
  next_output
110
110
  _out "<title>#{@chapter}. #{title}</title>"
111
111
  _out <<-HTML
112
- <h2>Chapter #{@chapter}</h1>
112
+ <h2>Chapter #{@chapter}</h2>
113
113
  <h1>#{title}</h1>
114
114
 
115
115
  HTML
@@ -166,7 +166,7 @@ def table2
166
166
  wide = "90"
167
167
  extra = _args[2]
168
168
  delim = " :: "
169
- _out "<br><center><table border=1 width=#{wide}% cellpadding=5>"
169
+ _out "<br><center><table width=#{wide}% cellpadding=5>"
170
170
  lines = _body(true)
171
171
  lines.map! {|line| _format(line) }
172
172
 
@@ -219,7 +219,7 @@ def table
219
219
  @table_num += 1
220
220
  title = @_data
221
221
  delim = " :: "
222
- _out "<br><center><table border=1 width=90% cellpadding=5>"
222
+ _out "<br><center><table width=90% cellpadding=5>"
223
223
  lines = _body(true)
224
224
  maxw = nil
225
225
  lines.each do |line|
@@ -22,5 +22,5 @@ def epub!
22
22
  str = `wc -w /tmp/links.out`
23
23
  nw = str.split[0]
24
24
  puts "Approx words: #{nw}"
25
- ::FileUtils.rm("TEMP.html")
25
+ # ::FileUtils.rm("TEMP.html")
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.05
4
+ version: 0.9.06
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com
@@ -139,7 +139,7 @@ homepage: https://github.com/Hal9000/livetext
139
139
  licenses:
140
140
  - Ruby
141
141
  metadata: {}
142
- post_install_message:
142
+ post_install_message:
143
143
  rdoc_options: []
144
144
  require_paths:
145
145
  - lib
@@ -154,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.0.4
158
- signing_key:
157
+ rubygems_version: 3.1.2
158
+ signing_key:
159
159
  specification_version: 4
160
160
  summary: A smart processor for text
161
161
  test_files: []