View Single Post
Old 10-28-2015, 03:55 PM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
I've had a brief look at preview.py. That's way beyond my current skill level, so I won't be pursuing that any time soon.

For the EbookScramble exercise, all I had in mind was to provide
  1. simple selection of a single source file, within calibre via plugin or standalone drag-drop
  2. ability to change scramble rules - standalone version only, plugin will have fixed MR-agreed rules.
  3. Scramble Now button - all scrambling work done by container parser methods, no user interaction
  4. after scrambling (but before final commit), access to a few FYI dialogs, i.e. no user changes.
    e.g. a dialog which shows text by container name, before vs. after, side-by-side. So exploded files will need to be in-sync with the parsed items. The FYI dialogs are mainly those I wished I'd had before I started testing. As the work is already done may as well tidy it up and make it available - at least in the standalone version.
  5. The only user change possible by this point is destination directory for scrambled copy. Basic testing done in calibre plugin version to not allow destination to be a calibre library directory.
  6. Save & exit - where final container.commit(path_to_scrambled_book) is run.

My gut-feel is that there shouldn't be anything unsafe about the above to warrant needing full Preview-mode compliance. If you strongly beg to differ then I'll need to reconsider what options are included.

Re: item 4. I've done this by creating a container of the source book then cloning it to an unedited backup of the Original. I did have some problems with the clone images which didn't exist if I just created a completely independent 2nd container to hold the Original. However, I think it's working now. Maybe a clone isn't exactly what I thought it was. For epub/kepub an independent 2nd container would be acceptable but for an azw3 doing all that packing/unpacking twice is less desirable.
jackie_w is offline   Reply With Quote