def upload_list(book_id_list, rdf_library=None):
    """ Uses the fetch, make, push subcommands to add a list of pg books
    """
    with open(book_id_list, 'r') as f:
        cache = {}
        for book_id in f:
            book_id = book_id.strip()
            try:
                if int(book_id) in missing_pgid:
                    print(u'missing\t{}'.format(book_id))
                    continue
                upload_book(book_id, rdf_library=rdf_library, cache=cache)
            except Exception as e:
                print(u'error\t{}'.format(book_id))
                logger.error(u"Error processing: {}\r{}".format(book_id, e))
def upload_list ( book_id_list , rdf_library = None ) : with open ( book_id_list , 'r' ) as f : cache = { } for book_id in f : book_id = book_id . strip ( ) try : if int ( book_id ) in missing_pgid : print ( u'missing\t{}' . format ( book_id ) ) continue upload_book ( book_id , rdf_library = rdf_library , cache = cache ) except Exception as e : print ( u'error\t{}' . format ( book_id ) ) logger . error ( u"Error processing: {}\r{}" . format ( book_id , e ) )
Uses the fetch, make, push subcommands to add a list of pg books