forked from varia/varia.website
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.1 KiB
2.1 KiB
Goodreads Activity
A Pelican plugin to lists books from your Goodreads shelves.
Copyright (c) Talha Mansoor
Author | Talha Mansoor |
---|---|
Author Email | talha131@gmail.com |
Author Homepage | http://onCrashReboot.com |
Github Account | https://github.com/talha131 |
Credits
This plugin is inspired by Marco Milanesi kpanic@gnufunk.org Github activity plugin.
Requirements
goodreads_activity
requires feedparser.
pip install feedparser
How to Use
Important Unlike Marco's Github activity plugin, this plugin returns a dictionary composed of the books in your Goodreads shelf and their details.
To enable it, set GOODREADS_ACTIVITY_FEED
in your pelican config file. It should point to the activity feed of your bookshelf.
To find your self's activity feed,
- Open Goodreads homepage and login
- Click on My Books in the top navigational bar
- Select the bookshelf you are interested in from the left hand column
- Look for RSS link in the footer. Copy it's link.
Here is an example feed of currently-reading shelf,
GOODREADS_ACTIVITY_FEED='http://www.goodreads.com/review/list_rss/8028663?key=b025l3000336epw1pix047e853agggannc9932ed&shelf=currently-reading'
You can access the goodreads_activity
in your Jinja2 template. goodreads_activity
is a dictionary. Its valid keys are
shelf_title
it has the title of your shelfbooks
it is an array of book dictionary
Valid keys for book
dictionary are
title
author
link
link to your book reviewl_cover
large coverm_cover
medium covers_cover
small coverdescription
rating
review
tags
Template Example
{% if GOODREADS_ACTIVITY_FEED %}
<h2>{{ goodreads_activity.shelf_title }}</h2>
{% for book in goodreads_activity.books %}
<img src="{{book.s_cover}}"/>
<header>{{book.title}}<small> by {{book.author}}</small></header>
<article>{{book.description|truncate(end='')}}
<a href={{book.link}} target="_blank">...more</a></article>
{% endfor %}
{% endif %}