small fix for book recommendations
This commit is contained in:
parent
70ef6f8651
commit
07a89c8f7a
@ -18,6 +18,9 @@ def getentries():
|
|||||||
def getlatestevent():
|
def getlatestevent():
|
||||||
for entry in feed.entries:
|
for entry in feed.entries:
|
||||||
if "readrepair" in entry.category:
|
if "readrepair" in entry.category:
|
||||||
|
entry[entry.title] = []
|
||||||
|
entrylist = entry[entry.title]
|
||||||
|
entrylist.append(entry.description)
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
|
|
||||||
@ -32,9 +35,9 @@ def gettitles():
|
|||||||
def rabbithole(entry):
|
def rabbithole(entry):
|
||||||
pubtitles = {}
|
pubtitles = {}
|
||||||
fieldsofinterest = getfieldsofinterest()
|
fieldsofinterest = getfieldsofinterest()
|
||||||
categories = [t.get('term') for t in entry.tags]
|
categories = [t.get('term').lower() for t in entry.tags]
|
||||||
for id, fields in fieldsofinterest.items():
|
for id, fields in fieldsofinterest.items():
|
||||||
if [f for f in fields if(f.lower().strip() in categories.lower())]:
|
if [f for f in fields if(f.strip().lower() in categories)]:
|
||||||
# print("book found")
|
# print("book found")
|
||||||
publicationinfo = getfullpublication(id)
|
publicationinfo = getfullpublication(id)
|
||||||
fulltitle = "{0} - {1}".format(
|
fulltitle = "{0} - {1}".format(
|
||||||
|
Loading…
Reference in New Issue
Block a user