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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8154b5025a9eb30f03a8b34d198e3e9024a0540ae450fb1ed4af0194982fbebf
4
- data.tar.gz: e732455c9d6666b9d1bc672aa620f2a029cdc3d34d425478185ddfe2160222aa
3
+ metadata.gz: d17cd3acd2e14f93234d32a413c6356104901a2a9d10a224c9fb191d2dc0f82a
4
+ data.tar.gz: 2d2ded7f61c5b0bb2e895097971fd93d321a8253f9d0718dfca0fbdad758a949
5
5
  SHA512:
6
- metadata.gz: d25d85a0c3c3f63f0e46af0c2234868882a1f568efd6a835595f7c682b3e279deb85ec6c2261586e9bad967daac4409ada813d1a7c6db8ff67fd323f3af376cb
7
- data.tar.gz: cc337df9d9f494027e1e0179890c606bd4d0133ec60e0e7b5de948e0a77072c56503c690421782345fd2060ecb809a14ff6c274c3219e689de9db1855469b6aa
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 31, see below)
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 suggest zooming
80
- the terminal until about 30 lines are visible. To make this easy a ``^`` character is
81
- visible at the right end of the footer line. Zoom until the ``^`` character is no longer visible for
82
- the most audience friendly results. The ``^`` is shown as long as more than 31 lines are visible,
83
- use ``#size:`` directly after ``#what:`` to change this number.
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 (default) 31 lines high, as if you zoomed the
121
- terminal. It respects the size header. Pictures are embedded as vector
122
- graphics for SVGs or as images for everything else.
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cheap-impression-presenter"
3
- s.version = "1.1.0"
3
+ s.version = "1.1.1"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "GPL-3.0-or-later"
6
6
  s.summary = "CHIMP - Make a cheap impression. Present via terminal."
@@ -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
@@ -30,6 +30,8 @@ module Chimp
30
30
  class TagContentSkipEvent < Exception; end
31
31
 
32
32
  class Output
33
+ SIZE = 26 # default number of lines of a slide (including the footer), #size: overrides
34
+
33
35
  def finish_prepare
34
36
  end
35
37
  def finish_output
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 = 31
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
- def mPP_THEME(data) #{{{
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
@@ -86,7 +86,7 @@ module Chimp
86
86
  def initialize(fname) #{{{
87
87
  @scounter = @ccounter = 0
88
88
  @what = ''
89
- @size = 31
89
+ @size = SIZE
90
90
  @last = 0
91
91
  @skip = -1
92
92
  @templates = []
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheap-impression-presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler