This commit is contained in:
2020-01-27 03:32:56 -08:00
parent 743ee4be1f
commit fbe2b8a7e8
10 changed files with 58 additions and 16 deletions

View File

@@ -4,7 +4,7 @@
**Yuba** generates web-browsable catalogues from locally attached HFS+ filesystems. Its client application gathers forensic-quality data about a volume, properly interpreting bundles, reading Spotlight data, Finder flags, labels, and other contextual information. It can generate hashes, thumbnails, and gather 3rd party metadata with exiftool and mediainfo. Yuba's SQLite catalogues are comprehensive, lightweight, optimized for massive (1 million+) trees, and reflect incremental changes to contents and metadata. A server-side PHP script is provided, which allows familiar, Finder-style browsing of a catalogue. **Yuba** generates web-browsable catalogues from locally attached HFS+ filesystems. Its client application gathers forensic-quality data about a volume, properly interpreting bundles, reading Spotlight data, Finder flags, labels, and other contextual information. It can generate hashes, thumbnails, and gather 3rd party metadata with exiftool and mediainfo. Yuba's SQLite catalogues are comprehensive, lightweight, optimized for massive (1 million+) trees, and reflect incremental changes to contents and metadata. A server-side PHP script is provided, which allows familiar, Finder-style browsing of a catalogue.
####[⇩ Download Yuba 0.8.0.2](https://www.profiteroles.org/git/p/Yuba/raw/master/Yuba.app.zip) ([Changelog](CHANGELOG.md)) ####[⇩ Download Yuba 0.8.1.0](https://www.profiteroles.org/git/p/Yuba/raw/master/Yuba.app.zip) ([Changelog](CHANGELOG.md))
## Features ## Features

Binary file not shown.

View File

@@ -12,15 +12,15 @@ $bin_mediainfo = __DIR__."/bin/mediainfo";
$bin_exiftool = __DIR__."/bin/exiftool"; $bin_exiftool = __DIR__."/bin/exiftool";
$bin_ffmpeg = __DIR__."/bin/ffmpeg"; $bin_ffmpeg = __DIR__."/bin/ffmpeg";
$bin_qlthumb = __DIR__."/bin/ql-thumbnail"; $bin_qlthumb = __DIR__."/bin/ql-thumbnail";
$bin_qlicon = __DIR__."/bin/ql-icon"; $bin_qlicon = __DIR__."/bin/ql-icon_old";
$bin_qltool = __DIR__."/bin/qltool"; $bin_qltool = __DIR__."/bin/qltool";
$bin_sox = __DIR__."/bin/sox"; $bin_sox = __DIR__."/bin/sox";
$bin_pngquant = __DIR__."/bin/pngquant"; $bin_pngquant = __DIR__."/bin/pngquant";
$bin_parallel = __DIR__."/bin/parallel"; $bin_parallel = __DIR__."/bin/parallel";
$bin_convert = __DIR__."/bin/convert"; $bin_convert = __DIR__."/bin/convert";
$bin_zqlicon = __DIR__."/bin/zql-icon"; $bin_zqlicon = __DIR__."/bin/ql-icon";
$bin_zicon = __DIR__."/bin/zicon"; $bin_zicon = __DIR__."/bin/iff";
// System tools // System tools
$bin_php = "php"; $bin_php = "php";
@@ -100,6 +100,9 @@ if ($mode == "thumb") {
$cmd['zql-icon'][] = $bin_zqlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-icon.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['zql-icon'][] = $tprefix."zql-icon.png";
$cmd['zql-iconj'][] = $bin_zqlicon." --input=".$shellpath." --type=public.jpeg --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-iconj.jpg";
$cmd['zql-iconj'][] = $tprefix."zql-iconj.jpg";
$cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."ql-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"; $cmd['ql-icon'][] = $tprefix."ql-icon.png";

Binary file not shown.

View File

@@ -127,6 +127,21 @@ if (!empty($generators)) {
} }
} }
// Parallel check
//////////////////////////////////////////
$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu"));
if ($p['parallel'] > $physicalcpu) {
alert("Parallel hardware mismatch");
echo "QUITAPP\n";
}
if ($p['parallel'] == 1) {
$wopt_parallelmsg = "max";
} else {
$wopt_parallelmsg = $p['parallel'];
}
// Banner // Banner
////////////////////////////////////////// //////////////////////////////////////////
@@ -138,6 +153,7 @@ echo msg($banner."\n".str_repeat("-", strlen($banner)));
// System Info // System Info
////////////////////////////////////////// //////////////////////////////////////////
echo msg("Using ".$wopt_parallelmsg." cores");
echo msg("Gathering system info..."); echo msg("Gathering system info...");
// Disks // Disks
@@ -606,10 +622,12 @@ $dbp->exec("CREATE TABLE IF NOT EXISTS contents (fid TEXT, created INTEGER, rela
if (file_exists($batchfile)) { if (file_exists($batchfile)) {
echo ProgressBar::start($passed_file,"Running batch (".stepString().")"); echo ProgressBar::start($passed_file,"Running batch (".stepString().")");
if ($p['parallel']) { if ($p['parallel'] === 0) {
passthru("bash ".$batchfile);
} elseif ($p['parallel'] === 1) {
passthru($bin_parallel." < ".$batchfile); passthru($bin_parallel." < ".$batchfile);
} else { } else {
passthru("bash ".$batchfile); passthru($bin_parallel." -j ".$p['parallel']." < ".$batchfile);
} }
echo ProgressBar::finish($wopt_clear); echo ProgressBar::finish($wopt_clear);

View File

@@ -6,7 +6,7 @@
// Functions // Functions
function makeWindowString($p, $strings) { function makeWindowString($p, $strings, $pstrings) {
$conf = " $conf = "
# Set window title # Set window title
@@ -42,16 +42,23 @@ function makeWindowString($p, $strings) {
hr0.path = ".__DIR__."/hr.png"." hr0.path = ".__DIR__."/hr.png"."
hr0.width = 380 hr0.width = 380
hr0.height = 2 hr0.height = 2
parallel.type = popup
parallel.width = 180
parallel.default = ".$pstrings[$p['parallel']]."
";
foreach ($pstrings as $pstring) {
$conf .= "parallel.option = ".$pstring."\n";
}
parallel.type = checkbox $conf .= "
parallel.label = Use parallel
parallel.default = ".$p['parallel']."
debug.type = checkbox debug.type = checkbox
debug.label = Verbose logging debug.label = Verbose logging
debug.default = ".$p['debug']." debug.default = ".$p['debug']."
debug.x = 200 debug.x = 200
debug.y = 439 debug.y = 443
hr1.type = image hr1.type = image
hr1.path = ".__DIR__."/hr.png"." hr1.path = ".__DIR__."/hr.png"."
@@ -216,10 +223,19 @@ $strings[] = array("Skip","Generate","Rebuild");
$strings[] = array("Most files","Some files"); $strings[] = array("Most files","Some files");
$strings[] = array("All files","Most files","Some files"); $strings[] = array("All files","Most files","Some files");
// Parallel strings
$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu"));
$pstrings = array("Sequential","Max (Not advised)");
foreach(range(2, $physicalcpu-1) as $index) {
$pstrings[] = $index." Cores";
}
// Launch Pashua and parse results // Launch Pashua and parse results
$path = __DIR__."/bin/Pashua.app/Contents/MacOS/Pashua"; $path = __DIR__."/bin/Pashua.app/Contents/MacOS/Pashua";
$raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings))." | ".escapeshellarg($path)." - "); $raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings, $pstrings))." | ".escapeshellarg($path)." - ");
$result = array(); $result = array();
foreach (explode("\n", $raw) as $line) { foreach (explode("\n", $raw) as $line) {
preg_match('/^(\w+)=(.*)$/', $line, $matches); preg_match('/^(\w+)=(.*)$/', $line, $matches);
@@ -244,6 +260,7 @@ $result['thumbs'] = array_search($result['thumbs'],$strings[2]);
$result['thumb_mode'] = array_search($result['thumb_mode'],$strings[3]); $result['thumb_mode'] = array_search($result['thumb_mode'],$strings[3]);
$result['icons'] = array_search($result['icons'],$strings[2]); $result['icons'] = array_search($result['icons'],$strings[2]);
$result['icon_mode'] = array_search($result['icon_mode'],$strings[4]); $result['icon_mode'] = array_search($result['icon_mode'],$strings[4]);
$result['parallel'] = array_search($result['parallel'],$pstrings);
// If the user didn't specify a destpath, set to default // If the user didn't specify a destpath, set to default

View File

@@ -1 +1 @@
0.8.0.2 0.8.1.0

View File

@@ -130,11 +130,13 @@ $p['t_b']['wv'] = array("sox");
$p['t_b']['snd'] = array("sox"); $p['t_b']['snd'] = array("sox");
$p['t_b']['voc'] = array("sox"); $p['t_b']['voc'] = array("sox");
$p['t_b']['mp3'] = array("sox","ql-thumbnail");
$p['t_b']['m4a'] = array("sox","ql-thumbnail"); $p['t_b']['m4a'] = array("sox","ql-thumbnail");
$p['t_b']['m4b'] = array("sox","ql-thumbnail"); $p['t_b']['m4b'] = array("sox","ql-thumbnail");
$p['t_b']['ogg'] = array("sox","ql-thumbnail"); $p['t_b']['ogg'] = array("sox","ql-thumbnail");
$p['t_b']['mp3'] = array();
$p['t_b']['DS_Store'] = array();
foreach ($p['bundles'] as $bundle) { $p['t_b'][$bundle] = array("qltool"); } foreach ($p['bundles'] as $bundle) { $p['t_b'][$bundle] = array("qltool"); }
$p['t_b']['*'] = "ql-thumbnail"; $p['t_b']['*'] = "ql-thumbnail";

View File

@@ -111,7 +111,7 @@ if ($p['thumbs'] && $ext && $ext != "DS_Store") {
if (!is_dir(dirname($tfile))) { @mkdir(dirname($tfile),0777,true); dfm("mkdir ".dirname($tfile)); } if (!is_dir(dirname($tfile))) { @mkdir(dirname($tfile),0777,true); dfm("mkdir ".dirname($tfile)); }
if ($ext == "DS_Store") { if (empty($p['t_b'][$ext])) {
// file extension is in the skip list // file extension is in the skip list
$estring .= " ->t_skip"; $estring .= " ->t_skip";
dfm("skipping ds_store"); dfm("skipping ds_store");
@@ -312,7 +312,7 @@ if ($p['icons'] && $ext != "DS_Store") {
if ($ext || file_exists($pathname."/Icon\r")) { if ($ext || file_exists($pathname."/Icon\r")) {
dfm("Ext or custom icon found, processing ".$pathname." with iff"); dfm("Ext or custom icon found, processing ".$pathname." with iff");
$tools = array("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)) { } elseif (( glob($globsafe."/".globstring($p['album_files']),GLOB_BRACE) || 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"); dfm("Album files and cover found, processing ".$pathname." with flacdiricon");
$cmd['flacdiricon'] = $bin_flacdiricon." ".$shellpath." ".$p['icon_size']." ".escapeshellarg(array_shift($test))." ".$tfile; $cmd['flacdiricon'] = $bin_flacdiricon." ".$shellpath." ".$p['icon_size']." ".escapeshellarg(array_shift($test))." ".$tfile;
$tools = array("flacdiricon"); $tools = array("flacdiricon");

View File

@@ -121,6 +121,8 @@ iframe { width: 425px; height: 550px; padding: 6px; border: 1px solid black; }
div.dblist { display: none; } div.dblist { display: none; }
.ui-slider-handle { outline: 0 none !important; }
</style> </style>
<script src="/lib/ref/ref.js"></script> <script src="/lib/ref/ref.js"></script>