This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
mkslides.html
163 lines (131 loc) · 5.35 KB
/
mkslides.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html>
<head>
<title>Caltech Library's Digital Library Development Sandbox</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu"><img src="/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="../">Up</a></li>
<li><a href="./mkrss.html">mkrss</a></li>
<li><a href="./mkpage.html">mkpage</a></li>
<li><a href="./urlencode.html">urlencode</a></li>
<li><a href="./go-template-recipes.html">Go text/template recipes</a></li>
<li><a href="./titleline.html">titleline</a></li>
<li><a href="./mkslides.html">mkslides</a></li>
<li><a href="./slides/three-slides.html">Title Page</a></li>
<li><a href="./slides/presentation.html">What is mkslides?</a></li>
<li><a href="./byline.html">byline</a></li>
<li><a href="./ws.html">ws</a></li>
<li><a href="./frontmatter.html">frontmatter</a></li>
<li><a href="./mkpongo.html">mkpongo</a></li>
<li><a href="./urldecode.html">urldecode</a></li>
<li><a href="./sitemapper.html">sitemapper</a></li>
<li><a href="./reldocpath.html">reldocpath</a></li>
</ul>
</nav>
<section>
<h1>mkslides</h1>
<h2>USAGE</h2>
<pre><code>mkslides [OPTIONS] [KEY/VALUE DATA PAIRS] MARKDOWN_FILE [TEMPLATE_FILENAMES]
</code></pre>
<h2>SYNOPSIS</h2>
<p><em>mkslides</em> converts a Markdown file into a sequence of HTML5 slides using the
key/value pairs to populate the templates and render to stdout.</p>
<h2>Features</h2>
<ul>
<li>Use Markdown to write your presentation in one file</li>
<li>Separate slides by “–” and a new line (e.g. \n versus \r\n)</li>
<li>Apply the default template or use your own</li>
<li>Control Layout and display with HTML5 and CSS</li>
</ul>
<p><em>mkslides</em> is based on <em>mkpage</em> with the difference that multiple pages
result from a single Markdown file. To manage the linkage between
slides some predefined template variables is used.</p>
<ul>
<li><em>title</em> which would hold the page title for presentation</li>
<li><em>csspath</em> which would hold the path to your CSS File.</li>
<li><em>content</em> holds the extracted for each slide</li>
<li><em>cur_no</em> which holds the current page number</li>
<li><em>first_no</em> which holds the first slide’s page number (e.g. 00)</li>
<li><em>last_no</em> which holds the last slides page number (e..g length of slide deck minus one)</li>
<li><em>prev_no</em> which holds the previous slide number if CurNo is create than 0</li>
<li><em>next_no</em> which holds the next slide number if CurNo is not the last slide</li>
<li><em>filename</em> is the filename for presentation</li>
<li><em>nav</em> is to replace the default presentation navigation</li>
<li><em>header</em> is to add a header to the presentation</li>
<li><em>footer</em> is to add a footer to the presentation</li>
</ul>
<p>In your custom templates these should be exist to link everything together
as expected. In addition you may want to include JavaScript to allow mapping
actions like “next slide” to the space bar or mourse click.</p>
<h2>CONFIGURATION</h2>
<ul>
<li>MKPAGE_TEMPLATES - specify where to find the template(s) to use for slides</li>
</ul>
<h2>OPTIONS</h2>
<pre><code> -c Specify the CSS file to use
-css Specify the CSS file to use
-h display help
-help display help
-j Specify the JavaScript file to use
-js Specify the JavaScript file to use
-l display license
-license display license
-m Markdown filename
-markdown Markdown filename
-p Presentation title
-presentation-title Presentation title
-s display the default template
-show-template display the default template
-t A colon delimited list of HTML templates to use
-templates A colon delimited list of HTML templates to use
-v display version
-version display version
</code></pre>
<h2>EXAMPLE</h2>
<p>In this example we’re using the default slide template.
Here’s an example of a three slide presentation</p>
<pre><code> Welcome to [mkslides](../)
by R. S. Doiel, <rsdoiel@caltech.edu>
--
# mkslides
_mkslides_ can generate multiple HTML5 pages from
one markdown file. It splits the markdown file
on each "--"
--
Thank you
Hope you enjoy [mkslides](https://github.com/caltechlbrary/mkslides)
</code></pre>
<p>If you saved this as presentation.md you can run the following
command to generate slides</p>
<pre><code class="language-shell"> mkslides "title=text:My Presentation" \
"csspath=text:css/slides.css" presentation.md
</code></pre>
<p>Using a custom template would look like</p>
<pre><code class="language-shell"> mkslides -t custom-slides.tmpl \
"title=text:My Presentation" \
"csspath=text:css/slides.css" presentation.md
</code></pre>
<p>This would result in the following webpages</p>
<ul>
<li>00-presentation.html</li>
<li>01-presentation.html</li>
<li>02-presentation.html</li>
</ul>
</section>
<footer>
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
<span>© 2020 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
<span><a href="mailto:library@caltech.edu">Email Us</a></span>
<a class="cl-hide" href="sitemap.xml">Site Map</a>
</footer>
</body>
</html>