View Single Post
Old 07-28-2013, 07:17 PM   #1572
Jade Aislin
Groupie
Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.
 
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
Quote:
Originally Posted by JimmXinu View Post
The alternative is for you to learn python and start writing code instead. That is an option, if you like.
I thought about trying to teach myself python. Aside from the fact that I'm terrible at teaching myself anything, I was only able to make it through the basic classes for C++ and Java in college.

Quote:
Originally Posted by JimmXinu View Post
I believe those are two unrelated issues. Section choice vs comma, that is.
Yes. I didn't mean to make it seem like it was one problem.
Quote:
Originally Posted by JimmXinu View Post
If you plan to use the same replace_metadata for all sites and all formats, [defaults] is the most appropriate section. Then you can still put replace_metadata under specific sites if needed, or use add_to_replace_metadata in those sites.

Section precedence is:
  1. [defaults]
  2. [test1.com]
  3. [epub]
  4. [test1.com:epub]
  5. [overrides]
I was not aware of the order of precedence. If I am understanding this right, I should use replace_metadata in [defaults](Would there be a reason to use add_to_metadata there?). Then if I don't want one of the lower sections to overwrite that, I use add_to_replace_metadata.

Quote:
Originally Posted by JimmXinu View Post
FYI, while you're consolidating, you can also apply the same regex to more than one entry at a time
I knew that and was planning on combining the characters and ships. Ironically, I didn't think about it for the simple changes to get rid of key characters like commas and '|'.
Quote:
Originally Posted by JimmXinu View Post
If you succeed in getting all your replace_metadata into one big list, I'd put it at the end in case any of the earlier patterns depend on commas.

If you want to allow for possible sites specific regex still, put it under overrides as an add_to_replace_metadata. That will put it at the end of any and all replace_metadata chains that get built up.

Code:
[overrides]
add_to_replace_metadata:
 category,characters,ships=>,=>\s
I'm a little confused. Wouldn't I want to put it before the category,characters,ships lists get sorted?

I'm trying to transfer my code into the default personal ini to reduce the clutter I seem to have from different tweaks, so I'm not sure where I placed the replace_metadata at the moment as I moved it a few times. But I can try placing the ',=>\s' in [overrides] and see what happens.
Jade Aislin is offline