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 # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.4.1]
- Better delimiter support
## [0.4.0] ## [0.4.0]
- Initial repo version - Initial repo version

View File

@@ -30,6 +30,7 @@
## Notes ## Notes
Running Rollup requires disabling Gatekeeper by running `sudo spctl --master-disable` in the Terminal. Running Rollup requires disabling Gatekeeper by running `sudo spctl --master-disable` in the Terminal.
The following characters are currently supported as delimiters: " ","_","-","+"
## Changelog ## 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['pfiletypes'] = array("jpg","jpeg","dng","heic","png","gif");
$p['vfiletypes'] = array("mov","mp4","m4v"); $p['vfiletypes'] = array("mov","mp4","m4v");
$p['screenshot_dims'] = array(320,640,750,828,1125,1242); $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 // 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']); $newname = str_replace(array_keys($z),array_values($z),$p['vt']);
} }
$figureoutabetterwaytodothis_a = array("____","___","__"); // Prevent repeat delimiters from null keys
$figureoutabetterwaytodothis_b = array("_","_","_"); // The following is a fairly lame hack
$newname = str_replace($figureoutabetterwaytodothis_a,$figureoutabetterwaytodothis_b,$newname);
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) { if (!@$newname) {
echo " -> ERROR\n"; echo " -> ERROR\n";

View File

@@ -1 +1 @@
0.4.0 0.4.1