Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 12-12-2013, 10:55 AM   #316
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@arspr: If you have modified text in an editor, all entities are automatically converted to unicode before checking, which is why you will not get message about them. Close and re-open the editor and you will see that.
Ooops I think I found the strange issue behind my "trouble".

Grab the attached test book. It just contains two html files which are actually the same:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>

<body>
  <p>&amp;&lt;&gt;&mdash;&sup2;</p>
</body>
</html>
Open the book and perform no edit. Run Book Check and you get the "Named entities present" warning twice (once for each file). It doesn't matter if you open or close the editors on each of the files, no entities are ever substituted and therefore you always get the warning twice.

Perform any kind of edit in one of the files. Then that file is automatically updated and its entities removed, (but XML ones). It doesn't matter if you open and close the editor or if you don't: when you run Book Check that file warning is gone because the entities have been internally removed.

So, entities are automatically removed, (but XML ones), BUT ONLY IF AND WHEN you make some kind of edit on the file. Is this behaviour intentional? Or should all the entities be removed on the opening of the book even with no edit in the HTML files?

I don't have a formed opinion on it. And probably the current behaviour is the good one, but just in case there's some kind of malfunction you didn't think of, I make this post.

More over, if the current behaviour is fine, could you consider automatically refreshing the editor so no open/close cycle was needed? I mean, even when I'm seeing &mdash; there's no real &mdash; anymore...
Attached Files
File Type: epub Entities Test - Yo.epub (3.5 KB, 176 views)
arspr is offline  
Old 12-12-2013, 10:58 AM   #317
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by jackie_w View Post
Is there a way to insert a new image? I can see how to delete or replace an existing image. Have I missed something?
File: New file (or the paper with Green + icon ) to get the Image into your book (unused )

I have not found the tool to place it with ease. I guess we still need to hand code.
Windows update just shut my laptop (x64) down (supposed to be MANUAL for that reason) while I was typing this on the desktop system and using that for a test case.
as I can't find an Img placing tool
theducks is offline  
Advert
Old 12-12-2013, 10:58 AM   #318
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes it's intentional, as I said "If you have modified text in an editor". But it has been removed, as I realized that some people would find it confusing. So no automatic entity conversion any more. You have to either run Check Book and tell it to fix the entities for you, or perform some other automated action in which case they get changed automatically and the open editors get refreshed automatically.

Last edited by kovidgoyal; 12-12-2013 at 11:01 AM.
kovidgoyal is offline  
Old 12-12-2013, 11:00 AM   #319
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@thedcuks: As I told PeterT, currently there is a whole class of such tools to be implemented. Insert image, embed font, insert/apply stylesheet, insert link, insert heading/bold/italic and so on. Which will all automatically take care of all the bookkeeping and markup generation for you.
kovidgoyal is offline  
Old 12-12-2013, 11:27 AM   #320
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kovidgoyal View Post
@thedcuks: As I told PeterT, currently there is a whole class of such tools to be implemented. Insert image, embed font, insert/apply stylesheet, insert link, insert heading/bold/italic and so on. Which will all automatically take care of all the bookkeeping and markup generation for you.
I was just trying to be complete with my answer above.
These are 2 step actions. Add to the book (Make AVAILABLE), Then Use (place...)

Every change you have made is a step (or two) forward
Amazing
theducks is offline  
Advert
Old 12-12-2013, 01:01 PM   #321
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Yes it's intentional, as I said "If you have modified text in an editor". But it has been removed, as I realized that some people would find it confusing. So no automatic entity conversion any more. You have to either run Check Book and tell it to fix the entities for you, or perform some other automated action in which case they get changed automatically and the open editors get refreshed automatically.
My fault, again. Too fast reading...

Nevertheless, I fully agree with that last change.
arspr is offline  
Old 12-12-2013, 04:28 PM   #322
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by arspr View Post
My fault, again. Too fast reading...

Nevertheless, I fully agree with that last change.
Until you wish it did when you get in a hurry...Where is the "do what I mean key" when we need it!????
mrmikel is offline  
Old 12-12-2013, 04:54 PM   #323
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by mrmikel View Post
Until you wish it did when you get in a hurry...Where is the "do what I mean key" when we need it!????
I don't understand you (my English level???)

But if you mean a "Fix everything" button, you do actually have "Beautify all files" in Tools menu...

But I do really hate software "fixing" things I've not asked it to fix. So I do agree with Kovid in leaving the files untouched (with all their possible flaws) until I explicitly tell the software to modify them.
arspr is offline  
Old 12-12-2013, 05:23 PM   #324
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 think the "do what I mean" key is the mythical key which magically always takes the correct action rather than the (possibly) foolish action we actually requested
jackie_w is offline  
Old 12-12-2013, 05:27 PM   #325
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
I meant that whatever Kovid does, at one time or other, we will wish it worked differently because we are in a hurry that particular time or we overlook doing something.
mrmikel is offline  
Old 12-13-2013, 12:06 AM   #326
joctoral
Junior Member
joctoral began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Device: kobo aura
I tried this new editor and it's a very nice work !!!

Thanks a lot
joctoral is offline  
Old 12-13-2013, 06:28 AM   #327
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
Just tried opening the editor (v1.15) via the context menu and got the following error (while running in debug mode). The editor did open successfully.

Code:
Failed to set metadata for u'The Adventures of Huckleberry Finn'
Traceback (most recent call last):
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/customize/ui.py", line 363, in set_file_type_metadata
    plugin.set_metadata(stream, mi, ftype.lower().strip())
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/customize/builtins.py", line 438, in set_metadata
    set_metadata(stream, mi, apply_null=self.apply_null, force_identifiers=self.force_identifiers)
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/ebooks/metadata/epub.py", line 319, in set_metadata
    newopf = StringIO(reader.opf.render())
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/ebooks/metadata/opf2.py", line 1231, in render
    _pretty_print(self.root)
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/ebooks/metadata/opf2.py", line 41, in _pretty_print
    pretty_opf(root)
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/ebooks/oeb/polish/pretty.py", line 81, in pretty_opf
    children = sorted(manifest, key=manifest_key)
  File "/Users/gregoryriker/Documents/calibredev/source/src/calibre/ebooks/oeb/polish/pretty.py", line 57, in manifest_key
    ext = href.rpartition('.')[-1].lower()
AttributeError: 'NoneType' object has no attribute 'rpartition'

Last edited by GRiker; 12-13-2013 at 06:33 AM.
GRiker is offline  
Old 12-13-2013, 07:27 AM   #328
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Griker: Can you send em the file that caused this.
kovidgoyal is offline  
Old 12-13-2013, 08:05 AM   #329
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
@Griker: Can you send em the file that caused this.
On its way to you.

G

Last edited by GRiker; 12-13-2013 at 08:07 AM.
GRiker is offline  
Old 12-13-2013, 09:10 AM   #330
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
Problem with TOC view combined with Bulk renaming

@kovid,

I'm getting an error in these circumstances:
  1. Open the TOC view
  2. Select all the text files and do a Bulk Rename
  3. Select a text file from the TOC view rather than the Files Browser.

It looks like the TOC viewer is remembering the old filename rather than using the new filename. The workaround is to close the TOC viewer then open it again.

This is the error message:
Spoiler:
Code:
calibre, version 1.15.0
ERROR: Unhandled exception: <b>KeyError</b>:u'Man_Smoke_split_003.html'

calibre 1.15  isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\boss.py", line 69, in ans
  File "site-packages\calibre\gui2\tweak_book\boss.py", line 712, in link_clicked
KeyError: u'Man_Smoke_split_003.html'


Edit: Right-click Refresh on TOC view also fixes it, so maybe it just needs a suitable message to remind the user to do the refresh.

Last edited by jackie_w; 12-13-2013 at 09:18 AM.
jackie_w is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Sigil live varlog Sigil 136 10-25-2013 02:34 PM
how many tocs does Sigil make? Gregg Bell Sigil 17 01-31-2013 09:39 AM
How do I make all .pdf's in my calibre library open in calibre instead of preview morbo3000 Library Management 9 07-30-2011 10:39 AM
using sigil to make changes befote conversion alansplace Sigil 11 06-07-2011 07:50 AM
i can't make sigil run in fedora 14 nastarovia Sigil 1 01-20-2011 05:02 AM


All times are GMT -4. The time now is 01:06 AM.


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