View Single Post
Old 01-27-2021, 02:46 PM   #5283
ackomb
Zealot
ackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura about
 
Posts: 106
Karma: 4486
Join Date: Mar 2020
Location: Netherlands
Device: i-pad
Quote:
Originally Posted by JimmXinu View Post
@ackomb - It's hard to make out what parts of your post are quoted code and not, and to see the whitespace; which does make a difference in regexp..

Please use [code] tags around code blocks, such as your INI lines and italic or underline to show which parts of your prose are specific strings.

Example:
Code:
replace_metadata:
 characters=>^Brian \(The 100\)$=>Bryan (the 100)&&category==the 100
 characters=>^Brian \(The 100\)$=>Bryan (the 100 )&&category==the 100
You can quote other peoples posts to see what codes they used even if you don't post the reply.
Hi Jimm,

Sorry, I had some issues last night and I forgot to include my .ini
Spoiler:
## [defaults] section applies to all formats and sites but may be overridden at several levels.
[defaults]
is_adult:true
include_titlepage: true

## Add this to genre if there's more than one category.
add_genre_when_multi_category: #Crossover

[www.archiveofourown.org]
#username:***
#password:***

use_view_full_work:true

add_to_extra_valid_entries:,ships2chars
#include_in_ships2chars:ships.NOREPL

add_to_replace_metadata:
ships2chars=>[ ]*/[ ]*=>/
ships2chars=>[ ]*&[ ]*=>/
ships2chars=>([^/]+)/([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3\,\4
ships2chars=>([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3
ships2chars=>([^/]+)/(.+)=>\1\,\2
include_in_characters:characters,ships2chars

## Tells which tags from the site to include in calibre
include_subject_tags: extratags, genre, category, characters, ships
include_in_genre: freeformtags, ao3categories
include_in_category: fandoms

add_to_include_subject_tags:,tagsfromtitle.SPLIT

## Tells which tags from the site to include on the titlepage
titlepage_entries: series,category,genre,characters,status,datePublis hed,dateUpdated,rating,numChapters,numWords,site,d escription

## Tells which tags goes to which customs column
custom_columns_settings:
genre=>#genre,a
category=>#show,a
characters=>#m_char,a
ships=>#m_pair,a

## Excludes entire tags before being processed further
exclude_metadata_pre:
freeformtags,genre==Other Additional Tags to Be Added
warnings==Creator Chose Not To Use Archive Warnings
warnings==No Archive Warnings Apply

replace_metadata:
## Regular cleanup
## Replaces & with / in 'ships' and 'genre'
ships,genre,category,characters=> & =>/
ships,genre,category,characters=>&=>/
ships,genre,category,characters=> \| =>/

category=>^The 100 \(TV\)$=>the 100
characters=>^Abigail "Abby" Griffin$|^Abby$|^Abby Griffin$|^Abbie$|^Abby \(The 100\)$|^Abigail Griffin$=>Abigail "Abby" Griffin&&category==the 100
characters=>^Bellamy Blake$|^Bellamy$|^Bellamy Blake \(mentioned\)$|^Bellamy Black$|^Bob Morley$|^bellamie$=>Bellamy Blake&&category==the 100
characters=>^Bryan \(the 100\)$|^Brian \(The 100\)$|^Bryan \(The 100\)$=>Bryan (the 100)&&category==the 100
characters=>^Clarke Griffin - Wanheda$|^Clark Griffin$|^Clarke - Character$|^Clarke Griffin \(mentioned\)$|^Clarke Griffin\/Madi - Character$|^Clarke is grieving - Character$|^Clarke Griffin$|^Sad Clarke - Character$|^Clarke \(The 100\)$|^Clarke Cullen$=>Clarke Griffin - Wanheda&&category==the 100
characters=>^Finn Collins$|^Finn$|^Fin Collins$=>Finn Collins&&category==the 100
characters=>^Harper McIntyre$|^Harper \(The 100\)$|^Harper$=>Harper McIntyre&&category==the 100
characters=>^Indra \(the 100\)$|^Indra$|^Indra \(The 100\)$=>Indra (the 100)&&category==the 100
characters=>^Jake Griffin$|^Jake$|^Jack Griffin$=>Jake Griffin&&category==the 100
characters=>^Jasper Jordan$|^Jasper$=>Jasper Jordan&&category==the 100
characters=>^Lexa \(the 100\) - Heda$|^Commander Lexa - Character$|^Lexa$|^Heda Lexa - Character$|^Fine Stud Lexa - Character$|^lexa woods$|^Lexa's tribute$|^One year since lexa died$|^Lexa \(The 100\)$|^Lexa \(The 100\) \(mentioned\)$|^leksa - Character$|^Alycia Debnam-Carey$=>Lexa (the 100) - Heda&&category==the 100
characters=>^Lincoln \(the 100\)$|^Lincoln \(mentioned\)$|^One Year since Lincoln died$|^Lincoln Burrows$|^Lincoln Woods$|^Lincoln's tribute$|^Lincoln$|^Lincoln \(The 100\)$|^Lincoln \(The 100\) \(mentioned\)$=>Lincoln (the 100)&&category==the 100
characters=>^Monty Green$|^Monty$|^Monty Greene$|^Monte$=>Monty Green&&category==the 100
characters=>^Nathan Miller$=>Nathan Miller&&category==the 100
characters=>^Octavia Blake$|^Octavia$|^Octavia Blake \(mentioned\)$|^Octavia is grieving - Character$|^Sad Octavia - Character$|^Octavia \(The 100\)$=>Octavia Blake&&category==the 100
characters=>^Raven Reyes$|^Raven$|^Raven Reyes \(mentioned\)$|^Raven Cullen$=>Raven Reyes&&category==the 100

## This section will override anything in the system defaults or other sections here.
[overrides]
## default varies by site. Set true here to force all sites to collect series.
collect_series: true
extratags:


As for the lines I'd higlighted in my post, this is just a variation I tried to see it was actually replacing anything or not, the answer is yes.
ackomb is offline   Reply With Quote