From b6fccbd486e4436704f669cf59bd5a13cbecbac5 Mon Sep 17 00:00:00 2001 From: Murat L Date: Thu, 27 Apr 2017 16:32:30 +0300 Subject: [PATCH] Added Google Books and Kobo links (#189) * Added Google Books and Kobo links * International link to google --- cps/db.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cps/db.py b/cps/db.py index dbb01237..704789b6 100755 --- a/cps/db.py +++ b/cps/db.py @@ -81,6 +81,10 @@ class Identifiers(Base): return u"DOI" elif self.type == "goodreads": return u"Goodreads" + elif self.type == "google": + return u"Google Books" + elif self.type == "kobo": + return u"Kobo" else: return self.type @@ -95,6 +99,10 @@ class Identifiers(Base): return u"http://www.goodreads.com/book/show/{0}".format(self.val) elif self.type == "douban": 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: return u"" @@ -353,4 +361,4 @@ def setup_db(): Session = sessionmaker() Session.configure(bind=engine) session = Session() - return True \ No newline at end of file + return True