コード例 #1
0
ファイル: rattle_cli.py プロジェクト: chebe/rattle_cli
def retrieve_and_sort_books(languages=None, other=False, other_label='default',
                            year=None, details=False):
    session = GoodreadsSession(api_key, api_secret)
    goodreads = Goodreads(session)
    goodreads.initialise_user()

    books = goodreads.get_books()
    arranger = BookArranger(books)

    sorted_books = arranger.sort_by_language(languages, other, other_label,
                                             year)
    arranger.print_sorted_books_nicely(sorted_books, details)
コード例 #2
0
ファイル: rattle_cli.py プロジェクト: jpichon/rattle_cli
def retrieve_and_sort_books(languages=None, other=False, other_label='default',
                            year=None, details=False, shelf='read'):
    session = GoodreadsSession(api_key, api_secret)
    goodreads = Goodreads(session)
    goodreads.initialise_user()

    books = goodreads.get_books(shelf)
    arranger = BookArranger(books)

    sorted_books = arranger.sort_by_language(languages, other, other_label,
                                             year)
    arranger.print_sorted_books_nicely(sorted_books, details)