View Single Post
Old 09-07-2018, 11:30 PM   #2904
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,003
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by eschwartz View Post
In celebration of the python3 port, I think I will move the CLI version to Arch Linux's [community] repository (currently maintained by me in the AUR).
Cool. But I'm going to point anyone asking Arch installation specific questions to you, then.

FYI, I'm going to bump the version to v3.0 when I release it, early next week if nothing else comes up.

Quote:
Originally Posted by chicleeblair View Post
I didn’t realize until now how many Marvel and Marvel-adjacent fandoms I read in, and also how many different ways AO3 categorizes them. I want to roll all of the Captain America fics into one category, and for whatever reason, I can’t manage to make the most basic replace metadata category work. Could someone give me an example using Captain America (2011) and Captain America - All Media Types that I can adapt for the numerous other varieties?
There's an FAQ on ReplaceMetadata, but here's a bit to get you started.

The first thing to realize is that long as AO3 lets anyone enter anything for metadata, you're unlikely to get all of it wrangled exactly the way you all the time without manual intervention.

But you can get a lot of it with a bit of work.

The most straightforward way is to explicitly replace the tags you run across in your stories:
Code:
[archiveofourown.org]
add_to_replace_metadata:
 category=>Captain America - All Media Types=>Captain America
 category=>Captain America \(Movies\)=>Captain America
But you end up with a lot of lines if you start down that path, especially as you apply them to more fields and fandoms and you have to escape regex characters like () as shown.

Or you can use regular expressions.
For example, if you just want every category name that contains 'Captain America' to be changed to 'Captain America', this will do it:
Code:
[archiveofourown.org]
add_to_replace_metadata:
 category=>^.*Captain America.*$=>Captain America
Translation of regex:
  • ^ = start of string
  • .* = 0 or more of any character
  • Captain America = Captain America
  • .* = 0 or more of any character
  • $ = end of string

That particular pattern isn't perfect. It won't match, for example:
  • Capt America
  • Captian America
  • captain america
  • CaptainAmerica

And it will match, for example:
  • Old Avengers Not Captain America
  • Captain American Ship Hornet WWII

If you have specific stories or ini problems, it's best to include story URLs and a copy of the relative ini lines--if not your whole personal.ini--there's a button to get a 'safe' copy with usernames and passwords removed.
JimmXinu is offline   Reply With Quote