kocmana / filerename Goto Github PK
View Code? Open in Web Editor NEWA small tool to rename filenames, especially images from mobile phones from one pattern to another
License: MIT License
A small tool to rename filenames, especially images from mobile phones from one pattern to another
License: MIT License
It would be useful to define several file rename tasks to allow to merge two/n file naming patterns to one common pattern in one singular execution.
Picocli allows to repeat composite argument groups (Documentation) that could be used to implement this feature.
Arguments:
-i "IMG_<<TS|yyyyMMdd_HHmmss>>.jpg" -o "<<TS|yyyyMMdd_HHmmss>>.jpg" -p ".\testfiles" -cp
File names matched:
.\testfiles\IMG_20210726_152901.jpg
.\testfiles\IMG_20210726_152902.jpg
.\testfiles\IMG_20210726_152902__01.jpg
.\testfiles\IMG_20210726_152909.jpg
.\testfiles\IMG_20210726_154326.jpg
.\testfiles\IMG_20210726_154330.jpg
.\testfiles\IMG_211946.jpg
.\testfiles\IMG_211948.jpg
.\testfiles\IMG_211951.jpg
.\testfiles\IMG_211954.jpg
Resulting Exception:
21:19:45:923 a.k.f.s.FileRenameTask [ForkJoinPool.commonPool-worker-1] ERROR - Could not finish task with arguments: CommandLineArguments[path=.\testfiles, recursive=false, inputTemplate=IMG_<<TS|yyyyMMdd_HHmmss>>.jpg, outputTemplate=<<TS|yyyyMMdd_HHmmss>>.jpg, dryRun=false, createCopy=true, collisionResolutionStrategy=FAIL]: Text '211946' could not be parsed at index 6
Currently the way examples are provided in the readme differ between the transformation rules.
A uniform approach should be used in a tabular form:
| inputPattern | outputPattern | input Filename | output Filename |
When providing multiple tasks, the command line parameters are becoming harder and harder to read. For such instances, providing job definitions via a xml/json file would be preferable.
In order to unify the current code base, Timestamp Transformation Rule should be refactored to extend AbstractTransformationRule
Currently, the project still uses the basic maven archetype. To build fat jars as required during package step this needs to be modified.
Currently the test asserts the order of the returned list of Transformation Rules. This is completely irrelevant to the functionality of the application and cause unexpected failing tests in the pipeline.
This test should assert class instances irrespective of the order in the list (one instance of X and one instance of Y are in the list)
Currently, file rename jobs will fail if the file can't be renamed due to an already existing file with the same name.
Users should be able to define a collision resolution strategy as command line argument for such cases.
Approach:
Add new command line argument -cr
--collisionResolution
with the arguments FAIL
or ENUMERATE
While renaming may be the common goal, copying the files using the new filename may also be a worthwhile option.
Approach:
Add a -s
--strategy
option with the options COPY
and RENAME
(default)
Currently, there is no guidance on the impact of the abstract transformation rule methods and their contracts. This should be ammended by adding reasonable javadoc documentation.
Currently no licensing information is available. Licence information should be seleceted and made available based on https://choosealicense.com/
Currently, there is no guidance on the impact of the transformation rule methods and their contracts. This should be ammended by adding reasonable javadoc documentation.
Enumeration and Creation Date Rules require to have a wildcard template for input strings that identifies several files. This could be created as some sort of regex rule <<R|{regex-expression}>>
or, probably easier from user perspective using common wildcards *
?
as part of the filename.
-i "image<<R|[0-9]{8}>>.jpg -o "image<<CD>>.JPG"
i "image*.jpg" -o "image<<CD>>.JPG"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.