cheap-impression-presenter 1.1.0 → 1.1.1
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.md +14 -9
- data/chimp.gemspec +1 -1
- data/lib/ChimpParser-Grammar.rb +1 -1
- data/lib/ChimpParser.rb +2 -0
- data/lib/output/pdf.rb +3 -2
- data/lib/output/screen.rb +1 -1
- data/lib/plugins/figlet.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d17cd3acd2e14f93234d32a413c6356104901a2a9d10a224c9fb191d2dc0f82a
|
|
4
|
+
data.tar.gz: 2d2ded7f61c5b0bb2e895097971fd93d321a8253f9d0718dfca0fbdad758a949
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 623c58715bc814d8385432867cbfd6aec6f5ef676a9049190a03aca71fa2e1a3f58a23c5cfe305ff2992921f4b5daf801aaecf4a88b82998d58e926d474f216a
|
|
7
|
+
data.tar.gz: '0139f72003c626a3b9e4eb17f9eafd93baafeccd193c32951d26e813ec0b1a8026cd8a34e2cf7e825ac76b2d790b3fbb4a2b639b345719191dc91e099e7759b8'
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ available in the usual linux distributions and homebrew):
|
|
|
26
26
|
It has a simple syntax:
|
|
27
27
|
|
|
28
28
|
#what: the title of presentation
|
|
29
|
-
#size: the number of lines to zoom to (default
|
|
29
|
+
#size: the number of lines to zoom to (default 26, see below)
|
|
30
30
|
#theme: the PDF colors, e.g. background=#fdf6e3 text=#657b83 (see below)
|
|
31
31
|
#template: content drawn before anything else on the slide (e.g. ```figlet,right LOGO)
|
|
32
32
|
#template:
|
|
@@ -56,6 +56,7 @@ Everything else is in plugins. The following plugins are existing for now:
|
|
|
56
56
|
* Figlet: display fancy ascii text: `` ```figlet FANCY_TEXT``.
|
|
57
57
|
* You can add right or center as a parameter to align the fancy text.
|
|
58
58
|
* If the fancy text is right aligned, normal text is added on the left of the fancy text instead of beneath.
|
|
59
|
+
* You can add bold as an additional parameter to display the fancy text in bold (in the PDF in the bold color).
|
|
59
60
|
* Line Numbers: display line numbers beforce any text (mostly used for code :-).
|
|
60
61
|
~~~text
|
|
61
62
|
```lnums
|
|
@@ -76,11 +77,12 @@ chimp mypresentation.txt
|
|
|
76
77
|
```
|
|
77
78
|
|
|
78
79
|
While presenting you can use the usual button for navigating. In addition, you
|
|
79
|
-
can use ``q`` to quit the presentation, and ``r`` to refresh the screen. I
|
|
80
|
-
the terminal until about
|
|
81
|
-
visible at the right end of the footer line. Zoom
|
|
82
|
-
the
|
|
83
|
-
|
|
80
|
+
can use ``q`` to quit the presentation, and ``r`` to refresh the screen. I
|
|
81
|
+
suggest zooming the terminal until about 26 lines are visible. To make this
|
|
82
|
+
easy a ``^`` character is visible at the right end of the footer line. Zoom
|
|
83
|
+
until the ``^`` character is no longer visible for the most audience friendly
|
|
84
|
+
results. The ``^`` is shown as long as more than 26 lines are visible, use
|
|
85
|
+
``#size:`` directly after ``#what:`` to change this number.
|
|
84
86
|
|
|
85
87
|
Check out the examples.
|
|
86
88
|
|
|
@@ -117,9 +119,9 @@ chimp -o pdf mypresentation.txt
|
|
|
117
119
|
|
|
118
120
|
This writes mypresentation.pdf to the directory you are currently in.
|
|
119
121
|
|
|
120
|
-
By default the slides are
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
By default the slides are 26 lines high, as if you zoomed the terminal. It
|
|
123
|
+
respects the size header. Pictures are embedded as vector graphics for SVGs or
|
|
124
|
+
as images for everything else.
|
|
123
125
|
|
|
124
126
|
The default colors are solarized light. Change them with a ``#theme:`` line in
|
|
125
127
|
the header, holding KEY=#RRGGBB pairs for background, text, bold, red, blue and
|
|
@@ -129,6 +131,9 @@ footer. Colors you leave out keep their default. Solarized dark for example:
|
|
|
129
131
|
|
|
130
132
|
examples/chimp.txt (light) and examples/markus.txt (dark) show both.
|
|
131
133
|
|
|
134
|
+
A ``#theme:`` line can also be put on any slide (on a line of its own). It
|
|
135
|
+
overrides the given colors from there on, for this and all following slides.
|
|
136
|
+
|
|
132
137
|
LICENSE
|
|
133
138
|
=======
|
|
134
139
|
|
data/chimp.gemspec
CHANGED
data/lib/ChimpParser-Grammar.rb
CHANGED
|
@@ -31,7 +31,7 @@ module Chimp
|
|
|
31
31
|
|
|
32
32
|
ROOT = [ P_WHAT, P_SIZE, P_THEME, P_TEMPLATES, P_TEMPLATE, P_SLIDES ]
|
|
33
33
|
GP_SLIDES = [ P_INCREMENTAL ]
|
|
34
|
-
GP_INCREMENTAL = [ P_CENTER, P_RANGE, P_INCLUDE, P_STRONGRED, P_STRONGBLUE, P_STRONG, P_RED, P_BLUE ]
|
|
34
|
+
GP_INCREMENTAL = [ P_THEME, P_CENTER, P_RANGE, P_INCLUDE, P_STRONGRED, P_STRONGBLUE, P_STRONG, P_RED, P_BLUE ]
|
|
35
35
|
GP_TEMPLATE = GP_INCREMENTAL
|
|
36
36
|
GP_CENTER = [ P_STRONGRED, P_STRONGBLUE, P_STRONG, P_RED, P_BLUE ]
|
|
37
37
|
|
data/lib/ChimpParser.rb
CHANGED
data/lib/output/pdf.rb
CHANGED
|
@@ -109,7 +109,7 @@ module Chimp
|
|
|
109
109
|
def initialize(fname) #{{{
|
|
110
110
|
@scounter = @ccounter = 0
|
|
111
111
|
@what = ''
|
|
112
|
-
@size =
|
|
112
|
+
@size = SIZE
|
|
113
113
|
@last = 0
|
|
114
114
|
@skip = -1
|
|
115
115
|
@templates = []
|
|
@@ -139,7 +139,8 @@ module Chimp
|
|
|
139
139
|
nil
|
|
140
140
|
end #}}}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
#### a #theme: in a slide overrides colors from this point on
|
|
143
|
+
def mOP_THEME(data) #{{{
|
|
143
144
|
data.split.each do |pair|
|
|
144
145
|
key, color = pair.split('=',2)
|
|
145
146
|
unless THEME.key?(key.to_sym) && color =~ /\A#?(\h{6})\z/
|
data/lib/output/screen.rb
CHANGED
data/lib/plugins/figlet.rb
CHANGED
|
@@ -2,6 +2,7 @@ module Chimp
|
|
|
2
2
|
module Plugin
|
|
3
3
|
class FIGLET < Base
|
|
4
4
|
def process(what,parameters,screen,additional)
|
|
5
|
+
screen.print "\e[1m" if parameters.include? 'bold'
|
|
5
6
|
if parameters.include? 'right'
|
|
6
7
|
pos = screen.get_pos
|
|
7
8
|
len = screen.columns
|
|
@@ -17,6 +18,7 @@ module Chimp
|
|
|
17
18
|
else
|
|
18
19
|
screen.print `figlet #{what}`
|
|
19
20
|
end
|
|
21
|
+
screen.print "\e[0m" if parameters.include? 'bold'
|
|
20
22
|
end
|
|
21
23
|
end
|
|
22
24
|
end
|