0.7.12.2
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
**Yuba** generates a web-browsable SQLite database from an HFS+ filesystem. Its client application gathers forensic-quality data about a locally attached disk, 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 filesystem 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 a web-browsable SQLite database from an HFS+ filesystem. Its client application gathers forensic-quality data about a locally attached disk, 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 filesystem 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.7.12.1](http://www.profiteroles.org/downloads/Yuba_0.7.12.1.zip)**
|
* **⇩ [Download Yuba 0.7.12.2](http://www.profiteroles.org/downloads/Yuba_0.7.12.2.zip)**
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
4
Yuba.php
4
Yuba.php
@@ -83,6 +83,8 @@ $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_qltool = __DIR__."/bin/qltool";
|
$bin_qltool = __DIR__."/bin/qltool";
|
||||||
|
$bin_magick = __DIR__."/bin/magick";
|
||||||
|
$bin_pngcrush = __DIR__."/bin/pngcrush";
|
||||||
$bin_vips = "vipsthumbnail";
|
$bin_vips = "vipsthumbnail";
|
||||||
|
|
||||||
// Logfile
|
// Logfile
|
||||||
@@ -593,7 +595,7 @@ if ($p['thumbs']) {
|
|||||||
$cmd['sips'] = "sips -s format jpeg -s formatOptions 80 --resampleHeightWidthMax ".$p['thumb_size']." ".$shellpath." --out ".$tfile;
|
$cmd['sips'] = "sips -s format jpeg -s formatOptions 80 --resampleHeightWidthMax ".$p['thumb_size']." ".$shellpath." --out ".$tfile;
|
||||||
$cmd['ffmpeg'] = $bin_ffmpeg." -ss $(( $(".$bin_mediainfo." --Inform='Video;%Duration%' ".$shellpath." | cut -d'.' -f1) / 10000 )) -i ".$shellpath." -vframes 1 -filter:v scale='400:-1' -q:v 3 ".$tfile;
|
$cmd['ffmpeg'] = $bin_ffmpeg." -ss $(( $(".$bin_mediainfo." --Inform='Video;%Duration%' ".$shellpath." | cut -d'.' -f1) / 10000 )) -i ".$shellpath." -vframes 1 -filter:v scale='400:-1' -q:v 3 ".$tfile;
|
||||||
$cmd['ql-thumbnail'] = $bin_qlthumb." ".$shellpath." ".$tfile." public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
$cmd['ql-thumbnail'] = $bin_qlthumb." ".$shellpath." ".$tfile." public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
||||||
$cmd['qltool'] = $bin_qltool." di ".$shellpath." ".($p['thumb_size']/2)." ".($p['thumb_size']/2)." | base64 --decode > ".$tpfile;
|
$cmd['qltool'] = $bin_qltool." di ".$shellpath." ".$p['thumb_size']." ".$p['thumb_size']." | base64 --decode | ".$bin_magick." convert - -resize 50% -strip -trim +repage -define png:compression-level=9 ".$tpfile;
|
||||||
$cmd['qlmanage'] = "qlmanage -ti -f ".floor($p['thumb_size']/128)." -o /tmp/ ".$shellpath."; mv ".$tmp_path." ".$tpfile;
|
$cmd['qlmanage'] = "qlmanage -ti -f ".floor($p['thumb_size']/128)." -o /tmp/ ".$shellpath."; mv ".$tmp_path." ".$tpfile;
|
||||||
$cmd['vips'] = $bin_vips." ".$shellpath." -o ".$tfile."[Q=90,optimize_coding] --size=".$p['thumb_size'];
|
$cmd['vips'] = $bin_vips." ".$shellpath." -o ".$tfile."[Q=90,optimize_coding] --size=".$p['thumb_size'];
|
||||||
|
|
||||||
|
|||||||
BIN
bin/liblibpng.dylib
Executable file
BIN
bin/liblibpng.dylib
Executable file
Binary file not shown.
BIN
bin/magick
Executable file
BIN
bin/magick
Executable file
Binary file not shown.
BIN
bin/pngcrush
Executable file
BIN
bin/pngcrush
Executable file
Binary file not shown.
@@ -1 +1 @@
|
|||||||
0.7.12.1
|
0.7.12.2
|
||||||
67
web/rtc.php
67
web/rtc.php
@@ -4,7 +4,7 @@
|
|||||||
// Yuba RTC Browser
|
// Yuba RTC Browser
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
$browser_version = "0.7.10.5";
|
$browser_version = "0.7.12";
|
||||||
|
|
||||||
require "togggle.php";
|
require "togggle.php";
|
||||||
require "lib/ref/ref.php";
|
require "lib/ref/ref.php";
|
||||||
@@ -286,11 +286,22 @@ function breadcrumbs($zpath, $pathname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shortlabel($filename, $max = 40) {
|
function shortlabel($filename, $max = 40) {
|
||||||
|
if (strlen($filename) > $max) {
|
||||||
|
$prefix = substr($filename, 0, floor($max*.66));
|
||||||
|
$suffix = substr($filename, -floor($max*.33));
|
||||||
|
$return = $prefix."...".$suffix;
|
||||||
|
} else {
|
||||||
|
$return = $filename;
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function mb_shortlabel($filename, $max = 40) {
|
||||||
if (mb_strlen($filename, mb_detect_encoding($filename)) > $max) {
|
if (mb_strlen($filename, mb_detect_encoding($filename)) > $max) {
|
||||||
// more work is needed to figure out what is going on with non EN chars
|
// more work is needed to figure out what is going on with non EN chars
|
||||||
//echo "(-) ";
|
//echo "(-) ";
|
||||||
$prefix = mb_substr($filename, 0, floor($max*.66), mb_detect_encoding($filename));
|
$prefix = mb_substr($filename, 0, floor($max*.66), mb_detect_encoding($filename));
|
||||||
$suffix = substr($filename, -floor($max*.33));
|
$suffix = mb_substr($filename, -floor($max*.33));
|
||||||
$return = $prefix."...".$suffix;
|
$return = $prefix."...".$suffix;
|
||||||
} else {
|
} else {
|
||||||
$return = $filename;
|
$return = $filename;
|
||||||
@@ -338,21 +349,20 @@ if ($db_file) {
|
|||||||
$pid = $dbo->query("SELECT pid FROM family WHERE (rowid=2)")->fetch()['pid'];
|
$pid = $dbo->query("SELECT pid FROM family WHERE (rowid=2)")->fetch()['pid'];
|
||||||
// handle special strings
|
// handle special strings
|
||||||
$view['opts'] = unserialize($view['opts']);
|
$view['opts'] = unserialize($view['opts']);
|
||||||
$view['qlmanage'] = "hidden"; //array($view['qlmanage']);
|
$view['qlmanage'] = array($view['qlmanage']);
|
||||||
$view['profile'] = "hidden"; //array($view['profile']);
|
$view['profile'] = array($view['profile']);
|
||||||
if ($view['details']) {
|
if ($view['details']) {
|
||||||
$view['details'] = unserialize($view['details']);
|
$view['details'] = unserialize($view['details']);
|
||||||
}
|
}
|
||||||
if (substr($view['disks'],0,5) == "<?xml") {
|
if (substr($view['disks'],0,5) == "<?xml") {
|
||||||
//$view['disks'] = $parser->parseString(utf8_for_xml($view['disks']));
|
$view['disks'] = $parser->parseString(utf8_for_xml($view['disks']));
|
||||||
$view['disks'] = "hidden";
|
|
||||||
} else {
|
} else {
|
||||||
$view['disks'] = "hidden";
|
$view['disks'] = $view['disks'];
|
||||||
}
|
}
|
||||||
if (substr($view['diskutil'],0,5) == "<?xml") {
|
if (substr($view['diskutil'],0,5) == "<?xml") {
|
||||||
$view['diskutil'] = $parser->parseString(utf8_for_xml($view['diskutil']));
|
$view['diskutil'] = $parser->parseString(utf8_for_xml($view['diskutil']));
|
||||||
} else {
|
} else {
|
||||||
$view['diskutil'] = "hidden";
|
$view['diskutil'] = $view['diskutil'];
|
||||||
}
|
}
|
||||||
if ($view['vdisks']) {
|
if ($view['vdisks']) {
|
||||||
$view['vdisks'] = $parser->parseString(utf8_for_xml($view['vdisks']));
|
$view['vdisks'] = $parser->parseString(utf8_for_xml($view['vdisks']));
|
||||||
@@ -466,7 +476,17 @@ if ($db_file) {
|
|||||||
$width = $row_a['thumb_width'];
|
$width = $row_a['thumb_width'];
|
||||||
$height = $row_a['thumb_height'];
|
$height = $row_a['thumb_height'];
|
||||||
$realfile = dirname($db_file).$row_a['thumb_filename'];
|
$realfile = dirname($db_file).$row_a['thumb_filename'];
|
||||||
$icon = "<img id='thumb' src='".$realfile."' width='".$width."' height='".$height."' class='lazyload'>";
|
if (array_key_exists("thumb_tool",$row_a)) {
|
||||||
|
if ($row_a['thumb_tool'] == "sips" || $row_a['thumb_tool'] == "ffmpeg" || $row_a['thumb_tool'] == "ql-thumbnail") {
|
||||||
|
// put a border around images that are not icons
|
||||||
|
$border = "id='thumb'";
|
||||||
|
} else {
|
||||||
|
$border = "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$border = "id='thumb'";
|
||||||
|
}
|
||||||
|
$icon = "<img ".$border." src='".$realfile."' width='".$width."' height='".$height."' class='lazyload'>";
|
||||||
} elseif ($row_a['Type'] == "dir") {
|
} elseif ($row_a['Type'] == "dir") {
|
||||||
$icon = "<img src='/icons/directory.png' width='512' height='512'>";
|
$icon = "<img src='/icons/directory.png' width='512' height='512'>";
|
||||||
} else {
|
} else {
|
||||||
@@ -562,8 +582,13 @@ if ($db_file) {
|
|||||||
ref::config('expLvl', 2);
|
ref::config('expLvl', 2);
|
||||||
|
|
||||||
if ($row_d) {
|
if ($row_d) {
|
||||||
r(json_decode(json_encode(simplexml_load_string(utf8_encode($row_d['info']))))->File->track);
|
|
||||||
}
|
if (substr($row_d['info'],0,5) == "<?xml") {
|
||||||
|
r(json_decode(json_encode(simplexml_load_string(utf8_encode($row_d['info']))))->File->track);
|
||||||
|
} else {
|
||||||
|
r(json_decode(utf8_encode($row_d['info']), true)['media']['track']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
@@ -627,7 +652,17 @@ if ($db_file) {
|
|||||||
$height = $icon_size;
|
$height = $icon_size;
|
||||||
}
|
}
|
||||||
$realfile = dirname($db_file).$item['thumb_filename'];
|
$realfile = dirname($db_file).$item['thumb_filename'];
|
||||||
$icon = "<img id='thumb' class='lazyload' data-src='".$realfile."' width='".$width."' height='".$height."' data-width='".$width."' data-height='".$height."'>";
|
if (array_key_exists("thumb_tool",$item)) {
|
||||||
|
if ($item['thumb_tool'] == "sips" || $item['thumb_tool'] == "ffmpeg" || $item['thumb_tool'] == "ql-thumbnail") {
|
||||||
|
// put a border around images that are not icons
|
||||||
|
$border = "id='thumb'";
|
||||||
|
} else {
|
||||||
|
$border = "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$border = "id='thumb'";
|
||||||
|
}
|
||||||
|
$icon = "<img ".$border." class='lazyload' data-src='".$realfile."' width='".$width."' height='".$height."' data-width='".$width."' data-height='".$height."'>";
|
||||||
} elseif ($item['Type'] == "dir") {
|
} elseif ($item['Type'] == "dir") {
|
||||||
$icon = "<img src='/icons/directory.png' width='".$icon_size."' height='".$icon_size."' data-width='".$icon_size."' data-height='".$icon_size."'>";
|
$icon = "<img src='/icons/directory.png' width='".$icon_size."' height='".$icon_size."' data-width='".$icon_size."' data-height='".$icon_size."'>";
|
||||||
} else {
|
} else {
|
||||||
@@ -646,7 +681,7 @@ if ($db_file) {
|
|||||||
echo " ";
|
echo " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo htmlentities(shortlabel($item['Filename']));
|
echo htmlentities(mb_shortlabel($item['Filename']));
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
@@ -720,8 +755,7 @@ if ($db_file) {
|
|||||||
|
|
||||||
foreach ($sorted_bundles as $key => $bundle) {
|
foreach ($sorted_bundles as $key => $bundle) {
|
||||||
echo "<div id='bundle'>";
|
echo "<div id='bundle'>";
|
||||||
$dbs = array_reverse(glob($bundle."/*.sqlite3"));
|
$dbs = array_reverse(glob($bundle."/????-??-??_??-??-??.sqlite3"));
|
||||||
array_shift($dbs);
|
|
||||||
if ($dbs[0]) {
|
if ($dbs[0]) {
|
||||||
$dbo = new PDO("sqlite:".$dbs[0]);
|
$dbo = new PDO("sqlite:".$dbs[0]);
|
||||||
$type = $dbo->query("SELECT type FROM _skim")->fetch()['type'];
|
$type = $dbo->query("SELECT type FROM _skim")->fetch()['type'];
|
||||||
@@ -736,7 +770,8 @@ if ($db_file) {
|
|||||||
$info = $dbo->query("SELECT * FROM _skim")->fetch();
|
$info = $dbo->query("SELECT * FROM _skim")->fetch();
|
||||||
if (strpos($info['status'],"completed") === 0) {
|
if (strpos($info['status'],"completed") === 0) {
|
||||||
$seconds = str_replace("completed_in_","",$info['status']);
|
$seconds = str_replace("completed_in_","",$info['status']);
|
||||||
$status = gmdate("H:i:s",$seconds);
|
$s = (int)$seconds;
|
||||||
|
$status = sprintf("%02d:%02d:%02d:%02d", $s/86400, $s/3600%24, $s/60%60, $s%60);
|
||||||
echo "<div>";
|
echo "<div>";
|
||||||
} else {
|
} else {
|
||||||
echo "<div class='aborted'>";
|
echo "<div class='aborted'>";
|
||||||
|
|||||||
Reference in New Issue
Block a user