Updated decktape intergration.

This commit is contained in:
David Russell 2017-11-26 10:33:59 +07:00
parent 0e30652b72
commit be846c046d
4 changed files with 18 additions and 17 deletions

View File

@ -166,14 +166,9 @@ public class PrintService {
.absoluteURL(isEncrypted(),
hostname());
String[] cmd = {PDF_PHANTOM,
PDF_DECKTAPE,
PDF_COMMAND,
slideshowUrl,
filePath};
Path dtapePath = Paths.get(diskService.decktape());
int generated = shellService.exec(GIT_PDF, pp, dtapePath, cmd);
String deckTape = diskService.decktape();
String[] cmd = { deckTape, REVEAL, slideshowUrl, filePath};
int generated = shellService.exec(GIT_PDF, pp, branchPath, cmd);
if (generated != STATUS_OK) {
log.warn("generatePDF: pp={}, generate status={}", pp, generated);
@ -190,9 +185,7 @@ public class PrintService {
return runtime.config("gitpitch.hostname");
}
private static final String PDF_PHANTOM = "./bin/phantomjs";
private static final String PDF_DECKTAPE = "decktape.js";
private static final String PDF_COMMAND = "reveal";
private static final String REVEAL = "reveal";
private static final String PITCHME_PDF = "PITCHME.pdf";
private static final String PRINT_NO_FRAGS = "false";
private static final String GIT_PDF = "pdf";

View File

@ -367,14 +367,17 @@ gitpitch {
storage {
#
# Directory indicated for this property must exist on disk.
# When setting a custom path for this directory
# it is strongly recommended to use an absolute path.
# When setting a custom path for this directory you must
# specify an absolute path.
#
home = "/tmp/gitpitch/swap"
}
#
# Absolute path to decktape executable.
#
decktape {
home = "../decktape"
home = "/usr/local/bin/decktape"
}
offline {

5
deps/package.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"decktape": "^2.6.1"
}
}