#1 2020-05-23 23:56

Ptaker
Member
Registered: 2020-04-10
Posts: 13

Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

I am trying to change my book lists FROM: Author - Book Name - Series Name.epub TO: Author - Series Name - Book Name.epub
The delimiter in all cases is "-".

I tried Swap but could not figure it out. I saw some examples of Rename in the forum but there was nothing with three sections to rearrange.

Can someone please help me on this?

Second question: If the author's name in the above example is Doe, John Peter instead of John Peter Doe, is there another expression that can be added as a 2nd rule?

Thank you in advance.

Ptaker

Offline

#2 2020-05-24 07:13

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

Hi and welcome.

FROM:
Author - Book Name - Series Name.epub
Doe, John Peter - Book Name - Series Name.epub

TO:
Author - Series Name - Book Name.epub
Doe, John Peter - Series Name - Book Name.epub

Use:
Rearrange rule
http://www.den4b.com/wiki/ReNamer:Rules:Rearrange
Split by delimiters "-" (((splits the name at the hyphen into parts)))
New pattern "$1 - $3 - $2" (((rearrange the matched parts in new order, adding new hyphen yourself)))
NOTE: "quotes" are for clarifying only, don't use them in real.
[x]skip extension

- - -


FROM:
Author - Series Name - Book Name.epub
Doe, John Peter - Series Name - Book Name.epub

TO:
Author - Series Name - Book Name.epub
John Peter Doe - Series Name - Book Name.epub

Use as second rule Regular Expressions
http://www.den4b.com/wiki/ReNamer:Rules:RegEx
Replace expression "(.+), (.+?) -" (((split at comma, non-greedy until first hyphen)))
with "$2$1"
NOTE: "quotes" are for clarifying only, don't use them in real.
[x]skip extension



 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2020-05-24 18:00

Ptaker
Member
Registered: 2020-04-10
Posts: 13

Re: Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

Thank you for your hard work on this. OOPS. See below message also.

Just one question. Is there some way of putting a remark or note in the REARRANGE and REGEX expressions that won't show up or affect the results but will let me know what each expression does? Then I won't have to memorize which one does what.

Last edited by Ptaker (2020-05-24 18:38)

Offline

#4 2020-05-24 18:36

Ptaker
Member
Registered: 2020-04-10
Posts: 13

Re: Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

Just realized that there are four extra space in the file being renamed:
ACTUAL EXAMPLE:

FROM:     Tom Bob Jones - [Series Bracket] - When Night Comes.htm
RENAMED:  Tom Bob Jones  -  When Night Comes -  [Series Bracket] .htm 

This contains four extra spaces within the file. How do I correct it?

Thanks again.

Offline

#5 2020-05-24 18:43

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

Ptaker wrote:

This contains four extra spaces within the file. How do I correct it?

Maybe use
New pattern "$1-$3-$2"

instead of
New pattern "$1 - $3 - $2"


Or see the CleanUp Rule
http://www.den4b.com/wiki/ReNamer:Rules:CleanUp
Fix spaces : Replace multiple consecutive spaces with a single space.




 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#6 2020-05-24 19:35

Ptaker
Member
Registered: 2020-04-10
Posts: 13

Re: Change order of "G, Author-Book-Series" (swap,rearrange,move,adjust)

The clean up multiple spaces did solve the problem. Thanks.

Offline

Board footer

Powered by FluxBB