Add tag for content rating

172 views
Skip to first unread message

Jim Trigg

unread,
Jan 19, 2018, 11:59:44 PM1/19/18
to FanFicFare -- Downloader for FanFiction
I would like to add a tag for content rating (and use replace_metadata to normalize it, since no two sites seem to use quite the same content rating scheme...) What do I do to add "Rating:$content_rating" as a tag? (Once it's there I can handle replacing, for example, "Rating:Explicit" with "Rating:FR21" for a given site.) I'm specifically working with the plug-in, though I might want to start using the CLI at some point.

Thanks,
Jim Trigg

Ealdwulf

unread,
Feb 11, 2018, 2:03:00 PM2/11/18
to FanFicFare -- Downloader for FanFiction
I've actually been doing that for the last couple of weeks.  the normalizing that is... well ratings, categories, and character names..

start with a custom column that the rating is put into and have FFF plug-in put the rating there.  I called mine agerange

Custom column example:
Lookup Name:  agerange
Column Heading:  Age Range
Column Type:  Comma separated text, like tags, shown in the Tag browser

Plug-In instructions:
select to configure the plug-in
go to custom column tab
set the name of the column to Rating using the drop down list


not sure of how much of those two parts you needed but figured it couldn't hurt to put them there

Then you can put this in the [Defaults] section of the personal.ini (I have it just before the websites start listing):

add_to_replace_metadata:
 rating
=>^15$=>PG-13
 rating
=>^Adult Only$=>NC-17
 rating
=>^Everyone$=>G
 rating
=>^Explicit$=>NC-17
 rating
=>^FR7$=>G
 rating
=>^FR13$=>PG
 rating
=>^FR15$=>PG-13
 rating
=>^FR18$=>R
 rating
=>^FR21$=>NC-17
 rating
=>^G - General Audiences$=>G
 rating
=>^General Audiences$=>G
 rating
=>^K$=>G
 rating
=>^K\+$=>PG
 rating
=>^M$=>R
 rating
=>^Mature$=>R
 rating
=>^NC-17 - No One 17 and Under Admitted$=>NC-17
 rating
=>^Not Rated$=>Unrated
 rating
=>^PG - Parental Guidance Suggested$=>PG
 rating
=>^PG-13 - Parents Strongly Cautioned$=>PG-13
 rating
=>^R - Restricted$=>R
 rating
=>^T$=>PG-13
 rating
=>^Teen And Up Audiences$=>PG-13
 rating
=>^Teens \+$=>PG-13
 rating
=>^Teens$=>PG-13
 rating
=>^Young Teens$=>PG
 rating
=>^X - Adult: No readers under 18\. Contains Graphic Adult Themes/Extreme violence\.$=>NC-17


that covers most of what I have found and normalizes them to MPAA ratings:  G, PG, PG-13, R, NC-17, and Unrated.  Obviously edit and change, or add, what you want/need and it will normalize the ratings as you download/update fanfics so you don't have to do it manually.  :)

there are some sites that do not include a rating so I have been trying to figure out how to get them to identify as Unrated but haven't gotten this figured out yet.  If anyone knows how to do that it would help.

Jim Trigg

unread,
Feb 23, 2018, 9:09:25 PM2/23/18
to fanfic-d...@googlegroups.com
On 02/11/2018 02:03 PM, Ealdwulf wrote:
> Then you can put this in the [Defaults] section of the personal.ini (I
> have it just before the websites start listing):
>
> add_to_replace_metadata:
>  rating=>^15$=>PG-13
>  rating=>^AdultOnly$=>NC-17
>  rating=>^Everyone$=>G
>  rating=>^Explicit$=>NC-17
>  rating=>^FR7$=>G
>  rating=>^FR13$=>PG
>  rating=>^FR15$=>PG-13
>  rating=>^FR18$=>R
>  rating=>^FR21$=>NC-17
>  rating=>^G -GeneralAudiences$=>G
>  rating=>^GeneralAudiences$=>G
>  rating=>^K$=>G
>  rating=>^K\+$=>PG
>  rating=>^M$=>R
>  rating=>^Mature$=>R
>  rating=>^NC-17-NoOne17andUnderAdmitted$=>NC-17
>  rating=>^NotRated$=>Unrated
>  rating=>^PG -ParentalGuidanceSuggested$=>PG
>  rating=>^PG-13-ParentsStronglyCautioned$=>PG-13
>  rating=>^R -Restricted$=>R
>  rating=>^T$=>PG-13
>  rating=>^TeenAndUpAudiences$=>PG-13
>  rating=>^Teens\+$=>PG-13
>  rating=>^Teens$=>PG-13
>  rating=>^YoungTeens$=>PG
>  rating=>^X -Adult:Noreaders under
> 18\.ContainsGraphicAdultThemes/Extremeviolence\.$=>NC-17

Next annoyance - this normalizes the Rating column, but apparently it's
transferred to Tags before it's replaced, and Tags isn't a valid
metadata type. How do I normalize the Ratings in the Tags (which is all
FBReader shows me)?

Thanks,
Jim Trigg

Jim Trigg

unread,
Feb 23, 2018, 9:58:24 PM2/23/18
to fanfic-d...@googlegroups.com
On 02/23/2018 09:09 PM, Jim Trigg wrote:
> Next annoyance - this normalizes the Rating column, but apparently it's
> transferred to Tags before it's replaced, and Tags isn't a valid
> metadata type. How do I normalize the Ratings in the Tags (which is all
> FBReader shows me)?

Added piece of info - I'm normalizing Ratings to FR style (as used on
TTHFanfic). Ratings that are already FR style don't generate "Rating:"
tags but all others do before getting replaced by replace_metadata.

Thanks,
Jim Trigg


Jim Miller

unread,
Feb 24, 2018, 11:06:55 AM2/24/18
to fanfic-d...@googlegroups.com
On 2/23/2018 8:09 PM, Jim Trigg wrote:
> Next annoyance - this normalizes the Rating column, but apparently it's
> transferred to Tags before it's replaced, and Tags isn't a valid
> metadata type. How do I normalize the Ratings in the Tags (which is all
> FBReader shows me)?

Which metadata entries end up in epub dc:subject tags (and Calibre tags)
is controlled by the include_subject_tags setting as previously discussed.

Any replace_metadata that are applied before inclusion in tags. The
only was I can think of *not* to is to create a new value using
extra_valid_entries and define it using: include_in_newname:rating.NOREPL

> Added piece of info - I'm normalizing Ratings to FR style (as used on TTHFanfic). Ratings that are already FR style don't generate "Rating:" tags but all others do before getting replaced by replace_metadata.

I suspect that has to do with which settings are in which section.

Without seeing your actual ini file settings, that's as much help as I
can offer.

Jim

Jim Trigg

unread,
Feb 24, 2018, 7:17:37 PM2/24/18
to fanfic-d...@googlegroups.com
OK, having added "add_to_include_subject_tags:,rating" I get the bare
rating as a tag, and since I'm normalizing ratings to something that
sorts together I don't need the "Rating:" in it.

Apparently I manually added ratings to many fics, and also the "Harry
James Potter" tag I asked about previously (an early attempt at
normalization).

Sorry to bother you so much with artifacts of my own previous mistakes.

Thanks,
Jim Trigg
Reply all
Reply to author
Forward
0 new messages