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

@ -2,17 +2,17 @@
* MIT License
*
* Copyright (c) 2016 David Russell
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

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"
}
}