Logo Search packages:      
Sourcecode: calibre version File versions

def calibre::devices::interface::DevicePlugin::upload_books (   self,
  files,
  names,
  on_card = None,
  end_session = True,
  metadata = None 
) [inherited]

Upload a list of books to the device. If a file already
exists on the device, it should be replaced.
This method should raise a L{FreeSpaceError} if there is not enough
free space on the device. The text of the FreeSpaceError must contain the
word "card" if C{on_card} is not None otherwise it must contain the word "memory".
@param files: A list of paths and/or file-like objects.
@param names: A list of file names that the books should have
once uploaded to the device. len(names) == len(files)
@return: A list of 3-element tuples. The list is meant to be passed
to L{add_books_to_metadata}.
@param metadata: If not None, it is a list of dictionaries. Each dictionary
will have at least the key tags to allow the driver to choose book location
based on tags. len(metadata) == len(files). If your device does not support
hierarchical ebook folders, you can safely ignore this parameter.

Reimplemented in calibre::devices::prs500::driver::PRS500.

Definition at line 146 of file interface.py.

                                   :
        '''
        Upload a list of books to the device. If a file already
        exists on the device, it should be replaced.
        This method should raise a L{FreeSpaceError} if there is not enough
        free space on the device. The text of the FreeSpaceError must contain the
        word "card" if C{on_card} is not None otherwise it must contain the word "memory".
        @param files: A list of paths and/or file-like objects.
        @param names: A list of file names that the books should have
        once uploaded to the device. len(names) == len(files)
        @return: A list of 3-element tuples. The list is meant to be passed
        to L{add_books_to_metadata}.
        @param metadata: If not None, it is a list of dictionaries. Each dictionary
        will have at least the key tags to allow the driver to choose book location
        based on tags. len(metadata) == len(files). If your device does not support
        hierarchical ebook folders, you can safely ignore this parameter.
        '''
        raise NotImplementedError()

    @classmethod
    def add_books_to_metadata(cls, locations, metadata, booklists):


Generated by  Doxygen 1.6.0   Back to index