Talha Mansoor d3495d0249 Update article_generate_context to article_generator_context | 11 gadi atpakaļ | |
---|---|---|
.. | ||
Readme.md | 11 gadi atpakaļ | |
__init__.py | 11 gadi atpakaļ | |
goodreads_activity.py | 11 gadi atpakaļ |
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 |
This plugin is inspired by Marco Milanesi kpanic@gnufunk.org Github activity plugin.
goodreads_activity
requires feedparser.
pip install feedparser
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,
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 dictionaryValid 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
{% 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 %}