livetext 0.8.41 → 0.8.42

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe8c25b35e4833fc79866ea86456838dd5d2f036a5274a523562daf9de949d5
4
- data.tar.gz: 43a358ca0195282039dd6dc952ca8cb73e3d044fe3d2771f22cdcb309258baeb
3
+ metadata.gz: c1902fcbf9b44c268b05bcd185223203bab7e985d10f36242d41d3e7b7683e56
4
+ data.tar.gz: 9dcf1fe627a781be69837ac89f0d69929ed1a9cac2f1a86b576112af9361fb13
5
5
  SHA512:
6
- metadata.gz: e368d77a3b35ae82555c46ff3fef124022f7bfd460ae9f37510d73213c49f4ed566982f88e220df331112bdee6dc3ba9ab54037359f6d0ac30a3f3560e412672
7
- data.tar.gz: 1d85bd5b6a820294e895800f901373b1ce351bb264ff3ea76e96c7772025d0acc3d43419df19d25bfe70679702afee6b4346ebba78fc02fa20dcf1ae30ff61a6
6
+ metadata.gz: 89c23d7cbf0acd8fbc6841f79285d39a866c4ac6ebb25a2cf20516adf2b7ce306f8ccaf265db3223b149d864895b64e205e1d982d9aaa2554e4bf08d7e8a1f3b
7
+ data.tar.gz: c4eb4e89272f1d97113a3f7c825f94ef962afdb1e515b95a0490ffee4cf4418dac92a73e723848adde8b5d077d440a778bde1e16115a69f83f856ee473163fb2
data/README.md CHANGED
@@ -151,7 +151,7 @@ Most of this is summarized in this example (taken from one of the testcases):
151
151
  and `[code font].
152
152
 
153
153
  Here are some random punctuation marks:
154
- # . @ * \_ ` : ; % ^ & $
154
+ \# . @ * \_ ` : ; % ^ & $
155
155
 
156
156
  No need to escape these: * \_ `
157
157
  </pre>
data/lib/livetext.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.41"
2
+ VERSION = "0.8.42"
3
3
  end
4
4
 
5
5
  $Livetext = Livetext
@@ -15,7 +15,7 @@ require 'userapi'
15
15
  require 'standard'
16
16
  require 'formatline'
17
17
 
18
- Plugins = File.expand_path(File.join(File.dirname(__FILE__), "../dsl"))
18
+ Plugins = File.expand_path(File.join(File.dirname(__FILE__), "../plugin"))
19
19
 
20
20
  TTY = ::File.open("/dev/tty", "w")
21
21
 
data/lib/standard.rb CHANGED
@@ -278,6 +278,18 @@ module Livetext::Standard
278
278
  end
279
279
 
280
280
  def dlist
281
+ delim = _args.first
282
+ _puts "<dl>"
283
+ _body do |line|
284
+ line = _formatting(line)
285
+ term, defn = line.split(delim)
286
+ _puts "<dt>#{term}</dt>"
287
+ _puts "<dd>#{defn}</dd>"
288
+ end
289
+ _puts "</dl>"
290
+ end
291
+
292
+ def old_dlist
281
293
  delim = _args.first
282
294
  _puts "<table>"
283
295
  _body do |line|
data/livetext.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.executables << "livetext"
17
17
 
18
18
  # Files...
19
- main = Find.find("bin").to_a + Find.find("lib").to_a + Find.find("dsl").to_a
19
+ main = Find.find("bin").to_a + Find.find("lib").to_a + Find.find("plugin").to_a
20
20
  misc = %w[./README.lt3 ./README.md livetext.gemspec]
21
21
  test = Find.find("test").to_a
22
22
 
File without changes
@@ -155,6 +155,35 @@ def table2
155
155
  _optional_blank_line
156
156
  end
157
157
 
158
+ def simple_table
159
+ title = @_data
160
+ delim = " :: "
161
+ _puts "<table cellpadding=2>"
162
+ lines = _body(true)
163
+ maxw = nil
164
+ lines.each do |line|
165
+ _formatting(line)
166
+ cells = line.split(delim)
167
+ wide = cells.map {|x| x.length }
168
+ maxw = [0] * cells.size
169
+ maxw = maxw.map.with_index {|x, i| [x, wide[i]].max }
170
+ end
171
+
172
+ sum = maxw.inject(0, :+)
173
+ maxw.map! {|x| (x/sum*100).floor }
174
+
175
+ lines.each do |line|
176
+ cells = line.split(delim)
177
+ _puts "<tr>"
178
+ cells.each.with_index do |cell, i|
179
+ _puts " <td width=#{maxw}% valign=top>" +
180
+ "#{cell}</td>"
181
+ end
182
+ _puts "</tr>"
183
+ end
184
+ _puts "</table>"
185
+ end
186
+
158
187
  def table
159
188
  @table_num ||= 0
160
189
  @table_num += 1
File without changes
@@ -114,6 +114,11 @@ end
114
114
  # @meta.tags = _args
115
115
  # end
116
116
 
117
+ def image # primitive so far
118
+ _debug "img: huh? <img src=#{_args.first}></img>"
119
+ @body << "<img src=#{_args.first}></img>"
120
+ end
121
+
117
122
  def tags
118
123
  _debug "args = #{_args}"
119
124
  @meta.tags = _args
File without changes
File without changes
File without changes
File without changes
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.8.41
4
+ version: 0.8.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-02 00:00:00.000000000 Z
11
+ date: 2018-12-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com
@@ -20,20 +20,20 @@ files:
20
20
  - "./README.lt3"
21
21
  - "./README.md"
22
22
  - bin/livetext
23
- - dsl/.calibre.rb.swp
24
- - dsl/bookish.rb
25
- - dsl/calibre.rb
26
- - dsl/liveblog.rb
27
- - dsl/livemagick.rb
28
- - dsl/markdown.rb
29
- - dsl/pyggish.rb
30
- - dsl/tutorial.rb
31
23
  - lib/formatline.rb
32
24
  - lib/functions.rb
33
25
  - lib/livetext.rb
34
26
  - lib/standard.rb
35
27
  - lib/userapi.rb
36
28
  - livetext.gemspec
29
+ - plugin/.calibre.rb.swp
30
+ - plugin/bookish.rb
31
+ - plugin/calibre.rb
32
+ - plugin/liveblog.rb
33
+ - plugin/livemagick.rb
34
+ - plugin/markdown.rb
35
+ - plugin/pyggish.rb
36
+ - plugin/tutorial.rb
37
37
  - test/affirm/kbks.jpg
38
38
  - test/affirm/lm-kbks.lt
39
39
  - test/cleanup