Transforms - fixes for common differences between local filename and Comic Vine

View previous topic View next topic Go down

Transforms - fixes for common differences between local filename and Comic Vine

Post  anomander on Tue Apr 16, 2013 11:16 am

Thread forked from: http://comictagger.forumotion.com/t74-issues-that-cause-a-problems-known-bad-naming

This thread is a proof of concept to capture transforms that could be universally useful for all/most users. Potentiality these transforms may be included in Comic Tagger by default or a mechanism to easily add them included.

So what is a transform? A transform is just the name we have given to "match and rename" a string. This rename for example would match a common misspelling of a series name and transform it into a correct spelling as defined at the meta data source e.g. Comic Vine.

This is best explained with an example:

If you lookup "2000AD #0001.cbz" using Comic Tagger it will fail because there is no series with this exact name and issue. The correct series name is "2000 AD". If you inform CT of this name it will match as expated.

So a transform matching "2000AD" and converting it to "2000 AD" would benefit many users.

Please post examples of transforms that could benefit CT. I will attempt to Capture them in the second post in this thread. Should this proof of concept prove a success there is a possibility CT will add this feature.

Note you dont need actually post how to do the transform just the before and after.
avatar
anomander

Posts : 74
Join date : 2013-03-28

View user profile

Back to top Go down

Re: Transforms - fixes for common differences between local filename and Comic Vine

Post  anomander on Tue Apr 16, 2013 11:17 am

Reserved for transform summary list:


Matched: 2000AD
Converted: 2000 AD

Matched: GIJoe
Converted: G.I. Joe

Matched: " s " or "_s_"
Converted: "'s "

Matched: "I Zombie" or "I, Zombie"
Converted: "'iZombie"

Matched: "The Crossovers"
Converted: "'Crossovers"

Matched: "DC SuperFriends"
Converted: "'DC Super Friends"

Matched: "PunisherMAX"
Converted: "'Punisher MAX"


Last edited by anomander on Mon Apr 29, 2013 2:47 am; edited 5 times in total
avatar
anomander

Posts : 74
Join date : 2013-03-28

View user profile

Back to top Go down

Re: Transforms - fixes for common differences between local filename and Comic Vine

Post  anomander on Fri Apr 19, 2013 5:16 am


Matched: " s " or "_s_"
Converted: "'s "

Fix common dropping of ' in series name
avatar
anomander

Posts : 74
Join date : 2013-03-28

View user profile

Back to top Go down

Re: Transforms - fixes for common differences between local filename and Comic Vine

Post  ComicTagger on Sun Apr 21, 2013 11:25 pm

I put up a script that you can run to apply transforms, along with a starter file that contains the transforms. It will take a file, folder, or list of either, and apply the transform to rename any comic files that match.

The script, called "name_fixer.py" can be called directly if you have comictagger installed into your python path, or via the executable via the -S option. (You will need to have CT 1.1.8-beta installed to properly pass the CLI options through.) Use the '--help' option for, well, help.

The file with the transforms is called "xforms". It's in JSON format, which makes reading it in a snap. Any regex that has a backslash in it will need to have them escaped. i.e. "\\" instead of just "\"

Find them here: https://code.google.com/p/comictagger/source/browse/#svn%2Ftrunk%2Fscripts

avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Transforms - fixes for common differences between local filename and Comic Vine

Post  anomander on Mon Apr 22, 2013 3:32 am

Superb, I will test shortly.

A couple of questions. Calling a scripts seems trivial but there is a distinct lack of documentation to what all these scripts actually do.

For example the summary of this script says "fix the comic file names using a list of transforms". OK so we have an idea what that will do but I immediately get scared when I see "file names".

Are we not talking about here about transforming CT matched series names or are we in the OS actually renaming files? Hopefully the former. The later is slightly less powerful since one of the big plus sides of transforms is making a series match comic vine name unhindered bty any OS or file system naming limitations.

Absolutely not wanting to come accross as ungrateful. The exact opposite is true but before we set people of on this path its worth discussing
avatar
anomander

Posts : 74
Join date : 2013-03-28

View user profile

Back to top Go down

Re: Transforms - fixes for common differences between local filename and Comic Vine

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum