mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
e9d953eed6
|
@ -7,10 +7,11 @@ application/csv
|
||||||
cat '%s'
|
cat '%s'
|
||||||
|
|
||||||
application/pdf
|
application/pdf
|
||||||
pdftotext -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'
|
pdftotext -q -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'
|
||||||
|
|
||||||
If pdftotext takes too long on large document you may want to pass parameter
|
If pdftotext takes too long on large document you may want to pass parameter
|
||||||
-l to specify the last page to be converted
|
-l to specify the last page to be converted. -q is for suppressing error/warnings
|
||||||
|
send to stderr
|
||||||
|
|
||||||
mutool draw -F txt -q -N -o - %s
|
mutool draw -F txt -q -N -o - %s
|
||||||
|
|
||||||
|
@ -142,6 +143,10 @@ video/mp4
|
||||||
|
|
||||||
convert -resize %wx "%f[12]" "png:%o"
|
convert -resize %wx "%f[12]" "png:%o"
|
||||||
|
|
||||||
|
You may as well use ffmpeg right away
|
||||||
|
|
||||||
|
ffmpeg -i "%f" -ss 00:00:02 -frames:v 1 -loglevel quiet -vf scale=%w:-1 -f apng "%o"
|
||||||
|
|
||||||
audio/mpeg
|
audio/mpeg
|
||||||
|
|
||||||
sox "%f" -n spectrogram -x 600 -Y 550 -r -l -o - | convert -resize %wx png:- "png:%o"
|
sox "%f" -n spectrogram -x 600 -Y 550 -r -l -o - | convert -resize %wx png:- "png:%o"
|
||||||
|
|
|
@ -26,12 +26,7 @@ class SeedDMS_View_ConversionServices extends SeedDMS_Theme_Style {
|
||||||
* List all registered conversion services
|
* List all registered conversion services
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function list_conversion_services($conversionmgr) { /* {{{ */
|
function list_conversion_services($allservices) { /* {{{ */
|
||||||
if(!$conversionmgr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
$allservices = $conversionmgr->getServices();
|
|
||||||
|
|
||||||
echo "<table class=\"table table-condensed table-sm\">\n";
|
echo "<table class=\"table table-condensed table-sm\">\n";
|
||||||
echo "<thead>";
|
echo "<thead>";
|
||||||
echo "<tr><th>".getMLText('service_list_from')."</th><th>".getMLText('service_list_to')."</th><th>".getMLText('class_name')."</th><th>".getMLText('service_list_info')."</th></tr>\n";
|
echo "<tr><th>".getMLText('service_list_from')."</th><th>".getMLText('service_list_to')."</th><th>".getMLText('class_name')."</th><th>".getMLText('service_list_info')."</th></tr>\n";
|
||||||
|
@ -57,9 +52,42 @@ class SeedDMS_View_ConversionServices extends SeedDMS_Theme_Style {
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||||
$this->contentHeading(getMLText("list_conversion_services"));
|
|
||||||
|
|
||||||
self::list_conversion_services($conversionmgr);
|
if($conversionmgr) {
|
||||||
|
$allservices = $conversionmgr->getServices();
|
||||||
|
if($data = $dms->getStatisticalData('docspermimetype')) {
|
||||||
|
$this->contentHeading(getMLText("list_conversion_overview"));
|
||||||
|
echo "<table class=\"table table-condensed table-sm\">\n";
|
||||||
|
echo "<thead>";
|
||||||
|
echo "<tr><th>".getMLText('mimetype')."</th><th>".getMLText('preview')."</th><th>".getMLText('fullsearch')."</th><th>".getMLText('preview_pdf')."</th></tr>\n";
|
||||||
|
echo "</thead>";
|
||||||
|
echo "<tbody>";
|
||||||
|
foreach($data as $d) {
|
||||||
|
$key = $d['key'];
|
||||||
|
$t = explode('/', $key);
|
||||||
|
if(isset($allservices[$key]) || isset($allservices[$t[0].'/*'])) {
|
||||||
|
echo "<tr><td>".$key."</td>";
|
||||||
|
echo "<td>";
|
||||||
|
if($allservices[$key]['image/png'])
|
||||||
|
echo '<i class="fa fa-check"></i>';
|
||||||
|
echo "</td>";
|
||||||
|
echo "<td>";
|
||||||
|
if($allservices[$key]['text/plain'])
|
||||||
|
echo '<i class="fa fa-check"></i>';
|
||||||
|
echo "</td>";
|
||||||
|
echo "<td>";
|
||||||
|
if($allservices[$key]['application/pdf'])
|
||||||
|
echo '<i class="fa fa-check"></i>';
|
||||||
|
echo "</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</tbody></table>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->contentHeading(getMLText("list_conversion_services"));
|
||||||
|
self::list_conversion_services($allservices);
|
||||||
|
}
|
||||||
|
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user