Zealot
Posts: 130
Karma: 295674
Join Date: Jul 2021
Device: iPhone
|
Sharing my current personal.ini (some lines removed since they were too specific to the fandoms I download from) and how the epub looks with my setup. I'm not sure how these settings will handle anthologies. I only download from Ao3 so I can't help with other sites.
personal.ini
[defaults] section
Spoiler:
Code:
[defaults]
always_login:true
## Date formats used by FanFicFare. Published and Update don't have time.
## See http://docs.python.org/library/datetime.html#strftime-strptime-behavior
## Note that ini format requires % to be escaped as %%.
datePublished_format:%%B %%d, %%Y
dateUpdated_format:%%B %%d, %%Y
category_label:Fandom
chapterslashtotal_label:Chapters
additional_characters_label:Additional Characters
dateRange_label:Date
add_to_extra_valid_entries:,additional_characters,dateRange,icon_bookmarked,icon_subscribed,icons,prefix_category,prefix_rating,prefix_ships,prefix_status,prefix_wordcount
include_in_additional_characters:characters
include_in_prefix_ships:ships
include_in_prefix_category:category
include_in_prefix_rating:rating
include_in_prefix_status:status
include_in_prefix_wordcount:numWords
include_in_dateRange:datePublished,dateUpdated
include_in_icons:icon_bookmarked,rating,icon_subscribed
keep_in_order_category:true
keep_in_order_characters:true
keep_in_order_fandoms:true
keep_in_order_genre:true
keep_in_order_ships:true
keep_in_order_additional_characters:true
keep_in_order_dateRange:true
keep_in_order_icons:true
keep_in_order_prefix_category:true
keep_in_order_prefix_ships:true
add_to_output_css:
body {
text-align: left;
font-family: 'Noto Sans', sans-serif;
}
body.fff_titlepage {
font-size: 2.5vmax;
font-family: 'Roboto', sans-serif;
}
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-family: 'Roboto', sans-serif;
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; }
@media only screen and (max-device-width: 480px),
only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
body.fff_titlepage { font-size: inherit; }
}
exclude_metadata_pre:
category=~(.*) - Fandom
additional_characters=~(Original|Various) Character\(?s?\)?
freeformtags,genre==Other Additional Tags to Be Added
warnings==Creator Chose Not To Use Archive Warnings
warnings==No Archive Warnings Apply
## Exclude all entries that don't have / or &
ships,prefix_ships!~(.*)(\/| & )(.*)
## Exclude friendships in the ship tag
## remove this if you still want to see them
ships,prefix_ships=~(.*) & (.*)
## Exclude ship tags that are "implied/mentioned"
prefix_ships=~^(.*)\(?(implied|mentioned)\)?
replace_metadata:
rating=> Audiences=>
category,prefix_category=>No Fandom=>Original Work
category,prefix_category=> \(?(- All Media Types|- Fandom|Movies|Movie [0-9]+|Comics|TV|Video Games?)\)?$=>
## Change / to & if friendship is mentioned
ships=>(.*)[/](.*) \(?[Ff]riendship(?: only)\)?=>\1 & \2
## Remove unnecessary info in character tags to make it cleaner on the titlepage
additional_characters,ships=>(\s\(?(Avatar|Disney|Dragon Age|DCU|DWP|Doctor Who.*|Grey's Anatomy|Once Upon a Time|Resident Evil|Station 19|Supergirl TV 2015)\)?)=>
additional_characters=> - Character=>
additional_characters=> ?\((cameo|briefly|if you squint|sort of)\)=>
additional_characters=> \([Cc]haracter\)=>
additional_characters=>\(mentions of\) =>
category,ships= - Fandom$=>
ships=> - Relationship=>
## Standardize names for consistency
ships,prefix_ships=>(OFC\/OFC)|(Original Female Character\/Original Female Character)=>Original Female Character(s)/Original Female Character(s)
## Prioritize specific Dragon Age/Mass Effect entry
category_LIST=>^(Dragon Age( \(Video Games\))?\, )(Dragon Age(:? (Inquisition|II|Origins)))(\, .*)?=>\3\6
category_LIST=>^(Mass Effect( \(Video Games\))?\, )(Mass Effect(:? (Trilogy|Andromeda)))(\, .*)?=>\3\6
prefix_category_LIST=>^(\[c\] Dragon Age( \(Video Games\))?\, )(\[c\] Dragon Age(:? (Inquisition|II|Origins)))(\, \[c\].*)?=>\3\6
prefix_category_LIST=>^(\[c\] Mass Effect( \(Video Games\))?\, )(\[c\] Mass Effect(:? (Trilogy|Andromeda)))(\, \[c\].*)?=>\3\6
## Make specific Inquisitor/Warden name the main ship instead of generic
ships_LIST,prefix_ships_LIST=>^(.*Inquisitor.*)\, (.*(Adaar|Cadash|Lavellan).*)=>\2
ships_LIST,prefix_ships_LIST=>^(.*(Adaar|Cadash|Lavellan).*)\, (.*Inquisitor.*)=>\1
ships_LIST,prefix_ships_LIST=>^(.*Warden.*)\, (.*(Amell|Brosca|Cousland|Aeducan|Mahariel|Surana|Tabris).*)=>\2
ships_LIST,prefix_ships_LIST=>^(.*(Amell|Brosca|Cousland|Aeducan|Mahariel|Surana|Tabris).*)\, (.*Warden.*)=>\1
## Get first item in list for prefixed tag
## only used with category and ships since they can have multiple entries
prefix_category_LIST=>^(.*?)(\,.*)=>\1
prefix_ships_LIST=>^(.*?)(\,.*)=>\1
## Determine icons to show in title page
icon_bookmarked=>True=>Bookmarked
icon_subscribed=>True=>Subscribed
icon_bookmarked=>False=>Not Bookmarked
icon_subscribed=>False=>Not Subscribed
## Show bookmarked icon, show rating, show subscribed icon
icons_LIST=>^(Bookmarked\, (.*)\, Subscribed)$=> \2
## Don't show bookmarked icon, show rating, don't show subscribed icon
icons_LIST=>^(Not Bookmarked\, (.*)\, Not Subscribed)$=>◈ \2 ◈
## Don't show bookmarked icon, show rating, show subscribed icon
icons_LIST=>^(Not Bookmarked\, (.*)\, Subscribed)$=> \2 ◈
## Show bookmarked icon, show rating, don't show subscribed icon
icons_LIST=>^(Bookmarked\, (.*)\, Not Subscribed)$=> \2 ◈
## Add prefix to tags
prefix_ships=>^(.*)=>[p] \1
prefix_category=>^(.*)=>[c] \1
prefix_rating=>^(.*)=>[r] \1
prefix_status=>^(.*)=>[s] \1
## Get word count grouping
prefix_wordcount=>^(\d+|([0-4],\d{3})*|5,000)$=>[w] 0 - 5000
prefix_wordcount=>^((?!5,000)([5-9],\d{3})*|10,000)$=>[w] 5001 - 10000
prefix_wordcount=>^((?!10,000)(1\d,\d{3})*|20,000)$=>[w] 10001 - 20000
prefix_wordcount=>^((?!20,000)([2-3]\d,\d{3})*|40,000)$=>[w] 20001 - 40000
prefix_wordcount=>^((?!40,000)([4-7]\d,\d{3})*|80,000)$=>[w] 40001 - 80000
prefix_wordcount=>^((?!80,000)(([8-9]\d)|(\d{3,}))(,\d{3})+)$=>[w] 80000
## Get date range with published date and updated date
## Thanks to JimmXinu for this
## diff dates 1pmonth 2pday 3pyear 4umonth 5uday 6uyear
dateRange_LIST=>([^\s]+)\s+(\d{1,2})\,\s+(\d{4})\,\s([^\s]+)\s+(\d{1,2})\,\s+(\d{4})=>\1 \2, \3-\4 \5, \6
## same year 1 2 3 4 5
dateRange_LIST=>([^\s]+)\s+(\d{1,2})\,\s+(\d{4})-([^\s]+)\s+(\d{1,2})\,\s+\3=>\1 \2-\4 \5, \3
## same month 1 2 3 4
dateRange_LIST=>([^\s]+)\s+(\d{1,2})-\1\s+(\d{1,2})\,\s+(\d{4})=>\1 \2-\3, \4
## don't need regexp for date day, handled by de-dup.
exclude_metadata_post:
## Removes the character in additional_characters metadata if they are already included in ships metadata
additional_characters=~Char A&&ships=~Char A
add_to_custom_columns_settings:
additional_characters=>#additional_characters
bookmarked=>#work_bookmarked
subscribed=>#work_subscribed
chapterslashtotal=>#chapters
dateRange=>#date_range
freeformtags=>#additional_tags
## first ship, first category, rating, status, word count - all prefixed in Calibre's tags
include_subject_tags:prefix_ships_LIST,prefix_category_LIST,prefix_rating,prefix_status,prefix_wordcount
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"/>
</head>
<body class="fff_titlepage">
<div class="title">
<h1><a href="${storyUrl}">${title}</a> by ${authorHTML}</h1>
</div>
<div class="hr-sect">${icons}</div>
<dl class="tags">
## ${id}, ${label}, ${value}
titlepage_entry:
<dt><b>${label}:</b></dt> <dd>${value}</dd>
## ${id}, ${label}, ${value}
## Used with entries listed in wide_titlepage_entries, typically description, storyUrl, authorUrl
titlepage_wide_entry:
## When using tables, make these span both columns.
wide_titlepage_entries:
## ${id}, ${value}
## For example, if you've set description_label:
## (that is, nothing)
titlepage_no_title_entry:
## metadata
titlepage_end:
## <dl class="stats">
## </dl>
</dl>
<div class="hr-sect">${numWords} ◈ ${chapterslashtotal}</div>
<div class="tag-summary-content">${description}</div>
</body>
</html>
[test1] section for test stories
Spoiler:
Code:
[test1.com]
add_to_extra_valid_entries:,additional_characters,ships_all,prefix_category,prefix_ships,icons,icon_bookmarked,icon_subscribed,dateRange,chapterslashtotal
include_in_ships_all:ships
keep_in_order_ships_all:true
additional_characters_label:Characters After Filtering
characters_label:All Characters
dateRange_label:Date
icon_bookmarked_label:Bookmarked
icon_subscribed_label:Subscribed
prefix_category_label:Prefix Category
prefix_ships_label:Prefix Ships
ships_all_label:All Ships
ships_label:Ships After Filtering
titlepage_entries:<div class="inline">,seriesHTML,category,warnings,</div>,ships_all,characters,ships,additional_characters.SHOW_EMPTY,<div class="inline">,dateRange,</div>
add_to_output_css:
body.fff_titlepage {
background-color: #1B1B1B;
color: white;
}
[teststory] section for additional tests
Spoiler:
Code:
[teststory:defaults]
## http://test1.com?sid=12345
add_to_valid_entries:,icon_bookmarked,icon_subscribed,dateRange,chapterslashtotal,rating
title:{{storyId}} General
author_list:{{storyId}}
category_list:Category 1,Category 2,Category 3
characters_list:Char A,Char B,Char C,Char D,Char E
ships_list:Char A/Char B,Original Female Character/Original Female Character,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
icon_bookmarked:Bookmarked
icon_subscribed:Subscribed
description:<p>Show all categories, ships, characters (with and without prefix). Show bookmarked and subscribed icons at the top horizontal line if true. Show main ship and category.</p><p>Prioritize more specific categories for Dragon Age and Mass Effect.</p>
chapterslashtotal:1/1
datePublished:2023-1-1
dateUpdated:2023-1-1
numWords:13546
Rating:General
status:Completed
[teststory:10001]
## http://test1.com?sid=10001
title:{{storyId}} Entry with specified Inquisitor as main ship
category_list:Dragon Age: Inquisition, Dragon Age - All Media Types
icon_bookmarked:Bookmarked
icon_subscribed:Not Subscribed
ships_list:Female Inquisitor/Vivienne, Female Adaar/Vivienne
characters_list:Female Inquisitor,Vivienne,Female Adaar
chapterslashtotal:1/2
datePublished:2023-1-1
dateUpdated:2023-1-10
numWords:1132
status:In-Progress
Rating:Explicit
[epub], [archiveofourown.org], [overrides] section
Spoiler:
Code:
[epub]
include_images:true
make_firstimage_cover:false
jpg_quality:100
convert_images_to:png
remove_transparency: false
no_image_processing: true
[archiveofourown.org]
use_view_full_work:true
include_in_genre:
## originally had freeformtags, ao3categories
include_in_icon_bookmarked:bookmarked
include_in_icon_subscribed:subscribed
freeformtags_label:Additional Tags
freefromtags_label:Additional Tags
ao3categories_label:Category
keep_in_order_ao3categories:true
keep_in_order_freeformtags:true
## The basic pattern used when not using add_chapter_numbers or
## mark_new_chapters
chapter_title_def_pattern:${title}
## Pattern used with add_chapter_numbers, but not mark_new_chapters
chapter_title_add_pattern:${number}. ${title} ◈ ${date}
## Pattern used with mark_new_chapters, but not add_chapter_numbers
## (new) is just text and can be changed.
chapter_title_new_pattern:${title} ◈ ${date} | (NEW)
## Pattern used with add_chapter_numbers and mark_new_chapters
## (new) is just text and can be changed.
chapter_title_addnew_pattern:${number}. ${title} ◈ ${date} | (NEW)
## extra tags (comma separated) to include, primarily for epub.
extratags:
titlepage_entries:<div class="inline">,seriesHTML,category,warnings,</div>,ships,additional_characters,freeformtags,<div class="inline">,dateRange,</div>
add_to_output_css:
body.fff_titlepage {
background-color: #980101;
color: white;
}
[overrides]
use_basic_cache:true
is_adult:true
strip_chapter_numbers:true
add_chapter_numbers:true
mark_new_chapters:latestonly
replace_xbr_with_hr:3
replace_hr:false
replace_br_with_p:true
keep_empty_tags:p,td,th
Custom columns:
Spoiler:
#additional_characters: long text, like comments, not shown in the Tag browser
#additional_tags: long text, like comments, not shown in the Tag browser
#category_all: Text, columm shown in the Tag browser
#category_first: Column built from other columns, behaves like tags (template: {#category_all:list_item(0,\,)} )
#chapters: Long text, like comments, not shown in the Tag browser
#date_range: Long text, like comments, not shown in the Tag browser
#ship_all: Text, columm shown in the Tag browser
#ship_first: Column built from other columns, behaves like tags (template: {#ship_all:list_item(0,\,)} )
#wordcount: Column built from other columns, behaves like tags (template: program: getWordCountGroup() )
#metadata: Long text, like comments, not shown in the Tag browser (used for "Update Calibre Metadata from Saved Metadata Column" update mode)
#wordcount template function getWordCountGroup (based on ownedbycats' template):
Code:
program:
getWordCount = field('#words');
wordCount = re(getWordCount, '[,]', '');
first_non_empty(
cmp(wordCount, 5000, 'Less than 5000', '', ''),
cmp(wordCount, 10000, 'Less than 10000', '', ''),
cmp(wordCount, 20000, 'Less than 20000', '', ''),
cmp(wordCount, 40000, 'Less than 40000', '', ''),
cmp(wordCount, 80000, 'Less than 80000', '', ''),
'Over 80000'
);
Generate Cover
Utilizes the category_first/ship_first custom columns.
These two are up to your preference, but if you want to fit the text properly, probably best to make the cover size large.
- Font sizes: 100+
- Cover size: 2000+ width x 2000+ height
Field order (image is unchecked, it pushes down author and custom text):
- Title
- Series
- Image
- Author
- Custom text
Custom text field:
Code:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
{#category_first}{#ship_first:|\n|}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
{#audience} • {#words} • {#chapters}
{#date_range}
Series text field:
Code:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯<br>{series}<br>❖ Book {series_index} ❖<br>⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Last edited by culytera; 10-04-2023 at 02:10 AM.
Reason: Added exclude_metadata_post in [defaults] for removing redundant characters already mentioned in ships
|