Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NueDeck #188

Merged
merged 3 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ endif::[]
:uri-dzslides: http://paulrouget.com/dzslides
:uri-flowtimejs: http://flowtime-js.marcolago.com
:uri-impressjs: http://impress.github.io/impress.js
:uri-nuedeck: https://github.com/twitwi/nuedeck
:uri-pageres: https://github.com/sindresorhus/pageres
:uri-remark: http://remarkjs.com
:uri-revealjs: http://lab.hakim.se/reveal-js
Expand All @@ -65,9 +66,10 @@ DeckTape currently supports the following presentation frameworks out of the box

[subs="normal"]
....
{bullet}{uri-bespokejs}[Bespoke.js] {bullet}{uri-dzslides}[DZSlides] {bullet}{uri-remark}[remark] {bullet}{uri-shower}[Shower]
{bullet}{uri-csss}[CSSS] {bullet}{uri-flowtimejs}[Flowtime.js] {bullet}{uri-revealjs}[reveal.js] {bullet}{uri-slidy}[Slidy]
{bullet}{uri-deckjs}[deck.js] {bullet}{uri-impressjs}[impress.js] {bullet}{uri-rise}[RISE] {bullet}{uri-webslides}[WebSlides]
{bullet}{uri-bespokejs}[Bespoke.js] {bullet}{uri-flowtimejs}[Flowtime.js] {bullet}{uri-revealjs}[reveal.js] {bullet}{uri-webslides}[WebSlides]
{bullet}{uri-csss}[CSSS] {bullet}{uri-impressjs}[impress.js] {bullet}{uri-rise}[RISE] .
{bullet}{uri-deckjs}[deck.js] {bullet}{uri-nuedeck}[NueDeck] {bullet}{uri-shower}[Shower] .
{bullet}{uri-dzslides}[DZSlides] {bullet}{uri-remark}[remark] {bullet}{uri-slidy}[Slidy] .
....

DeckTape also provides a <<generic,generic command>> that works by emulating the end-user interaction, allowing it to be used to convert presentations from virtually any kind of framework.
Expand Down Expand Up @@ -110,7 +112,7 @@ Usage: decktape [options] [command] <url> <filename>
decktape version

command one of: automatic, bespoke, csss, deck, dzslides, flowtime, generic, impress,
remark, reveal, shower, slidy, webslides
nuedeck, remark, reveal, shower, slidy, webslides
url URL of the slides deck
filename Filename of the output PDF file

Expand Down
33 changes: 33 additions & 0 deletions plugins/nuedeck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
exports.create = page => new NueDeck(page);

class NueDeck {

constructor(page) {
this.page = page;
}

getName() {
return 'NueDeck';
}

size() {
return this.page.evaluate(_ => ({ width: nuedeck.opts.core.designWidth,
height: nuedeck.opts.core.designHeight }));
}

isActive() {
return this.page.evaluate(_ => typeof nuedeck !== 'undefined');
}

slideCount() {
return this.page.evaluate(_ => nuedeck.slideCount);
}

nextSlide() {
return this.page.evaluate(_ => nuedeck.jumpToSlide(nuedeck.currentSlide + 1, -1));
}

currentSlideIndex() {
return this.page.evaluate(_ => nuedeck.currentSlide);
}
}