Comparing TOCs
-
ccardimon
- Propellus Maximus
- Posts: 1571
- Joined: Fri Jan 11, 2008 1:30 pm
- Location: Horsham, Pennsylvania
Comparing TOCs
Is there a way to compare one TOC to another that is organized differently, to see what is missing?
Craig
Lost in Disturbia
Lost in Disturbia
Re: Comparing TOCs
Within the same project or between projects? It's been awhile since I've done this, but I believe you can still open two files side-by-side by docking one in the left or right pane. If they're in different projects, then you can open two instances of Flare and compare them side by side.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
ccardimon
- Propellus Maximus
- Posts: 1571
- Joined: Fri Jan 11, 2008 1:30 pm
- Location: Horsham, Pennsylvania
Re: Comparing TOCs
Same project. I'm trying to re-organize things better, but my new TOC is off by about 20 items.
Craig
Lost in Disturbia
Lost in Disturbia
Re: Comparing TOCs
Disclaimer: The following solution is meant for users that are comfortable working outside of Flare to view/modify/compare source code.
If I were faced with this situation, I would perform the following steps:
1. Copy the source code for TOC A and paste it into Notepad++.
2. Reformat the XML so that each tag is placed on a separate line. One way of accomplishing this is by selecting all of the text and then using the Pretty Print (libxml) [experimental] function of the XML Tools plugin.
3. Select all of the text again and then press SHIFT + TAB various times until there are no indented lines.
4. Copy the reformatted text and paste it into Excel.
5. Sort by Column A.
6. Copy the sorted tags and paste it into a code comparison tool. Personally, I use a tool called Code Comparison. It color codes changes to allow you to quickly assess the differences between two files. Additionally, it also allows you to quickly resolve key differences by applying one version of a line to the other file.
7. Repeat steps 1 - 6 for TOC B.
There will be plenty of unimportant differences between the two files. However, you will want to pay special attention to differences for <TocEntry ...> lines.
If I were faced with this situation, I would perform the following steps:
1. Copy the source code for TOC A and paste it into Notepad++.
2. Reformat the XML so that each tag is placed on a separate line. One way of accomplishing this is by selecting all of the text and then using the Pretty Print (libxml) [experimental] function of the XML Tools plugin.
3. Select all of the text again and then press SHIFT + TAB various times until there are no indented lines.
4. Copy the reformatted text and paste it into Excel.
5. Sort by Column A.
6. Copy the sorted tags and paste it into a code comparison tool. Personally, I use a tool called Code Comparison. It color codes changes to allow you to quickly assess the differences between two files. Additionally, it also allows you to quickly resolve key differences by applying one version of a line to the other file.
7. Repeat steps 1 - 6 for TOC B.
There will be plenty of unimportant differences between the two files. However, you will want to pay special attention to differences for <TocEntry ...> lines.
Joe
(Flare 2017 r2 - Windows 7 64)
(Flare 2017 r2 - Windows 7 64)
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Comparing TOCs
No need to work outside of Flare. Lisa's on the right track.
Open the TOCs side by side (by floating one and then docking it to the right or left of the other one). Then, in each, click the View button on the TOC Editor's toolbar to switch to Grid view. Once there, you can SORT the TOCs by the Link column (by any column, actually, but the Link column is probably your best best). You'll then be able to work your way down, comparing row by row, until you hit a topic that is present on one TOC but not on the other.
Open the TOCs side by side (by floating one and then docking it to the right or left of the other one). Then, in each, click the View button on the TOC Editor's toolbar to switch to Grid view. Once there, you can SORT the TOCs by the Link column (by any column, actually, but the Link column is probably your best best). You'll then be able to work your way down, comparing row by row, until you hit a topic that is present on one TOC but not on the other.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Comparing TOCs
Edit: Ignore this. I didn't initially see the point about the TOCs being structured differently.
Another option is to use a diff tool, such as Beyond Compare (my preference) or WinMerge (free). Here are the links to the sites:
WinMerge http://winmerge.org/?lang=en
Beyond Compare http://www.scootersoftware.com/
Another option is to use a diff tool, such as Beyond Compare (my preference) or WinMerge (free). Here are the links to the sites:
WinMerge http://winmerge.org/?lang=en
Beyond Compare http://www.scootersoftware.com/
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Comparing TOCs
(I know you said to ignore your suggestion, but for benefit of others, I thought some explanation about why BC wouldn't help was in order.)
I use Beyond Compare, too. It's a great little tool. I think every Flare author should have it in his or her tool kit, and I'm glad you mentioned it.
However, I think it would be WAAAY overkill for what Craig is trying to accomplish. He just wants to know which 20 or so topics that he has on the first TOC he's neglected to put on the second TOC, which he says organizes the topics in a completely different way than the first TOC. If he were to use Beyond Compare to compare the code of the two files, he's going to have to shift through potentially hundreds of differences in the *locations* of topics, just to figure out which are the missing 20 or so. But with Flare's Grid view of the TOCs, he can sort them in the same way and then probably fairly quickly find which 20 or so are on TOC 1 but are not on TOC 2.
I use Beyond Compare, too. It's a great little tool. I think every Flare author should have it in his or her tool kit, and I'm glad you mentioned it.
However, I think it would be WAAAY overkill for what Craig is trying to accomplish. He just wants to know which 20 or so topics that he has on the first TOC he's neglected to put on the second TOC, which he says organizes the topics in a completely different way than the first TOC. If he were to use Beyond Compare to compare the code of the two files, he's going to have to shift through potentially hundreds of differences in the *locations* of topics, just to figure out which are the missing 20 or so. But with Flare's Grid view of the TOCs, he can sort them in the same way and then probably fairly quickly find which 20 or so are on TOC 1 but are not on TOC 2.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
ccardimon
- Propellus Maximus
- Posts: 1571
- Joined: Fri Jan 11, 2008 1:30 pm
- Location: Horsham, Pennsylvania
Re: Comparing TOCs
Nita Beck wrote:Open the TOCs side by side (by floating one and then docking it to the right or left of the other one). Then, in each, click the View button on the TOC Editor's toolbar to switch to Grid view. Once there, you can SORT the TOCs by the Link column (by any column, actually, but the Link column is probably your best best). You'll then be able to work your way down, comparing row by row, until you hit a topic that is present on one TOC but not on the other.
Great tip! Thanks, Nita. Using it now.
Craig
Lost in Disturbia
Lost in Disturbia
Re: Comparing TOCs
@Nita: Nice tip! I completely forgot about Grid view. Also, I noticed that the grid view has an export data to a CSV file. This feature could be used to quickly export sorted topics and then perform a title or link comparison. This would avoid having to manually review hundreds of entries for 20 differences.
FYI, the reason that I suggested using a comparison tool in the first place is that the TOCs are structured differently. If the TOCs were structured in a similar fashion, then it would be a little easier to eyeball the changes. AFAIK, topic locations should not change between two TOCs within the same project.
FYI, the reason that I suggested using a comparison tool in the first place is that the TOCs are structured differently. If the TOCs were structured in a similar fashion, then it would be a little easier to eyeball the changes. AFAIK, topic locations should not change between two TOCs within the same project.
Joe
(Flare 2017 r2 - Windows 7 64)
(Flare 2017 r2 - Windows 7 64)
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Comparing TOCs
This is what I love about these forums. One person's (Lisa's) idea leads to another person's (my) idea which leads to another person's (your) idea.ecjoe wrote:Also, I noticed that the grid view has an export data to a CSV file. This feature could be used to quickly export sorted topics and then perform a title or link comparison. This would avoid having to manually review hundreds of entries for 20 differences.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!