livetext 0.8.36 → 0.8.37
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 +4 -4
- data/README.lt3 +9 -9
- data/dsl/liveblog.rb +1 -1
- data/lib/livetext.rb +1 -1
- data/test/lines.lt3 +213 -0
- data/test/myfile.jpg +0 -0
- data/test/somefile.jpg +0 -0
- data/test/try.lt3 +1 -1
- data/test/try2.lt3 +1 -0
- data/test/try2.rb +26 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88a730499ca048de3cb98e463346865be49ff32e
|
4
|
+
data.tar.gz: fa109bc7cd4d564d151f27f70c1bbe77b3b6ea6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f38a279664cbafd65e2fdbcdfb48bd58344203253501977053f0e33243f57d3c1eb352af033e0f2bbdafb7eb11224c0d61f3ba552e1e53ecbc62e21c4cfff8
|
7
|
+
data.tar.gz: 878be4547f43373cfea584f4de3fcccc4cede55a60b2c958e4abb62da2d45f68d32c5385cf0fa25ff220e557de8ba698a8aabee523873bca020994b417d1d0eb
|
data/README.lt3
CHANGED
@@ -138,15 +138,15 @@ names are essentially the same as the names of the dot-commands, with occasional
|
|
138
138
|
`copy %% Copy this input file verbatim (no interpretation)
|
139
139
|
`r %% Pass a single line through without processing
|
140
140
|
`raw %% Pass this special text block (terminated with ``__EOF__) directly into output without processing
|
141
|
-
`func %% Define a function to be invoked inline
|
142
|
-
`say %% Print a message to the screen
|
143
|
-
`banner %% Print a "noticeable" message to the screen
|
144
|
-
`quit %% End processing and exit
|
145
|
-
`nopass %% Don't pass lines through (just honor commands)
|
146
|
-
`include %% Read and process another file (typically a `.lt3 file)
|
147
|
-
`debug %% Turn on debugging
|
148
|
-
`nopara %% Turn off the "blank line implies new paragraph" switch
|
149
|
-
`newpage %% Start a new output page
|
141
|
+
`func %% Define a function to be invoked inline
|
142
|
+
`say %% Print a message to the screen
|
143
|
+
`banner %% Print a "noticeable" message to the screen
|
144
|
+
`quit %% End processing and exit
|
145
|
+
`nopass %% Don't pass lines through (just honor commands)
|
146
|
+
`include %% Read and process another file (typically a `.lt3 file)
|
147
|
+
`debug %% Turn on debugging
|
148
|
+
`nopara %% Turn off the "blank line implies new paragraph" switch
|
149
|
+
`newpage %% Start a new output page
|
150
150
|
.end
|
151
151
|
|
152
152
|
.section Examples from the tests
|
data/dsl/liveblog.rb
CHANGED
data/lib/livetext.rb
CHANGED
data/test/lines.lt3
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
tick: Single token, beginning of line
|
2
|
+
`def is like a reserved word
|
3
|
+
|
4
|
+
tick: Single token, middle of line
|
5
|
+
They say `def is like a reserved word
|
6
|
+
|
7
|
+
tick: Single token, end of line
|
8
|
+
like a reserved word, is `def
|
9
|
+
|
10
|
+
tick: Bracketed, normal
|
11
|
+
This is `[code font] here
|
12
|
+
|
13
|
+
tick: Bracketed, hits EOL
|
14
|
+
This is `[code font here
|
15
|
+
|
16
|
+
tick: followed by space
|
17
|
+
This is not ` code
|
18
|
+
|
19
|
+
tick: followed by EOL
|
20
|
+
This also isn't code: `
|
21
|
+
|
22
|
+
tick: Doubled, ignores comma
|
23
|
+
This is ``code, of course
|
24
|
+
|
25
|
+
tick: Doubled, ignores period
|
26
|
+
This is ``code. Hooray, I guess.
|
27
|
+
|
28
|
+
tick: Doubled, ignores right paren
|
29
|
+
(By the way, this is ``code)
|
30
|
+
|
31
|
+
tick: Doubled, ignores EOL
|
32
|
+
Up to EOL, this is ``code
|
33
|
+
|
34
|
+
uscore: Single token, beginning of line
|
35
|
+
_This is italics
|
36
|
+
|
37
|
+
uscore: Single token, middle of line
|
38
|
+
And _this is italics
|
39
|
+
|
40
|
+
uscore: Single token, end of line
|
41
|
+
And so is _this
|
42
|
+
|
43
|
+
uscore: Bracketed, normal
|
44
|
+
The _[USS Enterprise] was here
|
45
|
+
|
46
|
+
uscore: Bracketed, hits EOL
|
47
|
+
Hey, it's the _[USS Enterprise
|
48
|
+
|
49
|
+
uscore: followed by space
|
50
|
+
This: _ is just an underscore
|
51
|
+
|
52
|
+
uscore: followed by EOL
|
53
|
+
This is just an underscore: _
|
54
|
+
|
55
|
+
uscore: Doubled, ignores comma
|
56
|
+
Just a __second, ok?
|
57
|
+
|
58
|
+
uscore: Doubled, ignores period
|
59
|
+
Just a __second. OK?
|
60
|
+
|
61
|
+
uscore: Doubled, ignores right paren
|
62
|
+
I'll (just a __second) be right there.
|
63
|
+
|
64
|
+
uscore: Doubled, ignores EOL
|
65
|
+
Be there in a __second
|
66
|
+
|
67
|
+
Tick has precedence over underscore
|
68
|
+
This is a `piece_of_code here
|
69
|
+
|
70
|
+
under: Starts after double quote?
|
71
|
+
He said, "_Please go away."
|
72
|
+
|
73
|
+
Dollar sign followed by blank
|
74
|
+
This: $ is a dollar sign
|
75
|
+
|
76
|
+
Dollar sign followed by non-alpha
|
77
|
+
I'd pay $3 for that
|
78
|
+
|
79
|
+
Dollar sign followed by EOL
|
80
|
+
This is a dollar sign: $
|
81
|
+
|
82
|
+
Double dollar sign followed by blank
|
83
|
+
This: $$ is not a function call
|
84
|
+
|
85
|
+
Double dollar sign followed by non-alpha
|
86
|
+
If I say $$-, that's not a function call
|
87
|
+
|
88
|
+
Double dollar sign followed by EOL
|
89
|
+
This is two dollar signs: $$
|
90
|
+
|
91
|
+
Escaped *
|
92
|
+
Asterisk followed by abc: \*abc
|
93
|
+
|
94
|
+
Escaped _
|
95
|
+
Underscore followed by abc: \_abc
|
96
|
+
|
97
|
+
Escaped `
|
98
|
+
Tick followed by abc: \`abc
|
99
|
+
|
100
|
+
Escaped $
|
101
|
+
This: \$var is not a variable
|
102
|
+
|
103
|
+
Escaped $$
|
104
|
+
This: \$\$func is not a function
|
105
|
+
|
106
|
+
strike: Single token, beginning of line
|
107
|
+
~this - no, I mean that
|
108
|
+
|
109
|
+
strike: Single token, middle of line
|
110
|
+
They say ~redacted is fun
|
111
|
+
|
112
|
+
strike: Single token, end of line
|
113
|
+
Ignore this: ~foobar
|
114
|
+
|
115
|
+
strike: Bracketed, normal
|
116
|
+
This is ~[crossed out] text
|
117
|
+
|
118
|
+
strike: Bracketed, hits EOL
|
119
|
+
This is ~[more stuff crossed out
|
120
|
+
|
121
|
+
strike: followed by space
|
122
|
+
This is not ~ overstrike
|
123
|
+
|
124
|
+
strike: followed by EOL
|
125
|
+
This also isn't overstrike: `
|
126
|
+
|
127
|
+
strike: Doubled, ignores comma
|
128
|
+
This is ~~overstrike, of course
|
129
|
+
|
130
|
+
strike: Doubled, ignores period
|
131
|
+
This is ~~overstrike. Hooray, I guess.
|
132
|
+
|
133
|
+
strike: Doubled, ignores right paren
|
134
|
+
(By the way, this is ~~overstrike)
|
135
|
+
|
136
|
+
strike: Doubled, ignores EOL
|
137
|
+
Up to EOL, this is ~~redacted
|
138
|
+
|
139
|
+
Trying $$b function, no param
|
140
|
+
This is $$b being called
|
141
|
+
|
142
|
+
Trying $$b function, brackets
|
143
|
+
This is $$b[bold text] being called
|
144
|
+
|
145
|
+
Trying $$b function, unterminated brackets
|
146
|
+
This is $$b[bold text being called
|
147
|
+
|
148
|
+
Trying $$b function, colon param
|
149
|
+
This is $$b:token being called
|
150
|
+
|
151
|
+
Try $$i
|
152
|
+
There is $$i[some text] here
|
153
|
+
|
154
|
+
Try $$t
|
155
|
+
There is $$t[some text] here
|
156
|
+
|
157
|
+
Try $$s
|
158
|
+
There is $$s[some text] here
|
159
|
+
|
160
|
+
Try $$bi
|
161
|
+
There is $$bi[some text] here
|
162
|
+
|
163
|
+
Try $$bt
|
164
|
+
There is $$bt[some text] here
|
165
|
+
|
166
|
+
Try $$bs
|
167
|
+
There is $$bs[some text] here
|
168
|
+
|
169
|
+
Try $$it
|
170
|
+
There is $$it[some text] here
|
171
|
+
|
172
|
+
Try $$is
|
173
|
+
There is $$is[some text] here
|
174
|
+
|
175
|
+
Try $$ts
|
176
|
+
There is $$ts[some text] here
|
177
|
+
|
178
|
+
Try $$bit
|
179
|
+
There is $$bit[some text] here
|
180
|
+
|
181
|
+
Try $$bis
|
182
|
+
There is $$bis[some text] here
|
183
|
+
|
184
|
+
Try $$bts
|
185
|
+
There is $$bts[some text] here
|
186
|
+
|
187
|
+
Try $$its
|
188
|
+
There is $$its[some text] here
|
189
|
+
|
190
|
+
Try $$bits
|
191
|
+
There is $$bits[some text] here
|
192
|
+
|
193
|
+
Escaped brackets inside bracketed function parameter
|
194
|
+
Here is an $$t[\[:array, :expression\]] with escapes.
|
195
|
+
|
196
|
+
Escape brackets inside *
|
197
|
+
There are brackets *[\[\]] here
|
198
|
+
|
199
|
+
Escape brackets inside _
|
200
|
+
There are brackets _[\[\]] here
|
201
|
+
|
202
|
+
Escape brackets inside `
|
203
|
+
There are brackets `[\[\]] here
|
204
|
+
|
205
|
+
Escape brackets inside ~
|
206
|
+
There are brackets ~[\[\]] here
|
207
|
+
|
208
|
+
Check output of $$date
|
209
|
+
Today is $$date, I guess
|
210
|
+
|
211
|
+
Check output of $$time
|
212
|
+
Tick tock, it's $$time right now
|
213
|
+
|
data/test/myfile.jpg
CHANGED
Binary file
|
data/test/somefile.jpg
CHANGED
Binary file
|
data/test/try.lt3
CHANGED
data/test/try2.lt3
CHANGED
data/test/try2.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rmagick'
|
2
|
+
|
3
|
+
canvas = Magick::Draw.new
|
4
|
+
|
5
|
+
canvas.fill_opacity(0)
|
6
|
+
canvas.stroke('green')
|
7
|
+
canvas.stroke_width(1)
|
8
|
+
canvas.stroke("red")
|
9
|
+
|
10
|
+
canvas.rectangle(x, y, x+width, y+height)
|
11
|
+
|
12
|
+
text = "This is\n only\n a test."
|
13
|
+
|
14
|
+
canvas.annotate(@image, width, height, x, y, str) do
|
15
|
+
self.font_family = font
|
16
|
+
self.fill = fill
|
17
|
+
self.stroke = stroke
|
18
|
+
self.pointsize = size
|
19
|
+
self.font_weight = weight
|
20
|
+
self.gravity = gravity
|
21
|
+
end
|
22
|
+
|
23
|
+
canvas.draw # ...
|
24
|
+
canvas.save("whatever.jpg") # ...
|
25
|
+
|
26
|
+
|
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.37
|
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-
|
11
|
+
date: 2018-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- test/data/table_with_heredocs/expected-error.txt
|
128
128
|
- test/data/table_with_heredocs/expected-output.txt
|
129
129
|
- test/data/table_with_heredocs/source.lt3
|
130
|
+
- test/lines.lt3
|
130
131
|
- test/myfile.jpg
|
131
132
|
- test/newtest
|
132
133
|
- test/sdtest
|
@@ -134,6 +135,7 @@ files:
|
|
134
135
|
- test/test.rb
|
135
136
|
- test/try.lt3
|
136
137
|
- test/try2.lt3
|
138
|
+
- test/try2.rb
|
137
139
|
homepage: https://github.com/Hal9000/livetext
|
138
140
|
licenses:
|
139
141
|
- Ruby's license
|