9
9
what has changed inside an ebook after editing or converting it. It can compare
10
10
books in the EPUB and AZW3 formats.
12
To use it, either open the ebook file the tool for :ref:`edit` and then click
13
:guilabel:`File->Comapre to other book` or use the :ref:`book_details` panel.
12
To use it, either open the ebook in the tool for :ref:`edit` and then click
13
:guilabel:`File->Compare to other book` or use the :ref:`book_details` panel.
14
14
If you do a conversion from EPUB to EPUB, the original EPUB file will be saved
15
as ORIGINAL_EPUB. Simply right click ont he ORIGINAL_EPUB entry in the Book
15
as ORIGINAL_EPUB. Simply right click on the ORIGINAL_EPUB entry in the Book
16
16
Details panel and choose :guilabel:`Compare to EPUB format`.
18
18
The comparison tool that opens will look like the screenshot below. It shows
19
19
you the differences in text, styles and images in the chosen books.
21
21
.. image:: images/diff.png
22
:alt: The comapre tool
22
:alt: The compare tool
25
26
Understanding the comparison view
26
27
----------------------------------
28
This page is under construction.
29
As can be seen in the screenshot above, the comparison view shows the
30
differences between the two books side by side. Only the differences, with a
31
few lines of context around them are shown. This makes it easy to see at a
32
glance only what was changed inside a large document like a book.
34
Added text is shown with a green background, removed text with a red background
35
and changed text with a blue background.
37
The line numbers of all changed text are show at the sides, making it easy to
38
go to a particular change in the editor. When you open the comparison tool from
39
within the editor, you can also double click on a line in the right panel to
40
go to that line in the editor automatically.
42
One useful technique when comparing books is to tell the comparison tool to
43
beautify the text and style files before calculating differences. This can
44
often result in cleaner and easier to follow differences. To do this, click the
45
:guilabel:`Options` button in the bottom right and choose :guilabel:`Beautify
46
files before comparing`. Note that beautifying can sometimes have undesired
47
effects, as it can cause invalid markup to be altered to make it valid. You can
48
also change the number of lines of context shown around differences via the
49
:guilabel:`Options` button.
51
You can search for any text in the differences via the search bar at the
52
bottom. You will need to specify which panel to search, the :guilabel:`Left` or
53
the :guilabel:`Right`.
55
How to launch the comparison tool
56
-----------------------------------
58
The comparison tool is most useful when you have two versions of the same book
59
and you want to see what is different between them. To that end, there are
60
several ways to launch the tool.
62
Comparing two ebook files
63
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
Open the first file in the :ref:`edit` tool. Now click :guilabel:`File->Compare
66
to another book` and choose the second file (it must be in the same format as
67
the first). The comparison view will open with the file being edited on the
68
right and the second file on the left.
70
Comparing the ORIGINAL_FMT to FMT
71
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
When you do a conversion in |app| from a FMT to itself, the original file is
74
saved as ORIGINAL_FMT. You can see what was changed by the conversion, by right
75
clicking on the ORIGINAL_FMT entry in the :ref:`book_details` panel in the main
76
|app| window and selecting :guilabel:`Compare to FMT`. The comparison view will
77
open with ORIGINAL_FMT on the left and FMT on the right.
79
Comparing a checkpoint to the current state of the book while editing
80
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
The :ref:`edit` tool has a very useful feature, called :ref:`checkpoints`. This
83
allows you to save the current state of the book as a named
84
*checkpoint*, to which you can revert if you do not like the changes you have
85
made since creating the checkpoint. Checkpoints are also created automatically
86
when you perform various automated actions in the editor. You can see the list
87
of checkpoints by going to :guilabel:`View->Checkpoints` and then use the
88
:guilabel:`Compare` button to compare the book at the selected checkpoint with
89
the current state. The comparison tool will show the checkpoint on the left and
90
the current state on the right.