234 lines
4.5 KiB
PHP
Executable File
234 lines
4.5 KiB
PHP
Executable File
<?php
|
|
|
|
// Filetypes
|
|
//////////////////////////////////////////
|
|
|
|
// Bundled tools
|
|
$bin_gfi = __DIR__."/bin/GetFileInfo";
|
|
$bin_mediainfo = __DIR__."/bin/mediainfo";
|
|
$bin_exiftool = __DIR__."/bin/exiftool";
|
|
$bin_ffmpeg = __DIR__."/bin/ffmpeg";
|
|
$bin_qlthumb = __DIR__."/bin/ql-thumbnail";
|
|
$bin_qltool = __DIR__."/bin/qltool";
|
|
$bin_sox = __DIR__."/bin/sox";
|
|
$bin_pngcrush = __DIR__."/bin/pngcrush";
|
|
$bin_parallel = __DIR__."/bin/parallel";
|
|
|
|
// External tools
|
|
$bin_php = "php";
|
|
$bin_convert = "convert";
|
|
$bin_vips = "vipsthumbnail";
|
|
|
|
// Treat these directories as files
|
|
$p['bundles'] = array( "app",
|
|
"bundle",
|
|
"sparsebundle",
|
|
"photoslibrary",
|
|
"aplibrary",
|
|
"apvault",
|
|
"abbu",
|
|
"calendar",
|
|
"framework",
|
|
"plugin",
|
|
"kext",
|
|
"rtfd"
|
|
);
|
|
|
|
// Completely ignore these files
|
|
$p['ignore'] = array( ".Trashes",
|
|
".DocumentRevisions-V100",
|
|
".Spotlight-V100",
|
|
".TemporaryItems",
|
|
".apdisk",
|
|
".com.apple.timemachine.donotpresent",
|
|
".fseventsd",
|
|
".metadata-never-index",
|
|
".neofinder.abemeda.volinfo.xml"
|
|
);
|
|
|
|
// Use these files as a directory preview
|
|
$p['p_files'] = array( "folder.jpg",
|
|
"cover.jpg",
|
|
"preview.jpg",
|
|
"cover.png",
|
|
"folder.png",
|
|
"preview.png");
|
|
|
|
// Gather contents for these files
|
|
$p['c_files'] = array( "DS_Store",
|
|
"txt",
|
|
"md",
|
|
"nfo",
|
|
"log",
|
|
"cue",
|
|
"csv",
|
|
"webloc",
|
|
"svg",
|
|
"rtf",
|
|
"rtfd",
|
|
"doc",
|
|
"docx" );
|
|
|
|
// Use ffmpeg to generate thumbnails for these files
|
|
$p['t_files']['ffmpeg'] = array( "mkv",
|
|
"avi",
|
|
"mpeg",
|
|
"mpg",
|
|
"vob",
|
|
"mp4",
|
|
"m4v",
|
|
"m2v",
|
|
"m2ts",
|
|
"asf",
|
|
"wmv",
|
|
"rm",
|
|
"divx",
|
|
"fla",
|
|
"flv",
|
|
"webm" );
|
|
|
|
// Use sips to generate thumbnails for these files
|
|
$p['t_files']['sips'] = array( "jpg",
|
|
"jpeg",
|
|
"tif",
|
|
"tiff",
|
|
"gif",
|
|
"psd",
|
|
"png",
|
|
"heic" );
|
|
|
|
// Use sox to generate thumbnails for these files
|
|
$p['t_files']['sox'] = array( "flac",
|
|
"wav",
|
|
"aif",
|
|
"aiff" );
|
|
|
|
// Don't make thumbnails for these files
|
|
$p['t_skip'] = array("emlx");
|
|
|
|
// Don't make icons for these files
|
|
$p['i_skip'] = array( "jpg",
|
|
"jpeg",
|
|
"tif",
|
|
"tiff",
|
|
"gif",
|
|
"png",
|
|
"heic",
|
|
"flac",
|
|
"wav",
|
|
"aiff",
|
|
"aif",
|
|
"zip");
|
|
|
|
// Custom qlgenerator bindings
|
|
$p['i_bindings']['indd'] = array("com.adobe.indesign-document","Art View.qlgenerator");
|
|
|
|
// Run mediainfo on these files
|
|
$p['m_files'] = array( "mkv",
|
|
"ogg",
|
|
"avi",
|
|
"wav",
|
|
"mpeg",
|
|
"mpg",
|
|
"vob",
|
|
"mp4",
|
|
"m2v",
|
|
"mp3",
|
|
"asf",
|
|
"wma",
|
|
"wmv",
|
|
"qt",
|
|
"mov",
|
|
"rm",
|
|
"ifo",
|
|
"ac3",
|
|
"dts",
|
|
"aac",
|
|
"ape",
|
|
"flac",
|
|
"aiff",
|
|
"m2ts" );
|
|
|
|
// Run exiftool on these files
|
|
$p['e_files'] = array( "ai",
|
|
"aiff",
|
|
"ape",
|
|
"asf",
|
|
"avi",
|
|
"bmp",
|
|
"divx",
|
|
"dng",
|
|
"doc",
|
|
"docx",
|
|
"eps",
|
|
"epub",
|
|
"exe",
|
|
"exif",
|
|
"fla",
|
|
"flac",
|
|
"flv",
|
|
"gif",
|
|
"heic",
|
|
"icc",
|
|
"iso",
|
|
"jpg",
|
|
"jpeg",
|
|
"m2ts",
|
|
"m4a",
|
|
"m4b",
|
|
"m4v",
|
|
"mkv",
|
|
"mobi",
|
|
"azw",
|
|
"azw3",
|
|
"mov",
|
|
"qt",
|
|
"mp3",
|
|
"mp4",
|
|
"mpeg",
|
|
"mpg",
|
|
"m2v",
|
|
"nef",
|
|
"numbers",
|
|
"ogg",
|
|
"pages",
|
|
"pdf",
|
|
"pict",
|
|
"png",
|
|
"ppm",
|
|
"ppt",
|
|
"psd",
|
|
"psb",
|
|
"qif",
|
|
"raw",
|
|
"rtf",
|
|
"sr2",
|
|
"srf",
|
|
"svg",
|
|
"swf",
|
|
"tiff",
|
|
"tif",
|
|
"torrent",
|
|
"vcf",
|
|
"vob",
|
|
"wav",
|
|
"webm",
|
|
"wma",
|
|
"wmv",
|
|
"xls",
|
|
"xlsx",
|
|
"xmp",
|
|
"zip" );
|
|
|
|
// Ucase
|
|
foreach ($p['bundles'] as $bundle) { $p['nodescend'][] = "*.".$bundle; }
|
|
foreach ($p['c_files'] as $ext) { $p['c_files'][] = strtoupper($ext); }
|
|
foreach ($p['e_files'] as $ext) { $p['e_files'][] = strtoupper($ext); }
|
|
foreach ($p['m_files'] as $ext) { $p['m_files'][] = strtoupper($ext); }
|
|
foreach ($p['t_files']['ffmpeg'] as $ext) { $p['t_files']['ffmpeg'][] = strtoupper($ext); }
|
|
foreach ($p['t_files']['sips'] as $ext) { $p['t_files']['sips'][] = strtoupper($ext); }
|
|
foreach ($p['t_skip'] as $ext) { $p['t_skip'][] = strtoupper($ext); }
|
|
foreach ($p['i_skip'] as $ext) { $p['i_skip'][] = strtoupper($ext); }
|
|
foreach ($p['p_files'] as $file) { $p['p_files'][] = strtoupper($file); }
|
|
|
|
?>
|