Original filename in rename options

Enhancement requests or feature requests for future Mylar releases.
Post Reply
perezmu
Posts: 24
Joined: Sat Aug 30, 2014 10:25 pm

Original filename in rename options

Post by perezmu »

Hello,

Would it be possible to have a $Filename or similar tag for renaming. I think it is useful to have the original filename info when sorting/rename my comics... it woud go something like this:

$Series $Annual $Issue ($Year) [$Filename]

So, we''d keep comics nicely sorted and named, and would not lose the extra info in the filename (c2c/digital/scan group....). I guess implementing this would be fairly easy without need to scrape the filename for specific tags.

Thanks
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Original filename in rename options

Post by evilhero »

How exactly would you get the file information without scraping the filename for those specific tags?

As far as I'm aware, the only way to do this is to parse the filename for series information and if that's successful it could use the remainder as a catch-all, but there's no guarantee of what the remainder of information would be after the initial parsing is done.

Plus scanners don't follow a specific naming convention - so looking for all of that extra information wouldn't be a simple task that's always accurate (ie. c2c is in the middle of the filename, the issue date is at the beginning, the issue number is in brackets at the end, etc).

Not saying it can't be done, nor that it's not a good idea - just would require the fileparser in it's current iteration to retain the stuff it deems not worthy of keeping in regards to the actual series information. Would have to be tackled after all the new templates are finished, and/or I need a diversion from laying down all the new javascript.
perezmu
Posts: 24
Joined: Sat Aug 30, 2014 10:25 pm

Re: Original filename in rename options

Post by perezmu »

Sorry,

I did not explain myself correctly... since I know scrapping all that info from the filename is hard given the wild variety of names out there, that is why I was proposing that you could use the original filename as part of the rename action in mylar.

So, if I had this comic,

The Flash - Fastest Man Alive 001 (2020) (c2c) (Zone-Empire)

With the current rename scheme, I would end with something like:

$Series ($Year) $Issue

The Flash - Fastest man Alive (2020) - #001

Which is fine... But I lose some info in the original name. To be able to keep all that info without having to scrape the name further and harder, I propose that you create a simple renaming tag, $Filename, so that we could keep all the info. Thus:

$Series ($Year) $Issue [$Filename]

would yield:

The Flash - Fastest man Alive (2020) - #001 [The Flash - Fastest Man Alive 001 (2020) (c2c) (Zone-Empire)]

I know to may this may seem too redundant and too long, but I think having the original filename is good... in includes the scanner, the format... and this is just a simple example.

Thanks for your time.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Original filename in rename options

Post by evilhero »

We couldn't do the $Filename aspect as you're inquiring about due to the how the fileparser works. Having the original filename as part of the renamed filename would cause problems for the parser - there's no clean way for that to work properly so that the right information is parsed out. So basically even after a rename to a new format with the proposed $Filename tag, Mylar wouldn't be able to read the file as being present (as it would fail during the file parsing) and the end result would be that it would get marked as Archived in most cases.

It'd be almost easier to retain the extra info and append that after, although again, that might cause problems with the parser. Is there not an option in the ComicInfo.xml file to indicate the original filename - like a custom field name ? I think that would make a lot more sense and is more practical for this type of situation, although I'm not sure exactly of the reasoning why you're wanting it or if even that aspect is do-able.
perezmu
Posts: 24
Joined: Sat Aug 30, 2014 10:25 pm

Re: Original filename in rename options

Post by perezmu »

Ok, I understand now why you were saying that naming would be a problem... thanks.

Then, as you say, there are some tags in comicinfo.xml that could be used. I, for one, when using comicrack usually copied the original filename in the "scaninfo" tag... Could I do that in mylar using a custom script?

In particular, also, comictagger does that. Looking at the documentation, I found that comictagger does something similar. But also I found out that it has some "parsing stopping" characters... that might also be interensting to implement in mylar. I copy here the relevant paragraphs from
  • You can also use a double dash ("--") or double underscore ("__") to precede the part of the filename that won't be parsed. The following example will parse OK, since the text after the double dash will be ignored:

    Code: Select all

     Foobar-Man Annual v2 121 -- The Wrath of Foobar-Man, Part 1 of 2.cbz
    As mentioned above, most text in parentheses will be ignored. This is also true for text after "--" or "__":

    Code: Select all

    Monster Island v1 1 (orginal cover) (c2c) .cbz
    Monster_Island_v1_2__repaired__c2c.cbz
    Monster Island v1 3 (1957) -- The Revenge Of King Klong (noads).cbz
  • Any text that is not explicitly parsed as series name, volume, issue number, or publication year, or issue count will be saved in the "scan info" field, if enabled.
Post Reply