示例#1
0
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
示例#2
0
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
示例#3
0
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