mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 04:23:01 +02:00
Add 'publisher' metadata as a copy of 'site' and use to fill Publisher in Calibre.
This commit is contained in:
parent
ab6684c1ad
commit
dffb4d3168
7 changed files with 271 additions and 250 deletions
|
|
@ -1257,6 +1257,7 @@ permitted_values = {
|
|||
'numChapters',
|
||||
'numWords',
|
||||
'site',
|
||||
'publisher',
|
||||
'storyId',
|
||||
'authorId',
|
||||
'extratags',
|
||||
|
|
@ -1293,6 +1294,7 @@ titleLabels = {
|
|||
'numChapters':_('Chapters'),
|
||||
'numWords':_('Words'),
|
||||
'site':_('Site'),
|
||||
'publisher':_('Publisher'),
|
||||
'storyId':_('Story ID'),
|
||||
'authorId':_('Author ID'),
|
||||
'extratags':_('Extra Tags'),
|
||||
|
|
|
|||
|
|
@ -1214,7 +1214,7 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
|
||||
book['title'] = story.getMetadata("title", removeallentities=True)
|
||||
book['author_sort'] = book['author'] = story.getList("author", removeallentities=True)
|
||||
book['publisher'] = story.getMetadata("site")
|
||||
book['publisher'] = story.getMetadata("publisher")
|
||||
book['url'] = story.getMetadata("storyUrl")
|
||||
book['tags'] = story.getSubjectTags(removeallentities=True)
|
||||
book['comments'] = story.get_sanitized_description()
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
|
|||
|
||||
book['title'] = story.getMetadata("title", removeallentities=True)
|
||||
book['author_sort'] = book['author'] = story.getList("author", removeallentities=True)
|
||||
book['publisher'] = story.getMetadata("site")
|
||||
book['publisher'] = story.getMetadata("publisher")
|
||||
book['url'] = story.getMetadata("storyUrl")
|
||||
book['tags'] = story.getSubjectTags(removeallentities=True)
|
||||
book['comments'] = story.get_sanitized_description()
|
||||
|
|
|
|||
|
|
@ -87,6 +87,14 @@ extratags_label:Extra Tags
|
|||
## The version of fanficdownloader
|
||||
version_label:Downloader Version
|
||||
|
||||
## The metadata entry 'site' predates Calibre integration, and was
|
||||
## later labeled Publisher and used to fill Calibre's Publisher field.
|
||||
## Because users keep expecting it to be 'publisher' instead,
|
||||
## 'publisher' is now a copy of 'site' and the Calibre plugin now uses
|
||||
## 'publisher' instead. Default titlepage_entries are also changed.
|
||||
include_in_publisher:site
|
||||
publisher_label:Publisher
|
||||
|
||||
## 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 %%.
|
||||
|
|
@ -99,7 +107,7 @@ dateUpdated_format:%%Y-%%m-%%d
|
|||
## You can include extra text or HTML that will be included as-is in
|
||||
## the title page. Eg: titlepage_entries: ...,<br />,summary,<br />,...
|
||||
## All current formats already include title and author.
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,publisher,description
|
||||
|
||||
## Try to collect series name and number of this story in series.
|
||||
## Some sites (ab)use 'series' for reading lists and personal
|
||||
|
|
@ -757,8 +765,6 @@ include_tocpage: false
|
|||
## dateUpdated,numChapters,numWords at a minimum) will be shown.
|
||||
## Great for tracking when chapters came out and when the description,
|
||||
## etc changed.
|
||||
## Plugin will now preserve the log page when the epub is overwritten,
|
||||
## too.
|
||||
include_logpage: false
|
||||
## If set to 'smart', logpage will only be included if the story is
|
||||
## status:In-Progress or already had a logpage. That way you don't
|
||||
|
|
@ -949,7 +955,7 @@ output_css:
|
|||
keep_summary_html:false
|
||||
|
||||
## Add URLs since there aren't links.
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,storyUrl, authorUrl, description
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,publisher,storyUrl, authorUrl, description
|
||||
|
||||
## Width to word wrap text output. 0 indicates no wrapping.
|
||||
wrap_width: 78
|
||||
|
|
@ -1015,7 +1021,7 @@ extratags: FanFiction,Testing,HTML
|
|||
valid_entries:title,author_list,authorId_list,authorUrl_list,storyUrl,
|
||||
datePublished,dateUpdated,numWords,status,language,series,seriesUrl,
|
||||
rating,category_list,genre_list,warnings_list,characters_list,ships_list,
|
||||
description,site,extratags
|
||||
description,publisher,extratags
|
||||
|
||||
# {{storyId}} is a special case--it's the only one that works.
|
||||
title:Test Story Title {{storyId}}
|
||||
|
|
@ -1493,7 +1499,7 @@ logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords,stat
|
|||
## All current formats already include title and author.
|
||||
## Don't include numChapters since all stories are a single "chapter", there's
|
||||
## no way to reliably find the next chapter
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numWords,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numWords,publisher,description
|
||||
|
||||
## Extra metadata that this adapter knows about. See [archiveofourown.org]
|
||||
## for examples of how to use them.
|
||||
|
|
@ -2352,6 +2358,9 @@ extra_valid_entries:native_status
|
|||
## Site dedicated to these categories/characters/ships
|
||||
extracategories:Harry Potter
|
||||
|
||||
## fictionally.org storyIds are not unique. Combine with authorId.
|
||||
output_filename: ${title}-${siteabbrev}_${authorId}_${storyId}${formatext}
|
||||
|
||||
## fictionalley.org doesn't have a status metadatum. If uncommented,
|
||||
## this will be used for status.
|
||||
#default_value_status:Unknown
|
||||
|
|
@ -2815,14 +2824,14 @@ website_encodings:Windows-1252,utf8
|
|||
[www.squidge.org/peja:txt]
|
||||
## Add URLs since there aren't links and remove numWords --
|
||||
## www.squidge.org/peja word counts are inaccurate
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,storyUrl, authorUrl, description
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,publisher,storyUrl, authorUrl, description
|
||||
|
||||
[www.squidge.org/peja]
|
||||
## www.squidge.org/peja calls it Fandom <shrug>
|
||||
category_label:Fandom
|
||||
|
||||
## Remove numWords -- www.squidge.org/peja word counts are inaccurate
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,publisher,description
|
||||
|
||||
[www.starskyhutcharchive.net]
|
||||
## Some sites do not require a login, but do require the user to
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -115,6 +115,7 @@ titleLabels = {
|
|||
'numWords':'Words',
|
||||
'words_added':'Words Added', # logpage only
|
||||
'site':'Site',
|
||||
'publisher':'Publisher',
|
||||
'storyId':'Story ID',
|
||||
'authorId':'Author ID',
|
||||
'extratags':'Extra Tags',
|
||||
|
|
@ -296,6 +297,7 @@ def get_valid_scalar_entries():
|
|||
'numWords',
|
||||
'words_added', # logpage only.
|
||||
'site',
|
||||
'publisher',
|
||||
'storyId',
|
||||
'title',
|
||||
'titleHTML',
|
||||
|
|
|
|||
|
|
@ -87,6 +87,14 @@ extratags_label:Extra Tags
|
|||
## The version of fanficdownloader
|
||||
version_label:Downloader Version
|
||||
|
||||
## The metadata entry 'site' predates Calibre integration, and was
|
||||
## later labeled Publisher and used to fill Calibre's Publisher field.
|
||||
## Because users keep expecting it to be 'publisher' instead,
|
||||
## 'publisher' is now a copy of 'site' and the Calibre plugin now uses
|
||||
## 'publisher' instead. Default titlepage_entries are also changed.
|
||||
include_in_publisher:site
|
||||
publisher_label:Publisher
|
||||
|
||||
## 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 %%.
|
||||
|
|
@ -99,7 +107,7 @@ dateUpdated_format:%%Y-%%m-%%d
|
|||
## You can include extra text or HTML that will be included as-is in
|
||||
## the title page. Eg: titlepage_entries: ...,<br />,summary,<br />,...
|
||||
## All current formats already include title and author.
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,publisher,description
|
||||
|
||||
## Try to collect series name and number of this story in series.
|
||||
## Some sites (ab)use 'series' for reading lists and personal
|
||||
|
|
@ -983,7 +991,7 @@ output_css:
|
|||
keep_summary_html:false
|
||||
|
||||
## Add URLs since there aren't links.
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,storyUrl, authorUrl, description
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,publisher,storyUrl, authorUrl, description
|
||||
|
||||
## Width to word wrap text output. 0 indicates no wrapping.
|
||||
wrap_width: 78
|
||||
|
|
@ -1049,7 +1057,7 @@ extratags: FanFiction,Testing,HTML
|
|||
valid_entries:title,author_list,authorId_list,authorUrl_list,storyUrl,
|
||||
datePublished,dateUpdated,numWords,status,language,series,seriesUrl,
|
||||
rating,category_list,genre_list,warnings_list,characters_list,ships_list,
|
||||
description,site,extratags
|
||||
description,publisher,extratags
|
||||
|
||||
# {{storyId}} is a special case--it's the only one that works.
|
||||
title:Test Story Title {{storyId}}
|
||||
|
|
@ -1527,7 +1535,7 @@ logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords,stat
|
|||
## All current formats already include title and author.
|
||||
## Don't include numChapters since all stories are a single "chapter", there's
|
||||
## no way to reliably find the next chapter
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numWords,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numWords,publisher,description
|
||||
|
||||
## Extra metadata that this adapter knows about. See [archiveofourown.org]
|
||||
## for examples of how to use them.
|
||||
|
|
@ -2843,14 +2851,14 @@ website_encodings:Windows-1252,utf8
|
|||
[www.squidge.org/peja:txt]
|
||||
## Add URLs since there aren't links and remove numWords --
|
||||
## www.squidge.org/peja word counts are inaccurate
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,storyUrl, authorUrl, description
|
||||
titlepage_entries: series,seriesUrl,category,genre,language,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,publisher,storyUrl, authorUrl, description
|
||||
|
||||
[www.squidge.org/peja]
|
||||
## www.squidge.org/peja calls it Fandom <shrug>
|
||||
category_label:Fandom
|
||||
|
||||
## Remove numWords -- www.squidge.org/peja word counts are inaccurate
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,description
|
||||
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,publisher,description
|
||||
|
||||
[www.starskyhutcharchive.net]
|
||||
## Some sites do not require a login, but do require the user to
|
||||
|
|
|
|||
Loading…
Reference in a new issue