Welcome, Guest
Try to get help from other ComicRack users

TOPIC: How to name CBR/CBZ files so CR detects metadata on chapter numbers?

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 5 months 12 hours ago #51484

  • Jorge24
  • Jorge24's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Hi! I'm a new user of CR. I read manga and I'm trying to name my CBR files in a way that CR will be able to automatically detect the Series name, volume number and chapter # range. I say "range" because usually mange is published in volumes that contain multiple chapters. For example, "Volume 1" of a manga contains chapters 1 through 9 of the series. What I refer to as "chapter" is the equivalent of "number" in CR.

CR has trouble identifying a range of chapters. For example, for the first volume of a series called "Tokyo Ghoul", I tried naming my CBR file "Tokyo Ghoul V1 ch1-9" which results in CR thinking that the metadata is:
Series Name = Tokyo Ghoul ch1
Volume = 1
Number = 9

If I try "Tokyo Ghoul V1 #1-9" then the series name and volume are detected properly but there is no info at all detected for the chapter or "number".
What I want is to be able to have CR detect this file as:
Series Name = Tokyo Ghoul
Volume = 1
Number = 1-9

How do I do this? So far I've been editing the info manually, which works, but I would love to automate this if possible. Maybe I should request this as a new feature?
Last Edit: 5 months 12 hours ago by Jorge24.
The administrator has disabled public write access.

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 5 months 54 minutes ago #51507

Unfortunately I cannot directly help you, but I am pretty sure there is something in the Manual:
comicrack.cyolito.com/forum/32-news-and-...icrack-manual-6th-ed
The administrator has disabled public write access.

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 3 weeks ago #51509

  • Jorge24
  • Jorge24's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Thank you, I found a section in the manual that talks about Data Manager scripts such as the script "CR Data Manager" however, I couldn't figure out how to get the chapter number range from the filename using the scrip. I think what I want to do is beyond this script's capability.
The administrator has disabled public write access.

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 2 weeks ago #51649

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 281
  • Thank you received: 32
  • Karma: 8
For regex problems I suggest you look into P.R.I.A.T. script rather than CR Data Manager which is both too powerful and too fixed for those issues. PRIAT is better at handling ad-hoc file name to values
The administrator has disabled public write access.
The following user(s) said Thank You: Jorge24

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 2 weeks ago #51673

  • Jorge24
  • Jorge24's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Thank you!! Priat worked!
I copied the Regex expression format from the forum and got it to work with the expression:
.*\\(?<Series>.*) V(?<volume>.*) #(?<number>.*).cbr

It worked for a file like "...Tokyo Ghoul\02 Tokyo Ghoul re (MangaSee)\Tokyo Ghoul re V1 #1-9.cbr"

I"m still not sure what the question mark does in that expression though. I think the period+asterisk (.*) means zero or more of any characters which substitutes the SPACE character in this case, right?

Would you mind explaining what the question mark does in this case? I googled a regexp list but still didn't understand why I needed the question mark.
The administrator has disabled public write access.

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 2 weeks ago #51700

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 281
  • Thank you received: 32
  • Karma: 8
Jorge24 wrote:
Thank you!! Priat worked!
Happy it worked out for you :)

Jorge24 wrote:
I"m still not sure what the question mark does in that expression though.
It's the way that PRIAT identifies comicrack variables i.e.
(?<VARIABLE>regex) means that the regex expression will be stored inside VARIABLE and VARIABLE can be almost (all?) data that is within comicrack (e.g. series, volume, year, number, count, alternateseries, day, etc)
Jorge24 wrote:
I think the period+asterisk (.*) means zero or more of any characters which substitutes the SPACE character in this case, right?

The period is the "any character" value instead the asterisk is a grab as match as the previous identifier as possible (in this case the any character).
Another one that you might end up using is \d (capture a number) and \d* (capture a sequence of numbers).
The administrator has disabled public write access.
The following user(s) said Thank You: Jorge24

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 2 weeks ago #51747

  • Jorge24
  • Jorge24's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
I see, now it all makes sense. Thank you! So would you say an expression that uses \d like:
.*\\(?<Series>.*) V(?<volume>\d+) #(?<number>\d+-\d+).cbr

would be better suited then?
The administrator has disabled public write access.

How to name CBR/CBZ files so CR detects metadata on chapter numbers? 4 months 2 weeks ago #51761

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 281
  • Thank you received: 32
  • Karma: 8
Jorge24 wrote:
would be better suited then?
I would say that whichever expression works in the moment, it's quick to write and gives you the right result is the most suited one :)

That's why I like PRIAT I can see what I am getting while writing the expression on the fly. Also you do not have to grab every component in one go you can have multiple passes for different variables.

PRIAT does offer the chance to save some regex for quick retrival - the way I use that function is to save snippets that I get bored writing and that (given my files) tend to reoccur.

E.g. "ScanInformation": .*(\[|\(|{)(?<ScanInformation>.*)(\]|}|\))
The above captures everything in side in the last bracket series and stores it into scaninformation. Do I need it every time? No but when scanner names are present it's easy to use
The administrator has disabled public write access.
The following user(s) said Thank You: Jorge24
Time to create page: 0.205 seconds

Who's Online

We have 125 guests and no members online