View Single Post
Old 07-27-2023, 12:28 AM   #8741
culytera
Zealot
culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.
 
Posts: 131
Karma: 295674
Join Date: Jul 2021
Device: iPhone
Quote:
Originally Posted by JimmXinu View Post
New Test Version Posted

2023-07-26
- AO3: Make subscribed, markedforlater True/False to match bookmarked/bookmarkprivate/bookmarkrec
Thanks again! It's more consistent now.

I have another question, I was trying to test the bookmark/subscribed checks with test stories but I don't know which part I did wrong when trying to fill up the metadata. Back when I even tried with boolean values the plugin would return an error ("unexpected class 'bool'" IIRC). Now it just doesn't show any values.

Test result

Test code:
Spoiler:
Code:
[test1.com]
# URL: http://test1.com?sid=12345

add_to_extra_valid_entries:,prefix_category,prefix_ships,first_category,first_ship,icons

include_in_icons:icon_bookmarked,icon_subscribed
include_in_prefix_ships:ships
include_in_prefix_category:category
include_in_first_ship:ships
include_in_first_category:category

keep_in_order_icons:true
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
icon_bookmarked_label:Bookmarked
icon_subscribed_label:Subscribed

exclude_metadata_pre:
 prefix_ships=~(.*) & (.*)
replace_metadata:
 category,first_category=> (- All Media Types|- Fandom|\(Movies\)|\(Movie [0-9]+\)|\(Comics\)|\(TV\)|\(Video Games?\))$=>
 prefix_category=>^(.*)=>[c] \1
 prefix_ships=>^(.*)=>[p] \1
 first_category=>^(.*?)$=>[c] \1
 first_ship=>^(.*?\/.*?)$=>[p] \1
 first_ship_LIST=>^(\[p\].*?\/.*?)(\,.*)=>\1
 first_category_LIST=>(\[c\] Dragon Age\,\s?)\[c\] Dragon Age(:? (Inquisition|II|Origins))=>[c] Dragon Age\2
 first_category_LIST=>(\[c\] Mass Effect\,\s?)\[c\] Mass Effect(:? (Trilogy|Andromeda))=>[c] Mass Effect\2
 first_category_LIST=>^(\[c\].*?)(\,.*)=>\1
 icons_LIST=>^(Bookmarked\,\s?Subscribed)$=>🔖 🞨 🔔
 icons_LIST=>^(Not Bookmarked\,\s?Not Subscribed)$=>🞨
 icons_LIST=>^(Not Bookmarked\,\s?Subscribed)$=>🔔
 icons_LIST=>^(Bookmarked\,\s?Not Subscribed)$=>🔖

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,icon_bookmarked,icon_subscribed,</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>
 <div class="hr-sect">${icons}</div>
 <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>
 <div class="hr-sect">Summary</div>
 <div class="tag-summary-content">${description}</div>
 </body>
 </html>


[teststory:defaults]
add_to_valid_entries:,icon_bookmarked,icon_subscribed

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.
icon_bookmarked:Bookmarked
icon_subscribed:Subscribed

[teststory:10001]
title:{{storyId}} Dragon Age - All Media Types
category_list:Dragon Age - All Media Types
icon_bookmarked:Bookmarked
icon_subscribed:Not Subscribed

[teststory:10002]
title:{{storyId}} Dragon Age II,Dragon Age: Inquisition
category_list:Dragon Age II,Dragon Age: Inquisition
icon_bookmarked:Not Bookmarked
icon_subscribed:Subscribed

[teststory:10003]
title:{{storyId}} Dragon Age (Video Games),Dragon Age: Inquisition
category_list:Dragon Age (Video Games),Dragon Age: Inquisition
icon_bookmarked:Not Bookmarked
icon_subscribed:Not Subscribed


add_to_output_css:
Spoiler:
Code:
add_to_output_css:
 body {
  font-family: 'Netflix Sans', sans-serif;
  text-align: left;
 }
 body.fff_titlepage {
  background-color: #980101;
  color: white;
 }
 hr {
  display: block;
  border: 0; border-top: 1px solid;
  padding: 0;
 }
 .hr-sect {
  display: flex;
  flex-basis: 100%%;
  align-items: center;
  text-align: center;
  margin: 5px 0px;
 }
 .hr-sect:before,
 .hr-sect:after {
   content: "";
   flex-grow: 1;
   height: 1px;
   border: 0; border-top: 1px solid;
   font-size: 0px;
   line-height: 0px;
   margin: 0px 8px;
 }
 .fff_titlepage .title h1,
 .fff_titlepage .title h2 {
  font-size: 3vmax;
  margin: 0;
 }
 .fff_titlepage .title h1 { font-weight: normal; }
 .fff_titlepage .title h1 a { font-weight: bold; } 
 .fff_titlepage .title a,
 .fff_titlepage .tags a,
 .fff_titlepage .tag-summary-content a {
  text-decoration: none;
  color: unset;
 }
 .fff_titlepage .tag-summary-content a {
  font-style: italic;
 }
 .fff_titlepage .tag-summary-content p {
  margin-top: 0;
 }
 .fff_titlepage .tags {
  display: block;
  padding: 0;
 }
 .fff_titlepage dl .inline dd {
   display: inline;
   margin: 0;
 }
 .fff_titlepage dl .inline dd:after {
   display: block;
   content: '';
 }
 .fff_titlepage dl .inline dt{
   display: inline-block;
 }
 .fff_titlepage dd { margin-left: 0.75em; }
 .fff_titlepage dl, .fff_titlepage dt { margin: 0; }
culytera is offline   Reply With Quote