Zealot
Posts: 132
Karma: 295674
Join Date: Jul 2021
Device: iPhone
|
Quote:
Originally Posted by JimmXinu
BTW, kudos for figuring out teststory and using it well for its intended purpose.
|
 Yes I didn't want to bombard AO3 with requests while testing my edits.
Quote:
Originally Posted by JimmXinu
New Test Version Posted
2023-07-23
- Filter cookies for flaresolverr
- Add _LIST option to include_subject_tags(/extra_subject_tags), refactor
So with this test version, culytera just needs:
Code:
include_subject_tags:first_ship_LIST,first_category_LIST
|
Thank you so much! My test result looks like this now.
Now I'm testing lists where I want to only keep a certain item (in categories, not prefix_categories) when it's the only one that exists, while excluding it when a different entry exists.
For example, I want "Dragon Age" to be kept when *Inquisition/Origins/II aren't one of the entries as well. If one of those 3 exists, I want "Dragon Age" excluded from the list. I've tested something similar with Mass Effect and Mass Effect: Andromeda/Mass Effect Trilogy and for some reason, my regex worked with Mass Effect but not Dragon Age. Here are the tests (long image).
The code:
Spoiler:
Code:
[test1.com]
# URL: http://test1.com?sid=12345
add_to_extra_valid_entries:,prefix_category,prefix_ships,first_category,first_ship
include_in_prefix_ships:ships
include_in_prefix_category:category
include_in_first_ship:ships
include_in_first_category:category
keep_in_order_ships:true
keep_in_order_characters:true
keep_in_order_category:true
keep_in_order_prefix_ships:true
keep_in_order_prefix_category:true
keep_in_order_first_ship:true
keep_in_order_first_category:true
prefix_ships_label:Prefix Ships
prefix_category_label:Prefix Category
first_ship_label:First Ship
first_category_label:First Category
exclude_metadata_pre:
prefix_ships=~(.*) & (.*)
replace_metadata:
category=> (- All Media Types|- Fandom|\(Movies\)|\(Movie [0-9]+\)|\(Comics\)|\(TV\)|\(Video Games?\))$=>
first_category_LIST=>(Dragon Age\,\s?)Dragon Age(:? (Inquisition|Origins|II))=>Dragon Age\2
first_category_LIST=>(Mass Effect\,\s?)Mass Effect(:? (Andromeda|Trilogy))=>Mass Effect\2
prefix_category=>^(.*)=>[c] \1
prefix_ships=>^(.*)=>[p] \1
first_category=>^(.*?)$=>[c] \1
first_ship=>^(.*?\/.*?)$=>[p] \1
## first_category_LIST=>^(\[c\].*?)(\,.*)=>\1
first_ship_LIST=>^(\[p\].*?\/.*?)(\,.*)=>\1
first_category_LIST=>^(\[c\].*?)(\,.*)=>\1
exclude_metadata_post:
category=~^(Dragon Age)$&&category_LIST=~Dragon Age:? (Inquisition|Origins|II)
category=~^(Mass Effect)$&&category_LIST=~Mass Effect:? (Andromeda|Trilogy)
include_subject_tags:first_ship_LIST,first_category_LIST
titlepage_entries:<div class="inline">,seriesHTML,category,rating,warnings,</div>,ships,characters,prefix_ships,prefix_category,<div class="inline">,first_ship,first_category,</div>
titlepage_start:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${title} by ${author}</title>
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
<meta name="calibre-html-render-data" content='{"size": "A2", "margins": [0, 0, 0, 0]}'/>
</head>
<body class="fff_titlepage" style="font-size: 2.5vmax;">
<div class="title">
<h1><a href="${storyUrl}">${title}</a> by ${authorHTML}</h1>
</div>
<hr/>
<dl class="tags">
titlepage_entry:
<dt><b>${label}:</b></dt> <dd>${value}</dd>
titlepage_wide_entry:
wide_titlepage_entries:
titlepage_no_title_entry:
titlepage_end:
<dl class="stats">
</dl>
</dl>
<hr/>
<div class="tag-summary-content">${description}</div>
</body>
</html>
[teststory:defaults]
category_list:Category 1,Category 2,Category 3
characters_list:Char A,Char B,Char C,Char D
ships_list:Char A/Char B,Char B & Char C,Char A & Char B,Char C/Char D,Char B/CharC
description:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus faucibus massa vitae interdum maximus. Vestibulum dictum odio sed vestibulum vulputate. Proin placerat posuere ex, sit amet egestas ex tristique in. Quisque porta nisl et dui dignissim, sit amet rhoncus justo rhoncus. Proin sit amet leo a enim mollis molestie nec eget enim. Cras sit amet odio lorem. Ut ac fringilla nibh. Morbi faucibus sapien sit amet turpis venenatis, nec tincidunt risus cursus.
[teststory:10001]
title:{{storyId}} Dragon Age - All Media Types
category_list:Dragon Age - All Media Types
[teststory:10002]
title:{{storyId}} Dragon Age II,Dragon Age: Inquisition
category_list:Dragon Age II,Dragon Age: Inquisition
[teststory:10003]
title:{{storyId}} Dragon Age (Video Games),Dragon Age: Inquisition
category_list:Dragon Age (Video Games),Dragon Age: Inquisition
[teststory:10004]
title:{{storyId}} Dragon Age (Video Games),Dragon Age - All Media Types,Dragon Age: Origins,Dragon Age: Origins - Awakening
category_list:Dragon Age (Video Games),Dragon Age - All Media Types,Dragon Age: Origins,Dragon Age: Origins - Awakening
[teststory:20000]
title:{{storyId}} Mass Effect (Video Games)
category_list:Mass Effect (Video Games)
[teststory:20001]
title:{{storyId}} Mass Effect Trilogy
category_list:Mass Effect Trilogy
[teststory:20002]
title:{{storyId}} Mass Effect Trilogy,Mass Effect - All Media Types
category_list:Mass Effect Trilogy,Mass Effect - All Media Types
[teststory:20003]
title:{{storyId}} Mass Effect - All Media Types,Mass Effect: Andromeda
category_list:Mass Effect - All Media Types,Mass Effect: Andromeda
[teststory:20004]
title:{{storyId}} Mass Effect - All Media Types,Mass Effect: Andromeda,Mass Effect Trilogy
category_list:Mass Effect - All Media Types,Mass Effect: Andromeda,Mass Effect Trilogy
Last edited by culytera; 07-24-2023 at 10:20 AM.
Reason: Changed image host
|