Commit b6fccbd4 authored by Murat L's avatar Murat L Committed by Ozzie Isaacs

Added Google Books and Kobo links (#189)

* Added Google Books and Kobo links

* International link to google
parent 4259aa69
...@@ -81,6 +81,10 @@ class Identifiers(Base): ...@@ -81,6 +81,10 @@ class Identifiers(Base):
return u"DOI" return u"DOI"
elif self.type == "goodreads": elif self.type == "goodreads":
return u"Goodreads" return u"Goodreads"
elif self.type == "google":
return u"Google Books"
elif self.type == "kobo":
return u"Kobo"
else: else:
return self.type return self.type
...@@ -95,6 +99,10 @@ class Identifiers(Base): ...@@ -95,6 +99,10 @@ class Identifiers(Base):
return u"http://www.goodreads.com/book/show/{0}".format(self.val) return u"http://www.goodreads.com/book/show/{0}".format(self.val)
elif self.type == "douban": elif self.type == "douban":
return u"https://book.douban.com/subject/{0}".format(self.val) return u"https://book.douban.com/subject/{0}".format(self.val)
elif self.type == "google":
return u"https://books.google.com/books?id={0}".format(self.val)
elif self.type == "kobo":
return u"https://www.kobo.com/ebook/{0}".format(self.val)
else: else:
return u"" return u""
...@@ -353,4 +361,4 @@ def setup_db(): ...@@ -353,4 +361,4 @@ def setup_db():
Session = sessionmaker() Session = sessionmaker()
Session.configure(bind=engine) Session.configure(bind=engine)
session = Session() session = Session()
return True return True
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment