View Single Post
Old 07-26-2023, 12:22 PM   #8736
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
- AO3: Add subscribed, markedforlater
This intrigued me, so I thought "why not add that little bit of info in my title page?" Turns out it wasn't as simple as I thought but it was a fun experiment!

I was having trouble trying to understand the logic for my replace_metadata, and it turns out when a fic isn't subscribed the value is null, but if it's not bookmarked, the value is false. Also I tried to do these tests with the test stories, but it didn't work on them so I must have done something wrong, worked with actual stories at least.

My test results with actual stories. They look pretty nice on MapleRead too.

The code:
Spoiler:
Code:
add_to_extra_valid_entries:,icon_bookmarked,icon_subscribed,icons
include_in_icon_bookmarked:bookmarked
include_in_icon_subscribed:subscribed
include_in_icons:icon_bookmarked,icon_subscribed
keep_in_order_icons:true

 icon_bookmarked=>True=>Bookmarked
 icon_subscribed=>True=>Subscribed
 icon_bookmarked=>False=>Not Bookmarked
 icon_subscribed=>False=>Not Subscribed
 icons_LIST=>^(Bookmarked\,\s?Subscribed)$=>🔖 ⨯ 🔔
 icons_LIST=>^(Not Bookmarked)$=>⨯
 icons_LIST=>^(Not Bookmarked\,\s?Subscribed)$=>🔔
 icons_LIST=>^(Bookmarked)$=>🔖

add_to_output_css:
 .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;
 }

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">
culytera is offline   Reply With Quote