Comments (4)
I have to say woops. I tested the change with the extended driver, but I didn't check the main driver. With the suggestion above, the options in the main driver are changed. So, it assignment is a reference rather than a copy. I knew I should have just made the suggestion and left the implementation up to someone else :)
A quick bit of reading. The first two lines should be:
EXTRA_CUSTOMIZATION_DEFAULT = KOBOTOUCH.EXTRA_CUSTOMIZATION_DEFAULT[:]
EXTRA_CUSTOMIZATION_MESSAGE = KOBOTOUCH.EXTRA_CUSTOMIZATION_MESSAGE[:]
from calibre-kobo-driver.
My only concern about this is how will the extra options be affected in the future when the main driver adds more options? Let's say right now my settings array with the extended driver looks like this:
[u'', # OPT_COLLECTIONS
True, # OPT_CREATE_BOOKSHELVES
True, # OPT_DELETE_BOOKSHELVES
True, # OPT_UPLOAD_COVERS
True, # OPT_UPLOAD_GRAYSCALE_COVERS
True, # OPT_KEEP_COVER_ASPECT_RATIO
True, # OPT_SHOW_EXPIRED_BOOK_RECORDS
True, # OPT_SHOW_PREVIEWS
True, # OPT_SHOW_RECOMMENDATIONS
True, # OPT_UPDATE_SERIES_DETAILS
False, # OPT_SUPPORT_NEWER_FIRMWARE
u'', # OPT_DEBUGGING_TITLE
True, # OPT_EXTRA_FEATURES -- index 12, KoboTouchExtended options start here
False, # OPT_DELETE_UNMANIFESTED
False, # OPT_UPLOAD_ENCUMBERED
False, # OPT_SKIP_FAILED
True, # OPT_HYPHENATE
False, # OPT_REPLACE_LANG
True, # OPT_SMARTEN_PUNCTUATION
True # OPT_CLEAN_MARKUP
]
So for now, it indicates that I want extra features enabled (index 12) and I do not want to delete files that are not in the manifest (index 13). If a new option gets added to the main driver with the way you suggest (I think) it would have index 12 and OPT_EXTRA_FEATURES would now have index 13 and it would be read as saying that I do not want to enable extra features. New installations would be fine, and this would work fine until new options are added to the main driver. At least I think that's how it would work?
Not that I have any better ideas for how to handle a subclass that requires superclass options not change but a superclass that at the same time must be free to change options :)
from calibre-kobo-driver.
There is going to be trouble with this no matter what. If an extra option is added to the main driver, then there will be a conflict over what that value means. The main driver will use it for one thing, and the extended for another.
But, there is already a solution. When I added the debug title option, I decided to make it the last option. In fact, I planned to remove it before release,but it was to useful. Since then I have added a couple of extra options. The settings method handles the move to keep the debugging title as the last option. This should work to move any options after it as well. But, I have to admit I haven't tested that.
from calibre-kobo-driver.
Well, it looks OK to me. In theory :)
I see no reason not to go with what you suggested then, and if it does turn out to cause conflicts later I can figure something out then.
from calibre-kobo-driver.
Related Issues (20)
- Libra 2 HOT 3
- Missing cover after the conversion HOT 4
- 'Untitled Chapter' bug for all chapters after kepub conversion
- Obok DeDRM plugin not functioning in Calibre 6.0 HOT 1
- Kepub Output - QT errors in Calibre 6.x HOT 4
- UniCodeDecodeError HOT 1
- "Continue on error" for copy jobs with multiple books that fails because of content errors HOT 2
- List name of failing book in the job log error message. HOT 1
- name of file after converting EPUB to KEPUB HOT 1
- Add support for 4.34.20097 firmware HOT 1
- Send to device always results in epub, not kepub HOT 1
- Error Communicating with Device (TimeoutError on conversion)
- Updating an existing ebook on device does not take new pages into account HOT 8
- Process for importing (new?) Amazon Kindle Unlimited Voucher-associated file content HOT 2
- Conversion to kepub fails with "list index out of range" HOT 1
- Retrieving annotations not working (but 3rd party Annotations plugin works) HOT 1
- KoboTouchExtended: Error communicating with device HOT 5
- synopsis not loaded HOT 1
- SafeConfigParser has been removed in Python 3.12 HOT 1
- Option to not encoding non-English "Send-to" path into English one HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calibre-kobo-driver.