This commit is contained in:
2019-09-29 05:01:46 -07:00
parent 649e4a20dd
commit 7170a31139
5 changed files with 19 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.4.1]
- Better delimiter support
## [0.4.0]
- Initial repo version

View File

@@ -30,6 +30,7 @@
## Notes
Running Rollup requires disabling Gatekeeper by running `sudo spctl --master-disable` in the Terminal.
The following characters are currently supported as delimiters: " ","_","-","+"
## Changelog

Binary file not shown.

View File

@@ -23,6 +23,7 @@ $p['etbin'] = __DIR__."/exiftool";
$p['pfiletypes'] = array("jpg","jpeg","dng","heic","png","gif");
$p['vfiletypes'] = array("mov","mp4","m4v");
$p['screenshot_dims'] = array(320,640,750,828,1125,1242);
$p['delimiters'] = array(" ","_","-","+");
// Enable this option to verify newnames against those made with a prior version of rollup
@@ -126,9 +127,19 @@ foreach ($files as $file) {
$newname = str_replace(array_keys($z),array_values($z),$p['vt']);
}
$figureoutabetterwaytodothis_a = array("____","___","__");
$figureoutabetterwaytodothis_b = array("_","_","_");
$newname = str_replace($figureoutabetterwaytodothis_a,$figureoutabetterwaytodothis_b,$newname);
// Prevent repeat delimiters from null keys
// The following is a fairly lame hack
foreach ($p['delimiters'] as $char) {
$d_a[] = $char;
$d_a[] = $char.$char;
$d_a[] = $char.$char.$char;
$d_b[] = $char;
$d_b[] = $char;
$d_b[] = $char;
}
$newname = str_replace($d_a,$d_b,$newname);
if (!@$newname) {
echo " -> ERROR\n";

View File

@@ -1 +1 @@
0.4.0
0.4.1