mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge CLI class into Driver
This commit is contained in:
parent
0cefdbe2e8
commit
426cde07dd
@ -7,9 +7,8 @@ Device driver for Bookeen's Cybook Gen 3
|
|||||||
import os, fnmatch
|
import os, fnmatch
|
||||||
|
|
||||||
from calibre.devices.usbms.driver import USBMS
|
from calibre.devices.usbms.driver import USBMS
|
||||||
from calibre.devices.usbms.cli import CLI
|
|
||||||
|
|
||||||
class CYBOOKG3(USBMS, CLI):
|
class CYBOOKG3(USBMS):
|
||||||
MIME_MAP = {
|
MIME_MAP = {
|
||||||
'mobi' : 'application/mobi',
|
'mobi' : 'application/mobi',
|
||||||
'prc' : 'application/prc',
|
'prc' : 'application/prc',
|
||||||
|
@ -7,9 +7,8 @@ Device driver for Amazon's Kindle
|
|||||||
import os, fnmatch
|
import os, fnmatch
|
||||||
|
|
||||||
from calibre.devices.usbms.driver import USBMS
|
from calibre.devices.usbms.driver import USBMS
|
||||||
from calibre.devices.usbms.cli import CLI
|
|
||||||
|
|
||||||
class KINDLE(USBMS, CLI):
|
class KINDLE(USBMS):
|
||||||
MIME_MAP = {
|
MIME_MAP = {
|
||||||
'azw' : 'application/azw',
|
'azw' : 'application/azw',
|
||||||
'mobi' : 'application/mobi',
|
'mobi' : 'application/mobi',
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
__license__ = 'GPL v3'
|
|
||||||
__copyright__ = '2009, John Schember <john at nachtimwald.com'
|
|
||||||
'''
|
|
||||||
Generic implemenation of the prs500 command line functions. This is not a
|
|
||||||
complete stand alone driver. It is intended to be subclassed with the relevant
|
|
||||||
parts implemented for a particular device.
|
|
||||||
'''
|
|
||||||
|
|
||||||
class CLI(object):
|
|
||||||
|
|
||||||
# ls, cp, mkdir, touch, cat,
|
|
||||||
|
|
||||||
def rm(self, path, end_session=True):
|
|
||||||
path = self.munge_path(path)
|
|
||||||
self.delete_books([path])
|
|
||||||
|
|
@ -141,3 +141,5 @@ class USBMS(Device):
|
|||||||
|
|
||||||
return book_title, book_author, book_mime
|
return book_title, book_author, book_mime
|
||||||
|
|
||||||
|
# ls, rm, cp, mkdir, touch, cat
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user