Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2014, 03:09 AM   #31
Feldegast
Junior Member
Feldegast began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2014
Device: samsung galaxy s2
Quote:
Originally Posted by kovidgoyal View Post
A diff tool is useful for seeing the changes in the code of a book. If you want to compare two books to see which one to keep, open them in the viewer.
a diff tool has many uses the the idea that a tool can only be used for 1 thing is a little short sighted... designing a tool so that many use cases are feasable is smart design. Comparing books to decide which to keep is something i bet many people using Calibre would use. currently opening the 1st then comparing to another does work but how is this different to selecting both books from rhe library? you could select a totaly different book in the editor and selecting both from the library makes sure the right book is selected instead of making sure the directory is the one you want when opening the 2nd book.

Unfortunately the viewer is not realy up to the task of showing differences in multiple files quickly... The best alternative i can think of currently is extracting both books then using a tool like winmerge, to show differences then selecting the book to keep... winmerge also allows eding side by side which is handy...
Feldegast is offline   Reply With Quote
Old 06-17-2014, 03:41 AM   #32
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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Well I'm afraid designing a tool for multiple uses is too smart for poor old me.

> /dev/null
kovidgoyal is offline   Reply With Quote
Advert
Old 06-17-2014, 06:52 AM   #33
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Hi Kovid,
I just do some translations and I check the diff tool from command line.

The translation string gives an example:
calibre-debug --diff file2 fiel1
Instead of:
calibre-debug --diff -- "file 2.epub" "file 1.epub"

The User Guide for Command Line Interface has sometimes problems with --. There is shown sometimes a – instead of --.

Example for calibre-debug:
In general description and for commands like this (and for some other):
--diff
Run the calibre diff tool. For example: calibre-debug –diff – file1 file2

An additional point: I often recognize that users came in trouble because they don't know how to use an option correctly. Most commonly are missing quotation marks because of a file name with spaces or/and missing file extensions like "book 1" -> "book 1.epub". Path names are also a point. Maybe it is a good idea to put this as an explanation in the first place of chapter Command Line Interface

Finally, I recognize a different behavior at the bottom of the window for the information line (pls. see picture, first part is via command line and below part is via editor).You show the information about which files are part of the comparison if I open the diff tool from the editor. This is missing if I open the tool via command line.
Attached Thumbnails
Click image for larger version

Name:	AufzeichnenComp.JPG
Views:	204
Size:	221.3 KB
ID:	124280  

Last edited by Divingduck; 06-17-2014 at 06:55 AM.
Divingduck is offline   Reply With Quote
Old 06-17-2014, 07:51 AM   #34
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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The diff tool does not work only for epubs, but for all file types. I even use it as my primary code diff tool for developing calibre. The necessity for adding -- before the filenames is actually a bug, which has been fixed for the next release, which is why the translation string changed.

And the help for all the command line tools (except for a couple) has a note about enclosing file arguments in quotes. See for example here: http://manual.calibre-ebook.com/cli/ebook-convert.html

As for the double hyphen to mdash problem that is a limitation of the documentation generation system calibre uses.
kovidgoyal is offline   Reply With Quote
Old 06-17-2014, 08:44 AM   #35
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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This commit should help fix the problem of -- becoming an em-dash

https://github.com/kovidgoyal/calibr...d0bb00840ea125
kovidgoyal is offline   Reply With Quote
Advert
Old 06-17-2014, 09:06 AM   #36
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Thanks for your quick answer.
I need to make a correction in the translation, because I add it again. Good to know, will be remove within then next hour.

I just recognize you are experimenting with the double hyphen

To the file name, it was only an example to use the epub ext. Maybe "file.ext" is a better description. My intension was mainly to let you know this is a question I become quite often if a normal user try to start with command line.

Edit: You was much faster and you add a remark. Very nice
Thanks a lot!

Last edited by Divingduck; 06-17-2014 at 09:11 AM.
Divingduck is offline   Reply With Quote
Old 06-17-2014, 10:50 AM   #37
Feldegast
Junior Member
Feldegast began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2014
Device: samsung galaxy s2
Quote:
Originally Posted by Divingduck View Post

calibre-debug --diff file2 fiel1
Instead of:
calibre-debug --diff -- "file 2.epub" "file 1.epub"
now i know why it wasn't working!

at least until the next upgrade.. but as was said just go back to without the extra --
ty again!
Feldegast is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing epubs after using Regex Gregg Bell Sigil 3 08-02-2013 10:22 PM
Comparing epubs DrChiper Sigil 10 05-01-2013 01:45 PM
OnLive on the Kindle Fire - WOW WOW WOW WOW WOW! Jessica Lares Kindle Fire 13 12-12-2011 03:47 PM
Wow Hardback books are HUGE!! =X= General Discussions 32 12-14-2010 12:13 PM
help comparing 600 and 900 intelfail Sony Reader 0 06-14-2010 01:06 PM


All times are GMT -4. The time now is 01:51 PM.


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