View Single Post
Old 06-30-2011, 11:01 AM   #52
burbleburble
Connoisseur
burbleburble began at the beginning.
 
Posts: 52
Karma: 38
Join Date: Jun 2011
Device: Kindle 3
@Kovid: Thanks. I guess I'll just have to parse webkit's output with lxml.html, and resave as xhtml.


@Anyone: I've been working on a better structure view, and a better way of editing it. I've come up with a method, and I think its kind of simple; however the javascript for implementing all its facets is a rather frustrating to write. So, I have written rudimentary code for it, and attatched below a test version.

I really need some suggestions about the following issues in this test version:
  1. Currently the method for editing the class structure is the following:
    • Every class entered in the replacements text edit is defined in relation to the root (i.e. the book). For example: 'title of chapter' or 'line of verse of chapter'; the 'of root' need not be specified. In this test version you must write ' of ' between any two classes in order to create a hierarchy.
    • Every class can be defined as 'new'. For example 'title of newchapter'. This is because you may replace a 'class13' with 'scene of chapter', and you really don't want to start a new chapter there. So the plugin takes that into account, and merges it to an existing chapter, or later when you create a ' ... newchapter' previous to it.
    So please, anyone: do you have a simpler/clearer approach or a clearer explanation (I'm awful at explaining); and especially a suggestion for how to present a gui interface for creating/utilizing such syntaxes. The test version below can be used to see how it works right now. Below is also a picture of being put to use in this way....
  2. Included in this test version is an epub writer. I just don't have an approach for where to save it, rename it... currently it just saves to the temp folder, and opens it for you to copy it out of...

    So, please, anyone: Should it overwrite the original? Should it add to the calibre library with and extendsion 'Harry Potter 1' + 'CLEANED'... should you save it somewhere on the computer? ideas please!!!
(I enjoy the programming, I can communicate with the computer; but how to clearly and intuitively communicate with the user is quite often beyond me)
Attached Thumbnails
Click image for larger version

Name:	view01.JPG
Views:	348
Size:	168.6 KB
ID:	73564  
Attached Files
File Type: zip test plugin.zip (165.3 KB, 259 views)
burbleburble is offline   Reply With Quote