This commit is contained in:
2019-10-21 18:56:29 -07:00
parent 4c161b0526
commit 743ee4be1f
7 changed files with 33 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. Older chang
## [0.8.0.2]
- Tweaks to directory and bundle icons
- Switch from qltool to iff
- Output redirection fixes
- Thumbnail bindings
- "Add to existing" prefs option

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<?
// Yuba Preview Tester 0.1.5
// Yuba Preview Tester 0.1.6
//print_r($argv);
@@ -19,6 +19,9 @@ $bin_pngquant = __DIR__."/bin/pngquant";
$bin_parallel = __DIR__."/bin/parallel";
$bin_convert = __DIR__."/bin/convert";
$bin_zqlicon = __DIR__."/bin/zql-icon";
$bin_zicon = __DIR__."/bin/zicon";
// System tools
$bin_php = "php";
$bin_qlmanage = "qlmanage";
@@ -37,10 +40,10 @@ $p['icon_size'] = 512;
$p['thumb_size'] = 1024;
$shellpath = escapeshellarg($argv[2]);
$tprefix = "/tmp/".md5($shellpath.time())."/";
$wprefix = "/tmp/".md5($shellpath.time())."_work/";
mkdir($tprefix);
mkdir($wprefix);
$tprefix = "/tmp/tester/".md5($shellpath.time())."/";
$wprefix = "/tmp/tester/".md5($shellpath.time())."_work/";
mkdir($tprefix,0777,true);
mkdir($wprefix,0777,true);
if ($mode == "thumb") {
@@ -88,9 +91,15 @@ if ($mode == "thumb") {
$cmd['qltool'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% -strip -define png:compression-level=9 ".$tprefix."qltool.png";
$cmd['qltool'][] = $tprefix."qltool.png";
$cmd['zicon'][] = $bin_zicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zicon.png";
$cmd['zicon'][] = $tprefix."zicon.png";
$cmd['qltool_q'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% - | ".$bin_pngquant." - -o ".$tprefix."qltool_quant.png";
$cmd['qltool_q'][] = $tprefix."qltool_quant.png";
$cmd['zql-icon'][] = $bin_zqlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-icon.png";
$cmd['zql-icon'][] = $tprefix."zql-icon.png";
$cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."ql-icon.png";
$cmd['ql-icon'][] = $tprefix."ql-icon.png";

Binary file not shown.

View File

@@ -10,6 +10,7 @@ $bin_exiftool = escapeshellarg(__DIR__."/bin/exiftool");
$bin_ffmpeg = escapeshellarg(__DIR__."/bin/ffmpeg");
$bin_qlthumb = escapeshellarg(__DIR__."/bin/ql-thumbnail");
$bin_qlicon = escapeshellarg(__DIR__."/bin/ql-icon");
$bin_iff = escapeshellarg(__DIR__."/bin/iff");
$bin_qltool = escapeshellarg(__DIR__."/bin/qltool");
$bin_sox = escapeshellarg(__DIR__."/bin/sox");
$bin_pngquant = escapeshellarg(__DIR__."/bin/pngquant");
@@ -38,7 +39,9 @@ $p['bundles'] = array( "app",
"framework",
"plugin",
"kext",
"rtfd"
"rtfd",
"qlgenerator",
"workflow"
);
// Completely ignore these files
@@ -94,10 +97,14 @@ $p['t_b']['divx'] = array("ql-thumbnail","ffmpeg");
$p['t_b']['fla'] = array("ql-thumbnail","ffmpeg");
$p['t_b']['flv'] = array("ql-thumbnail","ffmpeg");
$p['t_b']['webm'] = array("ql-thumbnail","ffmpeg");
$p['t_b']['jpg'] = array("sips","ql-thumbnail","vips");
$p['t_b']['jpeg'] = array("sips","ql-thumbnail","vips");
$p['t_b']['png'] = array("sips","ql-thumbnail","vips");
// sips provides a minor speed improvement but also scales small images up
//$p['t_b']['jpg'] = array("sips","ql-thumbnail","vips");
//$p['t_b']['jpeg'] = array("sips","ql-thumbnail","vips");
//$p['t_b']['png'] = array("sips","ql-thumbnail","vips");
$p['t_b']['jpg'] = array("ql-thumbnail","sips","vips");
$p['t_b']['jpeg'] = array("ql-thumbnail","sips","vips");
$p['t_b']['png'] = array("ql-thumbnail","sips","vips");
$p['t_b']['tif'] = array("vips","sips","ql-thumbnail");
$p['t_b']['tiff'] = array("vips","sips","ql-thumbnail");

View File

@@ -272,6 +272,7 @@ if ($p['icons'] && $ext != "DS_Store") {
$cmd['flacicon'] = $bin_flacicon." ".$shellpath." ".$p['icon_size']." ".$tfile;
$cmd['ql-icon'] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." | ".$bin_pngquant." - -o ".$tfile;
$cmd['iff'] = $bin_iff." --input=".$shellpath." --width=".($p['icon_size']/2)." --height=".($p['icon_size']/2)." | ".$bin_pngquant." - -o ".$tfile;
$cmd['qltool'] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% - | ".$bin_pngquant." - -o ".$tfile;
if ($p['icon_mode'] == 2) {
@@ -309,8 +310,8 @@ if ($p['icons'] && $ext != "DS_Store") {
dfm($pathname." is a dir, proceeding with directory check");
$stmt->BindValue(":fid",$fid);
if ($ext || file_exists($pathname."/Icon\r")) {
dfm("Ext or custom icon found, processing ".$pathname." with qltool");
$tools = array("qltool");
dfm("Ext or custom icon found, processing ".$pathname." with iff");
$tools = array("iff");
} elseif (glob($globsafe."/".globstring($p['album_files']),GLOB_BRACE) && $test = glob($globsafe."/".globstring($p['cover_exts'],$p['cover_files']),GLOB_BRACE)) {
dfm("Album files and cover found, processing ".$pathname." with flacdiricon");
$cmd['flacdiricon'] = $bin_flacdiricon." ".$shellpath." ".$p['icon_size']." ".escapeshellarg(array_shift($test))." ".$tfile;
@@ -324,9 +325,9 @@ if ($p['icons'] && $ext != "DS_Store") {
} else {
$stmt->BindValue(":fid",$fid);
if (in_array($extl, $p['i_sox'])) {
$tools = array("flacicon","ql-icon","qltool");
$tools = array("flacicon","ql-icon","iff");
} else {
$tools = array("ql-icon","qltool");
$tools = array("ql-icon","iff");
}
}

View File

@@ -20,7 +20,7 @@ $dmg = $dest."/Polyfill.sparsebundle";
if (file_exists($dmg)) {
exec("trash ".$dmg."; umount -f /Volumes/Polyfill");
}
exec("hdiutil create -size 100g -fs HFS+ -type SPARSEBUNDLE -volname Polyfill -attach ".$dmg);
exec("hdiutil create -size 1tb -fs HFS+ -type SPARSEBUNDLE -volname Polyfill -attach ".$dmg);
$base = "/Volumes/Polyfill";
$sample_files = glob($sample."/*.*");