View Single Post
Old 05-14-2019, 10:26 AM   #10
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by Tanjamuse View Post
It's 500+ stories that I need to do it with, which is why I had hoped for another solution than doing it manually. I ilovejedd's solution:

Spoiler:
Code:
Search field:
#your_source_metadata_column

Search for:
Category: ([^\n]+)

Replace with:
\1

Destination field:
#fandom


But the result was not what I had expected:

Spoiler:
<div><div><font face="Segoe UI, 023</font></div><div><font face="Segoe UI, F/M</font></div><div><font face="Segoe UI, sans-serif" size="2"> &lt;/blockquote&gt;</font></div></div>, sans-serif" size="2"> &lt;p&gt;&lt;b&gt;Spoilery:&lt;/b&gt; Do 1x13 &lt;i&gt;Le Morte d'Arthur&lt;/i&gt;.&lt;/p&gt;</font></div><div><font face="Segoe UI, sans-serif" size="2"><br></font></div><div><font face="Segoe UI, sans-serif" size="2">Author URL: https://archiveofourown.org/users/idrilka/pseuds/idrilka</font></div><div><font face="Segoe UI, sans-serif" size="2">by idrilka</font></div><div><font face="Segoe UI, sans-serif" size="2">Chapters: 1</font></div><div><font face="Segoe UI, sans-serif" size="2">Genre: AU, sans-serif" size="2">Language: Polski</font></div><div><font face="Segoe UI, sans-serif" size="2">Le Fay</font></div><div><font face="Segoe UI, sans-serif" size="2">Merlin (BBC)</font></div><div><font face="Segoe UI, sans-serif" size="2">Packaged: 2017-10-09 11:59:51</font></div><div><font face="Segoe UI, sans-serif" size="2">Published: 2010-05-16</font></div><div><font face="Segoe UI, sans-serif" size="2">Publisher: archiveofourown.org</font></div><div><font face="Segoe UI, sans-serif" size="2">Rating: General Audiences</font></div><div><font face="Segoe UI, sans-serif" size="2">Series: Morgan le Fay [1]</font></div><div><font face="Segoe UI, sans-serif" size="2">Status: Completed</font></div><div><font face="Segoe UI, sans-serif" size="2">Story URL: https://archiveofourown.org/works/87083</font></div><div><font face="Segoe UI, sans-serif" size="2">Summary: &lt;blockquote class="userstuff"&gt;</font></div><div><font face="Segoe UI, sans-serif" size="2">Updated: 2010-05-16</font></div><div><font face="Segoe UI, sans-serif" size="2">Warnings: No Archive Warnings Apply</font></div><div><font face="Segoe UI, sans-serif" size="2">Words: 2
Try replacing search for with this:
Code:
[\w\W]*Category: ([^\n<>]+)[\w\W]*
Mind you, there's no "Category: ..." line in that blurb you posted. I see a div with Le Fay and Merlin (BBC) but it's not preceded by Category:. I don't think there's code that would automatically catch those unless you specifically list and search for all the possible fandom names in your library.

For the above example, try the search code using Series: or Story URL: because it's not gonna find anything for Category:.
ilovejedd is offline   Reply With Quote