livetext 0.9.01 → 0.9.02
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/formatline.rb +3 -0
- data/lib/livetext.rb +1 -1
- data/lib/standard.rb +1 -0
- data/lib/userapi.rb +5 -8
- data/plugin/calibre.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9e45d3b0ea8fb06374c84d7e830ca7537fc553decbdbe034171dd7f9395671a
|
4
|
+
data.tar.gz: 1943173d9090705f70b447e4a283d73cb9bbd86c7458a6e744431c79e3ccea21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78452f768fe1a334af4f7b2f5ac437bcda06d27a7e4ae3bf360ad92db61632a0bdb67c1a8e5fcf7ba8f18e4c3941181c084fb2a88b0ece4eae7b3eb31e4bddb6
|
7
|
+
data.tar.gz: 4fca6756c94dcceb8a7f5224d71aca40e3a47cea1bfc1d660e62409ed532b1bed1123528615e32ca01715f0a6a8d2e7efb07b9a22ed2c7f2c0362829c7b2639f
|
data/lib/formatline.rb
CHANGED
@@ -195,6 +195,7 @@ class FormatLine
|
|
195
195
|
end
|
196
196
|
|
197
197
|
def add_token(kind, token = @token)
|
198
|
+
return if token.nil?
|
198
199
|
@tokenlist << [kind, token] unless token.empty?
|
199
200
|
@token = Null.dup
|
200
201
|
end
|
@@ -352,6 +353,8 @@ class FormatLine
|
|
352
353
|
grab # ZZZ
|
353
354
|
loop do
|
354
355
|
case
|
356
|
+
when curr.nil?
|
357
|
+
return str
|
355
358
|
when curr == Escape
|
356
359
|
str << escaped
|
357
360
|
next
|
data/lib/livetext.rb
CHANGED
data/lib/standard.rb
CHANGED
data/lib/userapi.rb
CHANGED
@@ -68,15 +68,14 @@ module Livetext::UserAPI
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def _body(raw=false)
|
71
|
-
lines = []
|
71
|
+
lines = []
|
72
72
|
end_found = false
|
73
73
|
loop do
|
74
74
|
@line = nextline
|
75
75
|
break if @line.nil?
|
76
76
|
@line.chomp!
|
77
|
-
|
78
|
-
|
79
|
-
next if _comment?(@line) # FIXME Will cause problem with $. ?
|
77
|
+
break if _end?(@line)
|
78
|
+
next if _comment?(@line)
|
80
79
|
@line = _format(@line) unless raw
|
81
80
|
lines << @line
|
82
81
|
end
|
@@ -91,13 +90,11 @@ module Livetext::UserAPI
|
|
91
90
|
str = "Fake error? 'Expecting .end, found end of file'\n"
|
92
91
|
str << err.inspect + "\n"
|
93
92
|
str << err.backtrace.map {|x| " " + x }.join("\n")
|
94
|
-
|
95
|
-
exit
|
96
|
-
# _error!(str)
|
93
|
+
_error!(str)
|
97
94
|
end
|
98
95
|
|
99
96
|
def _body_text(raw=false)
|
100
|
-
_body
|
97
|
+
_body.join("\n")
|
101
98
|
end
|
102
99
|
|
103
100
|
def _raw_body!
|
data/plugin/calibre.rb
CHANGED
@@ -6,6 +6,7 @@ def epub!
|
|
6
6
|
@cover = @_args[2]
|
7
7
|
if ::File.directory?(src)
|
8
8
|
files = ::Dir["#{src}/*"].grep /\.html$/
|
9
|
+
files = files.sort # why is this necessary now?
|
9
10
|
cmd = "cat #{files.join(' ')} >TEMP.html"
|
10
11
|
system(cmd)
|
11
12
|
else
|
@@ -17,7 +18,8 @@ def epub!
|
|
17
18
|
cmd << "--cover #@cover " if @cover
|
18
19
|
system(cmd)
|
19
20
|
|
20
|
-
|
21
|
+
system("links -dump TEMP.html >/tmp/links.out")
|
22
|
+
str = `wc -w /tmp/links.out`
|
21
23
|
nw = str.split[0]
|
22
24
|
puts "Approx words: #{nw}"
|
23
25
|
::FileUtils.rm("TEMP.html")
|
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.
|
4
|
+
version: 0.9.02
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|