livetext 0.8.41 → 0.8.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/livetext.rb +2 -2
- data/lib/standard.rb +12 -0
- data/livetext.gemspec +1 -1
- data/{dsl → plugin}/.calibre.rb.swp +0 -0
- data/{dsl → plugin}/bookish.rb +29 -0
- data/{dsl → plugin}/calibre.rb +0 -0
- data/{dsl → plugin}/liveblog.rb +5 -0
- data/{dsl → plugin}/livemagick.rb +0 -0
- data/{dsl → plugin}/markdown.rb +0 -0
- data/{dsl → plugin}/pyggish.rb +0 -0
- data/{dsl → plugin}/tutorial.rb +0 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1902fcbf9b44c268b05bcd185223203bab7e985d10f36242d41d3e7b7683e56
|
4
|
+
data.tar.gz: 9dcf1fe627a781be69837ac89f0d69929ed1a9cac2f1a86b576112af9361fb13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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__), "../
|
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("
|
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
|
data/{dsl → plugin}/bookish.rb
RENAMED
@@ -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
|
data/{dsl → plugin}/calibre.rb
RENAMED
File without changes
|
data/{dsl → plugin}/liveblog.rb
RENAMED
@@ -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
|
data/{dsl → plugin}/markdown.rb
RENAMED
File without changes
|
data/{dsl → plugin}/pyggish.rb
RENAMED
File without changes
|
data/{dsl → plugin}/tutorial.rb
RENAMED
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.
|
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-
|
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
|