Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to customise Album names #157

Closed
pacoorozco opened this issue Nov 12, 2019 · 4 comments · Fixed by #431
Closed

Add the possibility to customise Album names #157

pacoorozco opened this issue Nov 12, 2019 · 4 comments · Fixed by #431
Labels
enhancement The issue is a feature request good first issue An issue that is good to start contributing to this project hacktoberfest Hacktoberfest

Comments

@pacoorozco
Copy link
Member

Is your feature request related to a problem? Please describe.
Currently there are two ways to create Album names: folderPath and folderName. These options doesn't cover too much use cases. As it was raised at #150 .

Describe the solution you'd like
I'd like be able to customise the Album name based on the data I've got and using several functions.

Describe alternatives you've considered
The alternative is that the user modifies the folders locally before uploading files.

Additional context
Something similar to Mp3Tag scripting.

@pacoorozco pacoorozco added the enhancement The issue is a feature request label Nov 12, 2019
@pacoorozco
Copy link
Member Author

First iteration could be using MakeAlbums.use configuration option with:

Fields

Placeholder Description
%_directory% Name of the parent directory (same as folderName)
%_parent_directory% Name of the grandparent folder
%_folderpath% Path without file name (same as folderPath)
%_date% Short date
%_datetime% Long date

Functions

Placeholder Description
$cutLeft(x,n) Removes the first n characters of string x and returns the result.
$cutRight(x,n) Removes the last n characters of string x and returns the result.
$regexp(x,expr,repl) Replaces the pattern specified by the regular expression expr in the string x by repl. The fourth optional parameter enables ignore case (1) or disables the ignore case setting (0). Please note that you have to escape comma and other special characters in expr.
$caps(x) Converts the given string to normal case.
$upper(x) Converts the given string to upper case.
$lower(x) Converts the given string to lower case.

Examples

Case conversion Normal

Command: $caps(string)
Example: $caps(This is my %_directory% )
This example converts the given string to normal case.
/foo/bar/file.jpg converts to This is my Bar

Case conversion UPPER

Command: $upper(string)
Example: $upper(My album is %_parent_directory%)
This example converts the given string to upper case.
/foo/bar/file.jpg converts to MY ALBUM IS FOO

Case conversion lower

Command: $lower(string)
Example: $lower(My album is %_folderpath%)
This example converts the given string to lower case.
/foo/bar/file.jpg converts to my album is /foo/bar

Replace some characters

Command: $regexp(x,expr,repl)
Example: $regexp(%folderpath%,/,)
This example replaces / in the given string for _
/foo/bar/file.jpg converts to _foo_bar

@DrVanScott
Copy link

DrVanScott commented Nov 13, 2019

Maybe also the possibility to call an external shell script / command and use the content of stdout?

@DrVanScott
Copy link

Maybe this mechanism could also be used to manipulate the info text?

@pacoorozco pacoorozco added good first issue An issue that is good to start contributing to this project hacktoberfest Hacktoberfest labels Sep 29, 2020
WACKYprog added a commit to WACKYprog/gphotos-uploader-cli-parser that referenced this issue Jan 22, 2024
@WACKYprog
Copy link
Contributor

Pull request summited: #431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a feature request good first issue An issue that is good to start contributing to this project hacktoberfest Hacktoberfest
Projects
None yet
3 participants