def GetBookContentFromGutenbergSpiergel(title): content = Library.BookContent() content.Chapters = [] bookId = _getGutenbergSpiegelBookId(title) if bookId == None: return None pages = _getGutenbergSpiegelPages(bookId) content.Chapters = _getGutenbergSpiegelChapters(pages) return content
def GetBookContentFromLoweread(title): content = Library.BookContent() content.Chapters = [] bookId = _getLowereadBookId(title) if bookId == None: return None pages = _getLowereadBookPages(bookId) content.Chapters = _getLowereadBookChapters(pages) return content
def GetBookContentFromReadcentral(title): content = Library.BookContent() content.Chapters = [] path = _getPathToReadcentralBook(title) if path == None: return None chapterPaths = _getReadCentraChapterPaths(path) for p in chapterPaths: chapter = _getReadcentralBookChapter(p) if len(chapter.Paragraphs) != 0: content.Chapters.append(chapter) return content