View Single Post
Old 05-15-2019, 03:16 PM   #252
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: 4,058
Karma: 11800000
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, iPad 12.9
Quote:
Originally Posted by Tanjamuse View Post
I only want the line for category, is that possible?
This is the MCS Full TXT search regex I use for extracting Additional Tags from AO3 direct downloaded epubs (converted to TXT using Calibre).

Spoiler:
Posted originally on the Archive of Our Own at https://archiveofourown.org/works/8346424.

Rating:

Mature

Archive Warning:

Graphic Depictions Of Violence, Major Character Death

Category:

F/M, Multi

Fandom:

A Song of Ice and Fire - George R. R. Martin, Game of Thrones (TV)

Relationship:

Jon Snow/Daenerys Targaryen, Jon Snow/Ygritte, Meera Reed/Bran Stark, Jorah Mormont/Daenerys Targaryen, Jon Snow/Val

Character:

Jon Snow, Bran Stark, Samwell Tarly, Mance Rayder, Tormund Giantsbane, Stannis Baratheon, Three-Eyed Crow, Daenerys Targaryen, Jorah Mormont, Davos Seaworth, Melisandre of Asshai, The Weeper, Meera Reed, Val (ASoIaF), Ramsay Bolton, Hother "Whoresbane" Umber, Cersei Lannister, Jon Connington, Sansa Stark, Tyrion Lannister, Wyman Manderly, Jon "The Greatjon" Umber, Maege Mormont, Euron Greyjoy, Qyburn (ASoIaF), Sand Snakes (ASoIaF), Aegon Targaryen, Varys (ASoIaF), Olenna Tyrell

Additional Tags:

Violence, R plus L equals J, Other Additional Tags to Be Added, Warging, Dragons, King-Beyond-the-Wall, Wights, Blackfyre

Collections:

Jon has Dragons

Stats:

Published: 2016-10-22 Updated: 2018-07-29 Chapters: 51/? Words: 857620





Dragons of Ice and Fire


by serpentguy

Summary

There are things hidden in the far north, secrets buried under ice. Jon Snow faces the white walkers early, and stumbles upon a power that could change the world. It forges a new path for him and everyone around him - and a new journey south, a journey as a dragon.

The world begins to change - with steel and snow, fire and blood...

Code:
(?<=\nAdditional Tags:)[\n]+([^\n]+?)[\n]{2,}
I direct the MCS search results into a temporary #txtquery long text custom column and use a Calibre saved search/replace to copy from #txtquery to the correct tag-like custom columns. If I put the MCS search results directly into tag-like custom columns, I get a single tag "foo, bar" instead of two separate tags "foo", "bar".



As an example, for the following:
Spoiler:
Adapter_Classes:

ArchiveOfOurOwnOrgAdapter
AO3 Categories:

M/M
Author:

Mews1945
Authorhtml:

Mews1945
Author ID:

Mews1945
Author URL:

http://archiveofourown.org/users/Mew...seuds/Mews1945
Byline:

Mews1945
Packaged:

2017-10-08T14:18:06.733000
Published:

2006-04-07T00:00:00
Updated:

2006-04-07T00:00:00
Summary:

Frodo is lost in a storm, and Merry comes to find him.

Fandoms:

Lord of the Rings (2001 2002 2003)
Langcode:

en
Language:

English
Lastupdate:

Last Update Year/Month: 2006/04
Last Update: 2006/04/07
Chapters:

1
Words:

6324
Python_Version:

2.7.15+ (default, Jan 16 2019, 15:06:17) [MSC v.1900 64 bit (AMD64)]
Rating:

Explicit
Story URL Section:

https://archiveofourown.org/works/73969
Series:

Additional Series:

Additional Series:

Additional Series:

Publisher:

archiveofourown.org
Site Abbrev:

ao3
Status:

Completed
Story ID:

73969
Story URL:

http://archiveofourown.org/works/73969
Title:

Shelter From the Storm
Titlehtml:

Shelter From the Storm
Downloader Version:

FanFicFare v3.7.0
Warnings:

No Archive Warnings Apply

You would use this to extract fandom:
Code:
(?<=\nFandoms:)[\n]+([^\n]+?)[\n]
ilovejedd is offline   Reply With Quote