Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2011, 11:45 PM   #1
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Lightbulb Release : New Tool to Edit ePubs TOC, Edit with Sigil and keep your TOC

-------------------------------------------
Functionality
-------------------------------------------

The best way to use it is to add it to your Open With dialog (note that with multiple files selected, there seems to be a bug in windows that just opens the first book. But multiple Open With has been removed from Windows 7, or just put a link in the send to folder).

You can use the Open With plugin to easily open your file from calibre.

Table of Content Editor
  • Reorder chapters, nest chapters inside others chapter / book and create a multi-level Table of Content by dragging and dropping.
    • When dragging look for the black line to know where your chapters will be.
    • Drag a chapter on an other one until the destination chapter is all black, this will nest the chapters inside each other.
  • Remove unwanted entries, Add new ones based on files or Anchor already present in the files. The Add window will present you with a list of the top 5 lines inside the files (or inclosed with the Anchor Tags) for the Chapter Name.
    • You can also download chapters from the site kobobooks, when there is no suitable text found.
    • Clicking the Add button will add new entries at the bottom, right clicking will add the chapters below the chosen chapters).
    • You can also drag & drop files from the Add windows inside the Table of Content.
  • You can Mass Rename chapters by just typing a number when selecting the chapters, the will increment automatically.
    • You can also Convert number to Words (ie 1 --> One), It also works with Roman Numerals.
    • You can also use the special tag "%T", that will keep the previous text. (ex : You have a Chapter Named : Atlantis, Typing 1 - %T will change the name to 1 - Atlantis). Also if you have a Chapter 1 entry you can just type %T and Number To Words and it will change it to Chapter One.
  • Change the case of the chapters.
  • You can shift the source of chapters up or down (It will Remove any Anchors, pointing to the top of the page).
  • The program can cut your chapter to separate files, instead of multiple chapters per file.
  • Delete files from your book along with any associated entries in the OPF file. (Look in the Add windows).
  • Create an inline TOC from your Table of content.
    • This will check the guide portion of the opf for the "toc" item, and replace it with your new Content file. If this does not exist it will create one at the end, where you can place it where you want.
    • If you want to edit an existing one, you can use the Add window and the Set as Table of Content command, this will set the file and tell the program to replace this file. Or you can use Sigil and the "Add Semantic" button and Table of Content.


Reading Order Editor
  • Have you ever opened a book to find out the first page is at the end? You can reorder the order of the book pages or just remove some.
  • Using this will also remove any "linear" tags inside the books that makes some chapters appear at the end.
  • This will also recreate the file when there is no reference to you toc inside it, which makes some Table of Content unusable. (A message will popup tell you if it is the case.

Margin Fixer
  • This will change all the left and right margins value of the css file, while keeping the body tag to 5pt. It will also change any indent that are negative to 0 (Be careful because some books use margins, instead of indent and it could remove them).
  • An option in the setting menu will let you remove margins instead of zeroing them, usefull with the Kobo Touch when margins can not the modified in book. Use this to remove them and it will remove all margins from the body style.


Edit in Sigil
  • Sigil is great to cut chapters, Format the text or to correct some incorrectly cut files, but it is missing a very important function (at least before version v0.4 comes out). It does not keep the Table of Content that is already present. Using this the book will be opened with Sigil, and when closed (be sure to save the file at the same place) it will replace it with your old Table of Content, Updating the new files location. If you delete or add new Files be sure to also run the table of Content & Reading Order Editor after it. It will check for any files that are missing when opening and remove them, so just open it and save it again to remove entries.
  • You can also use any external exe, it will work also.

Cover Editor
  • Change the Cover without having to reconvert your file (Like calibre does)(Note that using this will convert your covers to SVG).
    • There is also a from folder button that will take the cover.jpg file that is next to the ePub (useful with calibre, where you can download a new cover, and change it by clicking from folder)
  • Resize the Cover so that it fits the screen of your eReader.
    • Note that this has been tested on the Kobo Touch, it resizes the cover in a way that will have the Kobo created a cover without borders, but it might look weird in other viewer like calibre, etc (because it forces a Screen of 800 X 600)
    • Update all will use the selected settings for all the book that where selected, useful too update multiple covers at once.
    • Note that if the Cover is not explicitly set inside the opf file, it will use the first file in the book. (You can set it in the Add window)

-------------------------------------------
Requirement
  • .NET Framework 3.5 or 4.
  • Mono for Linux & MacOSX (some feature might not work correctly like the preview)
    • For linux make sure "mono-runtime" & "libmono-winforms2.0-cil" are installed
    • Not tested on MacOSX, but it should work
    • Also make sure that the libtidy library is installed (should be by default.

Code:
    
    //Usage for Linux 
    mono ePubFixer.exe







Here is the page for any future release http://code.google.com/p/epubfixer/

Changelog :
v1.5.3
- In the Cover Editor, unchecking the preserve Aspect Ratio box will revert to previous behavior of setting the SVG to "none" instead "MidXMidY meet".
- Added a menu in the Cover Editor to select the desired aspect ratio that the image will be resized.
- Fixed some issues with Mono / Linux. (Crash with Fix Margins, Preview working, Path issues, Recent Files working)
- Fixed some setting not being remembered or saved in the wrong place.
- Changed the way the Recent Files are stored in the settings.
- Clicking Rename will have the text selected in the Rename tool.
- The Keep Aspect Ratio checkbox inside of the Cover Editor will now be remembered.
- When Saving a cover you will be warned if the cover has a value of linear="no" (Putting the cover at the end of the book).
- Fixed a Memory problem where using the Mass Update in the Cover Editor would eat up all the memory and crash.
- Covers will have a maximum height of 1600 when resizing them (having them not Preserve the Aspect Ratio),
because very high resolution images are sometimes not processed on some readers.
- Removed the Download button from the Add window, since Table of Contents are no longer available on the Kobobooks website.

v1.5.2
- LibTidy didn't work on 64bit systems, the app will now be 32bit even on 64bit systems.
- Added a confirmation box to replace the Inline TOC before doing so.
- Removed Edit HTML Only from Cover Editor, and will make the cover fit to the window, instead of forcing to a 600 x 800 window.
- The id of a Created Inline TOC will be the filename instead of a GUID.
- Added a fix for some files that sigil 0.4.2 can't open, because of a badly formed content.opf file. Opening Sigil or Saving the file through ePubFixer will fix them.
- Bundled a DLL that was required for the libtidy.dll file that is part of Visual C++ Runtime, that if missing from the computer would crash ePubFixer.

v1.5.1
- A book would crash when doing certain thing when there was no guide in the opf.

v1.5.0
- Added a Select All option inthe context menu of the Add window. It will select all the nodes that are expanded.
- Added the Cover Editor to edit the cover without the need to reconvert with calibre. (look in the readme for additional info).
- Added an option to create an Inline Table of Content (look in the readme for additional info).
- Added an option in the setting menu will let you remove margins in the body Style instead of zeroing them. (usefull with the Kobo Touch when margins can not the modified in book.)
- Added support when only .NET 4 was installed (only XP computers, since other already have .NET 3.5 preinstalled)
- Support when Sigil encodes filenames like URLs, they will now be decoded.
- You can set the type of file (Cover & Table of Content) in the Add windows, this is used with the Inline TOC & Cover Editor.
- Deleting a file did not delete the actual file in the Zip. Also it also removes the info in the guide.
- Plenty of Other fix.

v1.4.1
Added support when filenames with spaces were changed to special character (ex: %20). It happens usually with Sigil 4.

v1.4.0
- Using SendTo will Save the most recent files
- Opening a file that does not exists anymore will not crash the program and a message will warn you.
- Added a Delete Files in the Add screen (it will remove the selected files from the ePub and delete entries from the manifest & spine)
- Fixed a bug with Mass Rename if the entry selected had different "parents".
- Fixed a crash if a file was in the spine, but not the manifest.
- Added a kind of a HACK to force files with XML version v1.1 to be parsed.
- If multiple css file are present, It will now (hopefully) select the correct one.
- The CSS tag being for margins is now determined by the first class attribute seen (previously it was the body tag, now it will look further if not found)
- The Option from the Mass Rename tool-Words are UpperCase-has changed, instead you will have Convert To Uppercase & To Title Case.
It will work as Described but now doesn't work only on Number that where converted to Words but on all the text.
- Removed Wall of Text from the Mass Rename tool and added a help button that will show it for info.
- Added a Download button in the Add window, that will search the site Kobobooks for the TOC and add the entries found to the detected text menu.
- Added a Select Download Text in the Add window, to help selecting the chapters when using the Download button.
- Enabled Navigation in the preview window. (Note : when using navigation you may see character not correctly displayed,
this is because of IE and when you navigate to it the program does not fix the page, it does not mean that the book will display that way.
Use the preview button to make sure)
- Added a Saved Message or Error Message when Saving in the status bar. (It will be shown during 5 seconds)
- Added a Select Previous Text option in the Add dialog.
- The Decrypt Files setting is now on by default when using a DRM build.

v1.3.6
- Put a Check that will prevent any none html file to be loaded or saved in the TOC.
- Changed the Version.xml location on the web, so it is more easily changed. Older version might not always show the new version number.
- Multiple Tweaks to Splitting so more file are compatible and do not crash.
- Changed the way settings are stored, so they are kept regardless of version, build or file location.
(The default MS was to have a setting file for each location and each version, so moving the executable would have all your setting lost.)
- A message will pop-up when opening a protected file, telling you it is protected and preventing you from editing this file.
- Added a Expand & Collapse All option in the Add window.
- When adding new Chapters, the text that was already selected in the Add window will now be remembered.
- In the Add window, clicking the columns header will sort the files.
- Added a Recent Files list under a new File Menu in the Main window.
- Fixed a Couple a Bug.

v1.3.4
- Found a situation where the Spine did not have a reference to the TOC (on retail books), So the App will look deeper if this situation arise.
- If the above situation arises opening the Reading Order Editor and Saving will force the reference into the spine. (a message box will open warning you about it)

v1.3.3
- The Show All checkbox will not be remembered anymore.
- The List of Anchors for each file will now be cached for each different Book.
- The Detected Text will now be cached for each different Book, along with the Anchors text.
- Removed the Apply button, it was replaced by a Add button.
- Using the Add command from the context menu will Add all the items under the selected node (instead of at the end of the document).
- The Save button will no longer close the window (and each related windows, exception is split chapters). You will now need to Save and Close.
- The file column width from the Add screen, will no longer have a maximum width.
- Also resizing the form will no longer adjust the columns width.
- The program will now correctly get the filenames for the NCX & OPF files
- For the OPF file it will get the path from the container.xml file (it used to check only for opf extension)
- For the NCX it will get the id from the spine and lookup the file associated with it in the manifest (it used to check for toc.ncx)
- In the Add window all files or anchors present in the TOC will be shown in Green.
- In the Add window with Show All deselected, Anchors present in the TOC will no longer appear.
- The Forms can now get on top of each other when opened and all will close when the main window closes (TOC or Reading Order editor).
- When opening the Add window, there will no longer be any validating to see if the files shown really exists in the ePub. It will instead
check if the file is present in the TOC when saving the ePub.
- When dragging and dropping Nodes they are no longer removed (with Show All off).
- The Add window will now remember if the nodes are Expanded when clicking Show All or Show Anchors.
- Fixed a problem with Reading order editor showing anchors.
- Shifting Chapters will now get the full source (with anchor) if the next/previous entry is the same file with a different anchor (before it just returned the top of the file).
- Fixed a problem when the source in the TOC was encoded with special characters (ex: %20 instead of a space).

v1.3
- Clicking The Add button in the Add window will no longer close the window.
- The entries in the Add window will now be sorted like the reading Order (spine).
- Added a Save Backup Checkbox on the Main Screen.
- Using Send To from a folder would crash the program, it will now collect all the .ePub found inside.
Useful for mass fixing from the calibre library.
- Added an option to check online if any new version is available (Default is enabled)
- The detected text for anchors, use to only find the text next to that anchors, it will now get the folowing lines. (up to 5)
- The program will now remember the Size and Position of the most windows.
- The Show All & Show Anchor Will now be remebered along with column width.
- Added a Split Chapters on Anchor checkbox in the TOC Editor,
that will Split your Html file into multiple files when more than 1 chapter per file is found. (Is pretty slow right now)
- Fixed a bug with the edit in Sigil, where source that had Anchors where removed.
- Fixed a Bug with the Shift function (Again).
- Added an About box inside in the main dialog.
- Added a status strip inside of the preview window that will show the name of the file being previewed.
- Added a couple of tooltips on checkboxes

v1.2
- The Show All & Show Anchor Checkbox from the add windows are no longer shown when in Edit Reading Order Editor.
- Added a Remove Option in the Reading & TOC Editors, You could have done the same thing by deselecting and clicking apply, but it was not intuitive.
- The files are now being extracted in a background Theard, the Editors window will now appear much more quickly.
- A Progress Bar has been added to the bottom of the screen showing the extracting progress.
- Fixed a Crash with the Show Anchors Checkbox when certain files were in the manifest but not in the ePub.
- Added a new column in the Add Screen that Shows a list of Text (now cap to 5 lines) inside of a File or following an Anchor, The selected text will be used if present when adding files to the TOC (instead of the filename).
- Draging Items with Anchors from the Add Window to the TOC would Add all the Anchors with it.
- Fixed a Bug with Shift Up & Down not working correctly.
- Added a Take Next Text in The Add Window. That way say the first line is a chapter number and the second the title of the chapter, you can easily select the title by selecting all the wanted lines.
- Added a Special Tag in the Mass Rename (%T) that will keep the text in place. Useful with the above feature where you would want to add say a number in front to auto-increment.
(example : Chapter Name could become 1 - Chapter Name by typing 1 - %T)
Also please note that any number in %T will also be detected (only the First one), So if %T is Chapter 1, putting Number to Words will result in Chapter One, if %t only is written. If You Write 1 - %T and %T is Chapter 1, you will have One - Chapter 1.
- Selecting multiple chapter in not the right order would make the renaming incorrect, Now the will all be renamed by the way the are on the screen regardless of the order that they were selected.

v1.1
- The Duplicate function was only duplicating 1 file when several were selected
- Added a Show All checkbox into the Add window, to show files that were already added
- Added a Show Anchor checkbox into the Add window, that will parse the html and show all the id tag into the file
- Changed Algorithm that checks for html file, it will now look for all file and media-type that Contains or Ends with html
- The preview into the Add window was only showing 1 preview when multiple were selected, it will now preview all of them

v1.02
- Fixed a Bug where the Temp Files where being Extracted over and OVer again
- Added a Duplicate Options
- Files with no source are now mark in red

v1.01
- When the Add dialog is shown it checks for any type of file html inside the manifest, will now also look to see if the file extension finishes with html
- Files for the preview where extracted when the TOC and reading order was opening, they now wait for it to be opened. (Large files add a small delay)
- The program was looking for the Sigil app in the usual place, and if it was found use it in place, Removed the check, you will now have to set it first.
- Added some wait cursor when the TOC and Reading order where opening and when the files were being extracted.
Attached Files
File Type: zip ePubFixer v1.5.3.zip (828.4 KB, 242 views)

Last edited by Nigol; 03-26-2012 at 08:42 PM.
Nigol is offline   Reply With Quote
Old 01-22-2011, 09:24 AM   #2
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Wow!

Nice little tool you have created, and timely too.

I finally bought a hardware reader that supports .epub files and have found myself hand-editing (with winrar) my calibre and Sigil produced/corrected .epubs of some of my larger ebook creations originally in other ebook formats.

You sure have "filled in" a need...... and I'm no stranger to ebook creating.

It seems my hardware ebook reader's limitations (the Next1 is non-Touchscreen and has no way of selecting internal links) have motivated me since "in page" or footnote links are inaccessible to me using the Next1 as is the traditional embedded TOC placed at the beginning of non-epub ebooks.

But that's OK, since I can try to use the toc.ncx to access the most important links (like Chapter Headings that Sigil so nicely collects for you and nests them too!) However, Sigils TOC Editor is of limited functionality (as you obviously are aware of or else there would be no epubfixer )

l want to be able to use my ebook reader's Catalog (toc.ncx) function which can properly display and access nested level TOCs. So, that's why I've been hand-editing those toc.ncx and would like to use your tool to accomplish same.

In particular, since you list the spine elements and are able to add them to the TOC, could you also list the <href=> and their corresponding <id=> locations so that ALL internal links could be added to the TOC (probably nested to better present them. I would probably add them to level1 TOC and have them added as level2 TOC entries for them in sequential/page order and maybe create some level3 sub-compartmentalizations) .

Anyway, back to your epubfixer, my initial comments are:
- when I used the Go button to edit the TOC and Reading Order (with a large .epub file), the GUI disappeared for 20-30 seconds, but I knew it hadn't crashed as Sigil does the same thing when loading large .epubs when I use it with "Open With..." from Windows Explorer.
- I waited and then was rewarded with your TOC screen, but the reading order screen didn't show up and was placed right behind that first screen.
- I used the Add button when editing the TOC, and was presented with a blank screen with the heading "File", though no files were listed. I didn't know if it hadn't found any or was still collecting same.

What I'm really getting at here, by mentioning the above, is user feedback. Keep some indication that the original GUI is still there when opening the TOC or Reading Order screens, as well as that Add to TOC screen. A simple animated mouse pointer or log screen would help. It's not knowing if your software crashes that gets me impatient especially when I see nothing being done... but that just me!

Also, it would be nice if you could display some summary statistics like # of .html files in the epub or # of TOC (broken down by # of level 1, 2, 3 .... )

I'm off to edit some more so I may have other comments, but to be honest, I WANTED TO CREATE A TOOL LIKE THIS, but cannot undertake such programming tasks due to only being a unix/dos programmer/hack...

BTW, I'm download number 3 from your Google project host site.

Again, nice job!!!

Last edited by nrapallo; 01-22-2011 at 10:01 AM. Reason: typos
nrapallo is offline   Reply With Quote
Old 01-22-2011, 12:17 PM   #3
GeneS
eBook Enthusiast
GeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enough
 
GeneS's Avatar
 
Posts: 119
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
Marvelous utility. Please keep working on it.

I've noted two apparent problems.

The first problem is in setting the Sigil path. I have two installations of Sigil. One is version 0.3.4 in Program Files\Sigil. The other is version 0.1.9 in Program Files\Sigil 0.1.9. It doesn't seem to matter which version I have selected using ePUBFixer's "Set Sigil Path", only Sigil 0.1.9 comes up when I select "Edit in Sigil".

The second issue is that nothing seems to happen when I check on the "Fix Margins" option and then select the "Go" button except that the ePUBFixer menu blinks momentarily. Perhaps I'm just missing a step somewhere.

Thanks for putting this together.

Last edited by GeneS; 01-22-2011 at 12:20 PM.
GeneS is offline   Reply With Quote
Old 01-22-2011, 12:45 PM   #4
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by nrapallo View Post
I'm off to edit some more so I may have other comments
I'm back!

In the Edit TOC screen, how can I create a new TOC entry in order to nest (move) into that level 2 all relevant links I want there.

I used the Add function, but it doesn't seem to be able add a blank entry for me so as to create nested levels. How is this supposed to work?

Can this functionality be added?
nrapallo is offline   Reply With Quote
Old 01-22-2011, 01:23 PM   #5
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Quote:
In particular, since you list the spine elements and are able to add them to the TOC, could you also list the <href=> and their corresponding <id=> locations so that ALL internal links could be added to the TOC (probably nested to better present them. I would probably add them to level1 TOC and have them added as level2 TOC entries for them in sequential/page order and maybe create some level3 sub-compartmentalizations) .
the href are actually there in a tooltip inside the TOC & reading order, I guess I could add their position from the spine to make sure they are it the right order.

Quote:
- when I used the Go button to edit the TOC and Reading Order (with a large .epub file), the GUI disappeared for 20-30 seconds, but I knew it hadn't crashed as Sigil does the same thing when loading large .epubs when I use it with "Open With..." from Windows Explorer.
- I waited and then was rewarded with your TOC screen, but the reading order screen didn't show up and was placed right behind that first screen.
- I used the Add button when editing the TOC, and was presented with a blank screen with the heading "File", though no files were listed. I didn't know if it hadn't found any or was still collecting same.
- I was extracting the file when opening the TOC editor (only for the preview), but didn't see any kind of slow down (on my Core i7), maybe your large ePub was why it was waiting to have it all extracted. I did a small change so that it will start extracting them when the form was finished loaded.
- The reading order should open after the TOC editor, they should not be opened at the same time, I can see why it could be useful, but having two thread writing to the same file could be disastrous.
- If you have a blank screen in the Add windows, there is 2 possibility:
1 - All the files are already present in the TOC or Reading order
2 - The program looks inside the manifest to find files to add, it look of file of type html (or xhtml), if the type is something else it is normal it didn't show them. I already did a fix (not yet released) that will also look at the file extension, if the type is not html.

I tried with a lot of file, but not everybody uses the same specs, so it hard to determine all book. Maybe you could send me your book or just your toc and opf file to at least be sure, if there should be something in the Add window.

About the initial form hiding I could leave it opened, it just seemed more clean this way (I might not have anticipated the impact of very large files, all my test where almost instantaneous). That is why I posted it, to have user comments, I feel that right now it does everything I wanted to do, but there might be something else to add.



Quote:
Originally Posted by GeneS View Post
Marvelous utility. Please keep working on it.

I've noted two apparent problems.

The first problem is in setting the Sigil path. I have two installations of Sigil. One is version 0.3.4 in Program Files\Sigil. The other is version 0.1.9 in Program Files\Sigil 0.1.9. It doesn't seem to matter which version I have selected using ePUBFixer's "Set Sigil Path", only Sigil 0.1.9 comes up when I select "Edit in Sigil".

The second issue is that nothing seems to happen when I check on the "Fix Margins" option and then select the "Go" button except that the ePUBFixer menu blinks momentarily. Perhaps I'm just missing a step somewhere.

Thanks for putting this together.
You are right about the Sigil path, if it detects the Sigil executable in it's normal locaiton program file etc... it will use it instead, I could just remove the check and force people to set the path first.

Also the fix margins don't have any box, it just does it, maybe a message box would be great (i removed it at first because of it poping when selected multiple tool) all the options will be run in the order they are shown Margins->Sigil->Toc->Reading order for every book selected.
Nigol is offline   Reply With Quote
Old 01-22-2011, 01:30 PM   #6
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Quote:
Originally Posted by nrapallo View Post
I'm back!

In the Edit TOC screen, how can I create a new TOC entry in order to nest (move) into that level 2 all relevant links I want there.

I used the Add function, but it doesn't seem to be able add a blank entry for me so as to create nested levels. How is this supposed to work?

Can this functionality be added?
If you want to nest the level, just drag and drop the chapters (you can select multiple ones) you want to be level 2 on the level 1 entries. You can also drag level 2 to be level 1, just look at the black bar level. But right now it is only 1 html file, 1 entry you can Add.

So are talking about having the same file 2 times in the TOC? I could add a duplicate function.

Last edited by Nigol; 01-22-2011 at 01:39 PM.
Nigol is offline   Reply With Quote
Old 01-22-2011, 02:06 PM   #7
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Small Update

Did a small update based on the feedback. on google code and the file attached to this forum.

http://code.google.com/p/epubfixer/

- When the Add dialog in shown it checks for any type of file html inside the manifest, will now also look to see if the file extension finishes with html
- Files for the preview where extracted when the TOC and reading order was opening, they now wait for it to be opened. (Large files add a small delay)
- The program was looking for the Sigil app in the usual place, and if it was found used it in place, Removed the check, you will now have to set it first.
-Added some wait cursor when the TOC and Reading order where opening and when the files were being extracted.

Going out for the day, so please keep posting comments.
Nigol is offline   Reply With Quote
Old 01-22-2011, 03:07 PM   #8
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by Nigol View Post
the href are actually there in a tooltip inside the TOC & reading order, I guess I could add their position from the spine to make sure they are it the right order.
I see that now, but those are NOT the <href=>'s I was thinking about above. The thought I had, to add more functionality to existing ebooks, was the have ALL href's in the ebook listed on that Add screen along with their anchor's internal filename and then be able to pick and choose amongst that list to add to the existing TOC. In essence, the user could then have the opportunity to add footnotes under relevant Chapters so as to access them from the toc.ncx. Again this is only important for those that have no hardware/software mechanism to get at those internal links.

My idea was to be able to add a two new TOC level1 entries, one called "Embedded TOC" which could house those links found in older style ebooks (like what Project Gutenberg produces) just for the embedded Table of Contents and List of Illustrations at the beginning of the ebook. The other, called "Internal Links", would be for ALL relevant footnote or "in page" links.

I wouldn't expect your ePubFixer to actually change/add to the TOC, just be able to access that listing of (other) href's used within the epub. The user would then be at liberty to determine which could be retained/discarded and add soley those from the Add screen to the existing TOC. Food for thought!

All this is to accomplish one goal, to embellish the existing TOC in ways Sigil, nor calibre could do algorithmically.

Quote:
- I was extracting the file when opening the TOC editor (only for the preview), but didn't see any kind of slow down (on my Core i7), maybe your large ePub was why it was waiting to have it all extracted.
Yes, the epub was large; its an epub of an entire website I downloaded almost 5 years ago and contains almost 1700 items in the <spine> section of the .opf (it has that many .html files plus almost 1500 images within). So that's probably too extreme a test case, but just highlights the fact that while loading/filtering the items, the GUI should not close until the Edit TOC screen actually is ready...

This is the TOC screen Click image for larger version

Name:	ePubFixer_TOC.jpg
Views:	336
Size:	79.0 KB
ID:	65285 I see after loading that gargantuan .epub and one of my first thoughts was to create a new Level1 entry for "A" and then move all the Mathematicians with lastname starting with "A" therein. I would need to be able to add a New entry, then move the existing ones therein.

Quote:
- The reading order should open after the TOC editor, they should not be opened at the same time, I can see why it could be useful, but having two thread writing to the same file could be disastrous.
Yes, I see that now, and you're right about editing the same source files at the same time and the potential for disaster.

Quote:
- If you have a blank screen in the Add windows, there is 2 possibility:
1 - All the files are already present in the TOC or Reading order
2 - The program looks inside the manifest to find files to add, it look of file of type html (or xhtml), if the type is something else it is normal it didn't show them. I already did a fix (not yet released) that will also look at the file extension, if the type is not html.
Good to know. Now if you could add other internal links (like the aforementioned ALL href's) that can be listed and added, then were looking good....

Quote:
I tried with a lot of file, but not everybody uses the same specs, so it hard to determine all book. Maybe you could send me your book or just your toc and opf file to at least be sure, if there should be something in the Add window.
Sorry, that epub is copyrighted and made for my own use. If you want to see the .opf then I could email it to you. Just PM me.

Quote:
About the initial form hiding I could leave it opened, it just seemed more clean this way (I might not have anticipated the impact of very large files, all my test where almost instantaneous). That is why I posted it, to have user comments, I feel that right now it does everything I wanted to do, but there might be something else to add.
If you are willing to entertain our comments, then I'm willing to provide same.

Last edited by nrapallo; 01-22-2011 at 03:17 PM. Reason: typos
nrapallo is offline   Reply With Quote
Old 01-22-2011, 03:27 PM   #9
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by Nigol View Post
If you want to nest the level, just drag and drop the chapters (you can select multiple ones) you want to be level 2 on the level 1 entries. You can also drag level 2 to be level 1, just look at the black bar level. But right now it is only 1 html file, 1 entry you can Add.
Well, so you can! Absolutely bang-on functionality! It works like a charm!

Quote:
So are talking about having the same file 2 times in the TOC? I could add a duplicate function.
No, the above clears up my issues, except instead of using the "Add" option, could you add a "New" option and allow the user to rename it. It would serve as a placeholder for those (newly created) level2 entries. You could even default its href to be the same as the first level2's href file reference just to be complete.
nrapallo is offline   Reply With Quote
Old 01-22-2011, 08:27 PM   #10
Freeshadow
temp. out of service
Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.
 
Posts: 2,325
Karma: 12999524
Join Date: May 2010
Location: Duisburg (DE)
Device: BeBook mini
looks like THE tool to simplify creation ofomnibus editions karma comes the way
Freeshadow is offline   Reply With Quote
Old 01-23-2011, 12:57 AM   #11
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Quote:
Originally Posted by nrapallo View Post
No, the above clears up my issues, except instead of using the "Add" option, could you add a "New" option and allow the user to rename it. It would serve as a placeholder for those (newly created) level2 entries. You could even default its href to be the same as the first level2's href file reference just to be complete.
If I understand you correctly, it's that there are no file with a summary for people with A, and you would just like to have them group together, so it becomes clearer? Or having 2 TOC's like 1 by name and other by date for example.

I have not fully checked the specs fully, but I don't know what an empty TOC will do with some reader. But right now whenever an entry is loaded and the file is not physically there in the ePub, it will not be shown when loaded and be removed completely from the TOC upon saving. But empty source do come up in my test, and i even wanted to make sure it couldn't be possible.

Also about the Add screen, it only lists the file inside the manifest. It does not parse every HTML file to find the anchor value presents. Although it could be usefull, my main idea was to create a tool that would complement calibre and sigil. And this type of thing could "easily" (it took me a while to fully understand the convert setting in it) be done in calibre with the right settings, having it detect some html tag, let calibre create your TOC, and then use my tool to remove unwanted parts of move some.

I could easily add a Show all checkbox inside the add screen that will show even files that are already present And/Or a New option without a source, but I don't see why it would be of use. I think that is why neither calibre nor sigil is able to do this. I don't even know what it would do on some reader or if it is possible in the specs. I just want to be sure it is something that would be useful without having the tool be too complicated and less intuitive for all users.

Update : I have just tested Added an New Empty TOC Entry, but the calibre viewer seems to remove the entry with no source completely, and looking at the specs (http://www.niso.org/workrooms/daisy/...5.html#NCXElem) and it seems to be required. So it would not change anything because I guess most reader will either ignore it and remove it, or maybe crash. Maybe a duplicate would work for you?

Last edited by Nigol; 01-23-2011 at 02:33 AM. Reason: Added Empty TOC Test Result
Nigol is offline   Reply With Quote
Old 01-23-2011, 08:55 AM   #12
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by Nigol View Post
If I understand you correctly, it's that there are no file with a summary for people with A, and you would just like to have them group together, so it becomes clearer? Or having 2 TOC's like 1 by name and other by date for example.
The main thrust for allowing one to add a New TOC entry with a src/href is as a temporary repository for existing level1 TOC entries that can be moved into it as level2 TOC items. This differs slightly from your program's TOC editing capabilities in that with your "drag 'n drop" method the level1 TOC entry name remains whereas in what I'm getting at, that dropped on level1 entry becomes the first level2 TOC entry within the newly crated level1 TOC entry.

For example, with that huge .epub, all 1700 Mathematicians are listed in Alphabetical order as level1 TOC entries. What I wanted to do (after the .epub was created from my .html/.jpg source using calibre and "cleaned up" using Sigil) was to create, using ePubFixer now instead of hand editing, 26 New level1 TOC entries, one for each letter of the Alphabet. Then I would move all the "A" Mathematicians into that newly created "A" entry. And yes, when that new "A" was created it had no src/href and was empty, but AFTER I move all those "A" Mathematicians therein, the first level2 TOC entry i.e. Enrst Abbe could be used to provide that "A" level1 TOC entry with a valid src/href (duplicate!).

Come to think about it, if you allow any TOC entry to be duplicated, like Ernst Abbe, then I could just rename the first one to "A Mathematicians" and then move the second "Ernst Abbe" along with any other "A" TOC entries therein afterward. It would accomplish the same task and NOT create any invalid/empty TOC entries.

This is a better approach since the TOC's src/href is already set upon duplication and so there is no need to "guess" or worry about how that empty TOC will be used by the user.

Another benefit of having a Duplicate option would be to allow another placement of say the embedded Table of Contents present at the back of the ebook, to the front.

Soooooo, can a Duplicate option be added to the Add screen instead of a New option?

Quote:
I have not fully checked the specs fully, but I don't know what an empty TOC will do with some reader.
Using a Duplicate option instead will not cause any empty TOC issues!

Quote:
Also about the Add screen, it only lists the file inside the manifest. It does not parse every HTML file to find the anchor value presents. Although it could be usefull,
That's what I had in mind!

The ONLY useful entries to add to the internal toc.ncx are links that not already there but which links? Your software can't determine that on it's own, but if you do parse the .html (ala Beautiful Soup) and extract all the href's and match them with their id's and note the anchor's filename, then those could be listed.

So, for example, if the first .html in the <spine> is "Text/Abbe.html" and has a footnote link, say footnote1 coded like <a href="footnotes.html#note1">footnote1</> then "note1" could be listed and added to the TOC as:
Code:
        <navPoint id="navPoint-24" playOrder="24">
            <navLabel>
                <text>Ernst Abbe - Footnote1</text>
            </navLabel>
            <content src="Text/footnotes.html#note1"/>
        </navPoint>
Quote:
Maybe a duplicate would work for you?
In a nutshell, YES!!!!!!

Last edited by nrapallo; 01-23-2011 at 09:06 AM.
nrapallo is offline   Reply With Quote
Old 01-23-2011, 01:05 PM   #13
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Update

Ok so I uploaded a new update with the requested Duplicate Function.

There was also a bug I introduced in v1.0.1 where Temp files where being extracted over and over again. SO please everyone update.

So I hope this helps you.
Nigol is offline   Reply With Quote
Old 01-23-2011, 04:10 PM   #14
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
For the sample .epub attached, I want to add new level2 items under the "Table of Contents" level1 TOC entry in the toc.ncx as there are places under that title to link to it, like
Code:
<p class="calibre13"><a class="calibre4" href="../Text/10940-h_split_005.htm#ch01">Condition of Persons and Lands</a></p>
but they are not included in the toc.ncx, nor available in the Add screen. See "10940-h_split_003.htm" therein.

What functionality could you add to ePubFix to enable me to do this?

Last edited by nrapallo; 01-23-2011 at 04:15 PM.
nrapallo is offline   Reply With Quote
Old 01-23-2011, 11:04 PM   #15
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Quote:
Originally Posted by nrapallo View Post
For the sample .epub attached, I want to add new level2 items under the "Table of Contents" level1 TOC entry in the toc.ncx as there are places under that title to link to it, like
Code:
<p class="calibre13"><a class="calibre4" href="../Text/10940-h_split_005.htm#ch01">Condition of Persons and Lands</a></p>
but they are not included in the toc.ncx, nor available in the Add screen. See "10940-h_split_003.htm" therein.

What functionality could you add to ePubFix to enable me to do this?
OK here is what I did, I have added a Show All button and a Show Anchor button into the Add window. But by looking at the file you were talking there are several id inside the same line, the ch01 is on almost every line.

As a matter of fact that particular line you were talking about points to heading_id_13 (which is already in your TOC, so what adding ch01 will do is point to the beginning of the page instead of the required effect. (since it will point to the very first ch01)

What the Show Anchor does is show the very first id Tag it finds in the html (I am guessing that the navigating to a anchor does work the same, jumping to the first one spotted)

Changelog :

- The Duplicate function was only duplicating 1 file when several were selected
- Added a Show All checkbox into the Add window, to show files that were already added
- Added a Show Anchor checkbox into the Add window, that will parse the html and show all the id tag into the file
- Change Algorithm that checks for html file, it will now look for all file and media-type that Contains or Ends with html
- The preview into the Add window was only showing 1 preview when multiple were selected, it will now preview all of them

Last edited by Nigol; 01-23-2011 at 11:16 PM.
Nigol is offline   Reply With Quote
Reply

Tags
epub, epubfixer, toc.ncx editor, tool

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Option not to edit TOC Jonimeesermann Sigil 5 10-06-2010 03:18 PM
Few epubs have toc James_Wilde Writers' Corner 1 09-29-2010 08:20 PM
Creator How to edit ToC JaneFancher Kindle Formats 8 03-27-2010 09:40 PM
whishlist: button/command edit in Sigil booksonthemove Calibre 3 03-03-2010 07:30 AM
sigil and toc bobcdy Sigil 5 10-17-2009 05:29 PM


All times are GMT -4. The time now is 04:54 AM.


MobileRead.com is a privately owned, operated and funded community.