#!/bin/sh
-java -jar fwstk.jar $*
\ No newline at end of file
+/usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar /home/extranet/www/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar $*
\ No newline at end of file
// Si l'utilisateur n'est pas connecté, on affiche le formulaire\r
// de login\r
\r
- $bypass = array('stats', 'telecharger', 'telechargerr');\r
+ $bypass = array('stats', 'telecharger', 'telechargerr', 'orpiref');\r
\r
if ((!isset($args[0]) || !in_array($args[0], $bypass)) && (is_null($core->user) || !$core->user)) {\r
$args = array('login');\r
print_r($_FILES);\r
\r
\r
- foreach ($_FILES['files']['name'] as $k=>$ffname) {\r
+ foreach ($_FILES['files']['name'] as $k => $ffname) {\r
if ($_FILES['files']['error'][$k]) {\r
continue;\r
}\r
}
public static function valideDemandeDevis(&$x) {
- $d64 = base64_decode($_GET['devis_form']);
+ $d64 = base64_decode(str_replace(' ', '+', $_GET['devis_form']));
$d = json_decode($d64);
if (!$d) {
return false;
}
-
$d = cubeArray::array_flatten($d);
foreach ($d as $k => $v) {
$_POST[$k] = trim($v);
public static function collectionVersionCreate($args, &$x) {
global $core;
+
$id = $args[1];
$compiler = new wsHTML5AppCompiler($id);
foreach ($docs as $doc) {
$out = WS_DOCS . '/' . $doc . '/';
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $out . '/crop.pdf');
$fwstk->setArg('--extractTexts ' . $out . '%s%d.txt');
if ($book->parametres->ignoreSearchSeparators != '') {
$fwstk->setArg('--ignoreSeparators ' . $book->parametres->ignoreSearchSeparators);
}
- $fwstk->setArg('--threads 1');
+ $fwstk->setArg('--threads 4');
$fwstk->execute();
- fb($fwstk->commande);
- fb($fwstk->output);
+
+ $res = $fwstk->commande . "\n\n";
+ $res .= $fwstk->output;
}
$dir = WS_BOOKS . '/index/' . $book->book_id;
$i = WS_BOOKS . '/index/' . $book_id . '/*';
`rm -rf $i`;
+ ob_end_clean();
+ die('<pre>' . $res . '</pre>');
}
public static function _reencodeVideos($book_id, $format) {
foreach ($docs as $doc) {
$out = wsDocument::getDir($doc);
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $out . '/crop.pdf');
$fwstk->setArg('--extractTexts ' . $out . '%s%d.txt');
$in = $this->in;
}
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $in);
$fwstk->setArg('--infos');
}
public function cutDocument($mode) {
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $this->in);
$fwstk->setArg('--cut ' . $mode);
}
public function trimDocument() {
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $this->in);
$fwstk->setArg('--trim');
}
public function getLinksAndTexts() {
- $fwstk = new cubeCommandLine('fwstk');
+ $fwstk = new cubeCommandLine('fwstk.sh');
$fwstk->setPath(CONVERTER_PATH);
$fwstk->setArg('--input ' . $this->cropped);
$fwstk->setArg('--extractTexts ' . $this->out . '%s%d.txt');