0.4.1
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
BIN
Rollup.app.zip
BIN
Rollup.app.zip
Binary file not shown.
17
Rollup.php
17
Rollup.php
@@ -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";
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.4.0
|
||||
0.4.1
|
||||
Reference in New Issue
Block a user