Calibre Plugin: AO3, kudos, word count, hits, rating

1,181 views
Skip to first unread message

p_s

unread,
Feb 16, 2018, 2:33:20 AM2/16/18
to FanFicFare -- Downloader for FanFiction
So I have been trying to figure out how to scrape data and I am struggling to figure out how to get the word count, hits, kudos and content rating from AO3 into custom columns on calibre. 

Column Name: Kudos
Lookup Name: #kudos
Column Name: Hits 
Lookup Name: #hits 
Column Name: Content Rating
Lookup Name: #content_rating
Column Name: Words
Lookup Name: #words

I mostly download completed fic and I only want the kudos and hits when I download to show up in any case. So, the fact that the kudos change doesn't bother me as I don't need it to be something that is live.

How do I code this in my personal.ini so that I can get this data? The code I have doesn't seem to work. It works for the friend who gave it to me, but it doesn't work for me and I don't know why. 

Jim Miller

unread,
Feb 16, 2018, 11:34:07 AM2/16/18
to fanfic-d...@googlegroups.com
On 2/16/2018 1:33 AM, p_s wrote:
> So I have been trying to figure out how to scrape data and I am
> struggling to figure out how to get the word count, hits, kudos and
> content rating from AO3 into custom columns on calibre.

Assuming you've already created the appropriate columns you referenced:

Word count and rating are 'standard' metadata entries available for most
sites. They can be set on the 'Custom Columns' tab of FanFicFare
config. That will effect all sites.

For the AO3 site-specific hits & kudos, you need to turn on the 'Allow
custom_columns_settings' checkbox on the 'Custom Columns' tab of FFF
config. You can then go into the personal.ini tab of FFF config and add
custom_columns_settings settings under the [archiveofourown.org] section
(which you may have to add if you don't already have one). Note the
space at the beginning of each line under custom_columns_settings.

[archiveofourown.org]
add_to_custom_columns_settings:
kudos=>#kudos
hits=>#hits

The documentation for custom_columns_settings is here:>
https://github.com/JimmXinu/FanFicFare/blob/master/calibre-plugin/plugin-defaults.ini#L266

'add_to_' is in case you already have a custom_columns_settings under
[defaults]. For a full explanation, see:
> https://github.com/JimmXinu/FanFicFare/wiki/INI-File#add_to_keyword

There's been a ton of discussion on custom columns in past in the plugin
forum. The forum search doesn't want to find them, but this does:

> https://www.google.com/search?q=site%3Amobileread.com+"custom_columns_settings"
Forum: https://www.mobileread.com/forums/showthread.php?t=259221

Jim
Message has been deleted
Message has been deleted

Jim Miller

unread,
Feb 16, 2018, 2:20:50 PM2/16/18
to fanfic-d...@googlegroups.com

Assuming you have the columns correctly created and the FFF setting
correct, the only other thing I can think of is, if you didn't run the
FFF download again. Use 'Update Calibre Metadata from Web Site' mode.

(Or 'Update Calibre Metadata from Saved Metadata Column' mode if you
previously setup the saved metadata column before your last download. I
recommend using saved metadata column for anyone who's planning to ever
add more metadata columns. Hint-hint.)

On 2/16/2018 12:58 PM, p_s wrote:
>
> It is still not populating. The word count and rating are also not
> populating.
>
> I'm not sure how to make it work.

p_s

unread,
Feb 16, 2018, 2:43:18 PM2/16/18
to FanFicFare -- Downloader for FanFiction
I fixed the word count and rating. They are populating.

The Kudos and Hits not so much. I don't know where my tweak is going wrong. 

Jim Miller

unread,
Feb 16, 2018, 4:14:37 PM2/16/18
to fanfic-d...@googlegroups.com

I've given you what advice I can:

- Make sure columns are created and are named correctly
- Check 'Allow custom_columns_settings' checkbox on Custom Columns tab
- Add custom_columns_settings or add_to_custom_columns_settings to
personal.ini
- Make sure you have leading spaces in the custom_columns_settings lines
- Run download to update

That's all I can tell you with only "it doesn't work" to go on.

Tanvi Damani

unread,
Feb 17, 2018, 2:22:44 PM2/17/18
to fanfic-d...@googlegroups.com
Where can I find the:  'Update Calibre Metadata from Saved Metadata Column'

Tanvi Damani

--
Project Home: https://github.com/JimmXinu/FanFicFare/wiki
--- You received this message because you are subscribed to a topic in the Google Groups "FanFicFare -- Downloader for FanFiction" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fanfic-downloader/GCJysN9sqhs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fanfic-downloader+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/fanfic-downloader.
To view this discussion on the web visit https://groups.google.com/d/msgid/fanfic-downloader/bb195b03-af1b-9bae-f2ec-32fdccba7436%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Jim Miller

unread,
Feb 17, 2018, 2:48:33 PM2/17/18
to fanfic-d...@googlegroups.com
On 2/17/2018 1:22 PM, Tanvi Damani wrote:
> Where can I find the: 'Update Calibre Metadata from Saved Metadata Column'

That's one of the "If Story Already Exists" options. But it only
appears if you have a 'Saved Metadata Column' configured at the bottom
of the 'Custom Columns' tab in FFF config.

Jim Trigg

unread,
Feb 18, 2018, 1:03:26 AM2/18/18
to fanfic-d...@googlegroups.com
Where do we find documentation about a Saved Metadata Column? What type sites it need to be?

Thanks,
Jim Trigg
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Jim Miller

unread,
Feb 18, 2018, 10:40:49 AM2/18/18
to fanfic-d...@googlegroups.com
On 2/18/2018 12:03 AM, Jim Trigg wrote:
> Where do we find documentation about a Saved Metadata Column? What type
> sites it need to be?

I don't think it's documented beyond the tooltips and the announcement
from when it was released:

> Save / Reuse Metadata
>
> Add feature to optionally save all FanFicFare metadata to a custom column.
> Add related feature to update Calibre metadata from saved custom column, when configured.
>
> Near the bottom of the Custom Column tab in FanFicFare config, look for Saved Metadata Column. Can only be used with 'Long Text' custom columns.
>
> I figure the primary use case for this is people who are making changes to their Calibre columns and replace_metadata. Rather than hitting the site servers repeatedly as they update and test, they can update from data already in the library.

https://www.mobileread.com/forums/showthread.php?p=3101398#post3101398
Reply all
Reply to author
Forward
0 new messages