Skip to content

Commit 8359350

Browse files
committed
release 3.0 casi terminada
1 parent fc386d9 commit 8359350

16 files changed

+395
-342
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,7 @@ REVEAL_JS_SHOW_TITLE_FOOTER='yes'
198198
REVEAL_JS_DEFAULT_TITLE_FOOTER='yes'
199199
REVEAL_JS_TITLE_FOOTER="'MarkdownSlides by @asanzdiego :-)'"
200200
REVEAL_JS_SHOW_MENU='yes'
201-
REVEAL_JS_URL='../lib/reveal.js/'
202-
REVEAL_JS_MENU_URL='../lib/reveal.js-menu/'
203-
REVEAL_JS_TITLE_FOOTER_URL='../lib/reveal.js-title-footer/'
201+
REVEAL_JS_ONLINE='yes'
204202
~~~
205203

206204
#### Build
@@ -279,6 +277,7 @@ REVEAL_JS_TITLE_FOOTER_URL='../lib/reveal.js-title-footer/'
279277
- Improve de configuration in build.properties file.
280278
- Update [Reveal.js](http://lab.hakim.se/reveal-js/#/) dependencies.
281279
- Export to PDF with [DeckTape](https://github.com/astefanutti/decktape).
280+
- New features.
282281

283282
## Español
284283

@@ -475,9 +474,7 @@ REVEAL_JS_SHOW_TITLE_FOOTER='yes'
475474
REVEAL_JS_DEFAULT_TITLE_FOOTER='yes'
476475
REVEAL_JS_TITLE_FOOTER="'MarkdownSlides by @asanzdiego :-)'"
477476
REVEAL_JS_SHOW_MENU='yes'
478-
REVEAL_JS_URL='../lib/reveal.js/'
479-
REVEAL_JS_MENU_URL='../lib/reveal.js-menu/'
480-
REVEAL_JS_TITLE_FOOTER_URL='../lib/reveal.js-title-footer/'
477+
REVEAL_JS_ONLINE='yes'
481478
~~~
482479

483480
#### Generación
@@ -555,4 +552,5 @@ REVEAL_JS_TITLE_FOOTER_URL='../lib/reveal.js-title-footer/'
555552
- Eliminada la exportación de archivos "deprecated".
556553
- Mejora de la configuración en el fichero build.properties.
557554
- Actualización de las dependencias de [Reveal.js](http://lab.hakim.se/reveal-js/#/).
558-
- Exportación a PDF con [DeckTape](https://github.com/astefanutti/decktape).
555+
- Exportación a PDF con [DeckTape](https://github.com/astefanutti/decktape).
556+
- Nuevas funcionalidades.

build.properties

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CLEAN_LIB_FOLDER='no'
22
COPY_IMG_FOLDER='no'
33
ZIP_EXPORT_FOLDER='no'
4-
NUMBER_SECTIONS='yes'
4+
NUMBER_SECTIONS='no'
55
NUMBER_OFFSET='no'
66
CURRENT_NUMBER_OFFSET=1
77
REMOVE_MD_TO_BOOK='yes'
@@ -13,13 +13,14 @@ REVEAL_JS_SHOW_TITLE_FOOTER='yes'
1313
REVEAL_JS_DEFAULT_TITLE_FOOTER='yes'
1414
REVEAL_JS_TITLE_FOOTER="'MarkdownSlides by @asanzdiego :-)'"
1515
REVEAL_JS_SHOW_MENU='yes'
16+
REVEAL_JS_ONLINE='yes'
1617

17-
REVEAL_JS_URL='../lib/reveal.js/'
18-
REVEAL_JS_MENU_URL='../lib/reveal.js-menu/'
19-
REVEAL_JS_TITLE_FOOTER_URL='../lib/reveal.js-title-footer/'
20-
#REVEAL_JS_URL='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js/'
21-
#REVEAL_JS_MENU_URL='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js-menu/'
22-
#REVEAL_JS_TITLE_FOOTER_URL='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js-title-footer/'
18+
REVEAL_JS_URL_OFFLINE='../lib/reveal.js/'
19+
REVEAL_JS_MENU_URL_OFFLINE='../lib/reveal.js-menu/'
20+
REVEAL_JS_TITLE_FOOTER_URL_OFFLINE='../lib/reveal.js-title-footer/'
21+
REVEAL_JS_URL_ONLINE='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js/'
22+
REVEAL_JS_MENU_URL_ONLINE='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js-menu/'
23+
REVEAL_JS_TITLE_FOOTER_URL_ONLINE='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js-title-footer/'
2324

2425
#16:9 -> 800x450 960x540 1024x576 1280x720 1360x765 1600x900 1920x1080
2526
#4:3 -> 800x600 960x720 1024x768 1280x960 1360x1020 1600x1200 1920x1440
@@ -42,6 +43,6 @@ DEFAULT_GENERATION_MODE='min'
4243
BUILD_REVEAL_SLIDES='min'
4344
BUILD_REVEAL_SLIDES_PDF='med'
4445

45-
BUILD_HTML_BOOK='min'
46+
BUILD_HTML_BOOK='max'
4647
BUILD_DOCX_BOOK='max'
4748
BUILD_EPUB_BOOK='max'

build.sh

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ function downloadLib() {
5252
fi
5353
}
5454

55+
function downloadLibs() {
56+
57+
downloadLib https://github.com/hakimel/reveal.js/archive/3.6.0.zip \
58+
reveal.js-3.6.0 reveal.js
59+
downloadLib https://github.com/denehyg/reveal.js-menu/archive/1.2.0.zip \
60+
reveal.js-menu-1.2.0 reveal.js-menu
61+
downloadLib https://github.com/e-gor/Reveal.js-Title-Footer/archive/master.zip \
62+
Reveal.js-Title-Footer-master reveal.js-title-footer
63+
}
64+
5565
function initLibFolder() {
5666

5767
LIB_FOLDER="$1/lib"
@@ -102,14 +112,22 @@ function initExportFolder() {
102112

103113
function normalizeImages() {
104114

105-
# close div after .png)
106-
sed -i 's/.png)$/.png){ width=80% text-align=center }\n/g' "../export/$1-to-$2.md"
107-
108-
# close div after .jpg)
109-
sed -i 's/.jpg)$/.jpg){ width=80% text-align=center }\n/g' "../export/$1-to-$2.md"
115+
if [ "$2" == "slides" ]; then
116+
# close div after .png)
117+
sed -i 's/.png)$/.png){ width=80% class=center }\n/g' "../export/$1-to-$2.md"
118+
# close div after .jpg)
119+
sed -i 's/.jpg)$/.jpg){ width=80% class=center }\n/g' "../export/$1-to-$2.md"
120+
# close div after .gif)
121+
sed -i 's/.gif)$/.gif){ width=80% class=center }\n/g' "../export/$1-to-$2.md"
122+
else
123+
# close div after .png)
124+
sed -i 's/.png)$/.png){ width=50% class=center }\n/g' "../export/$1-to-$2.md"
125+
# close div after .jpg)
126+
sed -i 's/.jpg)$/.jpg){ width=50% class=center }\n/g' "../export/$1-to-$2.md"
127+
# close div after .gif)
128+
sed -i 's/.gif)$/.gif){ width=50% class=center }\n/g' "../export/$1-to-$2.md"
129+
fi
110130

111-
# close div after .gif)
112-
sed -i 's/.gif)$/.gif){ width=80% text-align=center }\n/g' "../export/$1-to-$2.md"
113131
}
114132

115133
function convertMainListsIntoParagraphs() {
@@ -130,17 +148,17 @@ function convertMainListsIntoParagraphs() {
130148

131149
function normalizeMd() {
132150

133-
echo -e "Normalizing... ../export/$1-to-$2.md"
151+
# replace multiple empty lines with one empty line
152+
sed -i '/^$/N;/^\n$/D' "../export/$1-to-$2.md"
153+
}
134154

135-
# remove blank lines
136-
sed -i '/^$/d' "../export/$1-to-$2.md"
155+
function replaceNotes() {
137156

138-
# add new line before #
139-
sed -i ':a;N;$!ba;s/\n#/\n\n#/g' "../export/$1-to-$2.md"
140-
sed -i ':a;N;$!ba;s/\n #/\n\n #/g' "../export/$1-to-$2.md"
157+
# replace @start-notes with <aside class="notes">
158+
sed -i 's/^@start-notes/<aside class="notes">/g' "../export/$1-to-$2.md"
141159

142-
# replace multiple empty lines with one empty line
143-
sed -i '/^$/N;/^\n$/D' "../export/$1-to-$2.md"
160+
# replace @end-notes with </aside>
161+
sed -i 's/^@end-notes/<\/aside>/g' "../export/$1-to-$2.md"
144162
}
145163

146164
function cleanMdToSlides() {
@@ -154,15 +172,11 @@ function cleanMdToSlides() {
154172
sed -i 's/###*/##/g' "../export/$1-to-slides.md"
155173
sed -i 's/##\\#/###/g' "../export/$1-to-slides.md"
156174

157-
# normalizeMd $1 slides
158-
159175
normalizeImages "$1" slides
160176

161-
# replace @start-notes with <aside class="notes">
162-
sed -i 's/^@start-notes/<aside class="notes">/g' "../export/$1-to-slides.md"
177+
replaceNotes "$1" slides
163178

164-
# replace @end-notes with </aside>
165-
sed -i 's/^@end-notes/<\/aside>/g' "../export/$1-to-slides.md"
179+
normalizeMd "$1" slides
166180
}
167181

168182
function cleanMdToBook() {
@@ -177,32 +191,40 @@ function cleanMdToBook() {
177191
# remove (I) from lines
178192
sed -i 's/ (I)//g' "../export/$1-to-book.md"
179193

180-
# remove all lines with (I) (II)...
181-
sed -i 's/.*(I.*//g' "../export/$1-to-book.md"
182-
sed -i 's/.*(V.*//g' "../export/$1-to-book.md"
183-
sed -i 's/.*(X.*//g' "../export/$1-to-book.md"
194+
# remove all lines with (II) (III)...
195+
sed -i 's/^#.*(I.*$/@delete/g' "../export/$1-to-book.md"
196+
sed -i 's/^#.*(V.*$/@delete/g' "../export/$1-to-book.md"
197+
sed -i 's/^#.*(X.*$/@delete/g' "../export/$1-to-book.md"
184198

185-
# normalizeMd $1 book
199+
sed -i ':a;N;$!ba;s/\n@delete\n\n//g' "../export/$1-to-book.md"
186200

187-
# convertMainListsIntoParagraphs $1 book
201+
# convertMainListsIntoParagraphs "$1" book
188202

189203
normalizeImages "$1" book
190204

191-
# remove @start-notes
192-
sed -i 's/^@start-notes//g' "../export/$1-to-book.md"
205+
replaceNotes "$1" book
193206

194-
# remove @end-notes
195-
sed -i 's/^@end-notes//g' "../export/$1-to-book.md"
207+
# remove '> ' at the beginning of the line
208+
sed -i 's/^> //g' "../export/$1-to-book.md"
209+
210+
# remove '--' at the beginning of the line
211+
sed -i 's/^-*$//g' "../export/$1-to-book.md"
212+
213+
normalizeMd "$1" book
196214
}
197215

198216
function buildRevealSlides() {
199217

200-
downloadLib https://github.com/hakimel/reveal.js/archive/3.6.0.zip \
201-
reveal.js-3.6.0 reveal.js
202-
downloadLib https://github.com/denehyg/reveal.js-menu/archive/1.2.0.zip \
203-
reveal.js-menu-1.2.0 reveal.js-menu
204-
downloadLib https://github.com/e-gor/Reveal.js-Title-Footer/archive/master.zip \
205-
Reveal.js-Title-Footer-master reveal.js-title-footer
218+
if [ "$REVEAL_JS_ONLINE" == "yes" ]; then
219+
REVEAL_JS_URL=$REVEAL_JS_URL_ONLINE
220+
REVEAL_JS_MENU_URL=$REVEAL_JS_MENU_URL_ONLINE
221+
REVEAL_JS_TITLE_FOOTER_URL=$REVEAL_JS_TITLE_FOOTER_URL_ONLINE
222+
else
223+
downloadLibs
224+
REVEAL_JS_URL=$REVEAL_JS_URL_OFFLINE
225+
REVEAL_JS_MENU_URL=$REVEAL_JS_MENU_URL_OFFLINE
226+
REVEAL_JS_TITLE_FOOTER_URL=$REVEAL_JS_TITLE_FOOTER_URL_OFFLINE
227+
fi
206228

207229
echo -e "Exporting... ../export/$1-reveal-slides$2.html"
208230

doc/export/leeme-book.docx

5.15 KB
Binary file not shown.

doc/export/leeme-book.epub

4.88 KB
Binary file not shown.

0 commit comments

Comments
 (0)