comandline options

Post your new features ideas and suggestions here.
Post Reply
ringo gutzeit
Posts: 3
Joined: Wed Jul 26, 2006 9:04 am

comandline options

Post by ringo gutzeit »

Hi,

I evaluated CompareIT and it's really great.

Nevertheless, some features on command line are missing or I could not find, which we need to automate comparision of pdf files.

We try to compare pdf files with exactly or nearly the same content in regression tests.
There are some differences which are wanted changes.
These we want to mask, e.g. the timestamp, contract number.

Is there a possibility to ignore differences on command line.

If not, is there a possibility to do the conversion from pdf to txt in one step
where we have the chance to mask the differences in the txt file and to compare the txt files in step two ?

Other tools we tried have either not the possibility to convert encrypted pdfs or fail on some encrypted files, which does not happen with CompareIT using the pdf plugin.

Hopefully you know a way to help us.

Thanks a lot.

Regards Ringo.

grigsoft
Site Admin
Posts: 1673
Joined: Tue Sep 23, 2003 7:37 pm
Contact:

Post by grigsoft »

Well, first you should configure pdf plugin in Options>Converters and specify to use it on all *.pdf files. This should make Compare It! convert pdf files on-the-fly even in command line mode. Next, configure RegExp in Options>Comparison>UseRegularExpressions to ignore evrything you want, and again specify that this rule(s) should be applied for *.pdf files. This should work.

ringo gutzeit
Posts: 3
Joined: Wed Jul 26, 2006 9:04 am

works but does not cover all

Post by ringo gutzeit »

Thanks for the hint.

First tests showed that this might cover two important cases.
One document checked and it did work without negative effects.

One important case is, that we want to ignore date fields,
which contain the date of the creation and only this date of the pdf file.
As the files also contain other date fields, which we do not want to mask, this can not be done by a regular expression in CompareIT actually.
Maybe you can provide a set of functions which can be used in the compariosion part. Especially a function which returns the creation date of the file in the format one might want which then can be used in the options for ignoring changes.

One other important point is the problem of having to use the gui for altering the comparision options. We have pdf's which have to be compared using one set of rules and we have pdf's which have to be compared using an other set of rules which exclude the rules for the first kind pdf's.

As we want to use it in an automatation for comparing pdf's, it is not acceptable to modifiy the options using the gui between two automatic runs.

Is it possible to use a diferent set of comparision options on diferent runs via defining an option file on command line?

Thanks and regards.

Ringo

grigsoft
Site Admin
Posts: 1673
Joined: Tue Sep 23, 2003 7:37 pm
Contact:

Post by grigsoft »

Ringo,
Maybe there are some other context, which could be used in regexp to filter just this one date? As an example, maybe it looks like "Creation date: 99999" or just is placed at the beginning of the line?

As for different rules, if you know which files to handle differently, the simpliest way would be changing extension to pdf2, as an example. In pdf conversion you can then change mask to "*.pdf; *.pdf2", and RegExps would be applied for different files.

ringo gutzeit
Posts: 3
Joined: Wed Jul 26, 2006 9:04 am

good hint

Post by ringo gutzeit »

Hi,

its a good idea to use the extension of a file to select the required filters.

This will solve that question.

Regarding the date, I will give you a short example:

File one will contain:

some text 18.07.2006

18.07.2006

some other text 18.07.2006

18.07.2006 yet an other text

an text 20.11.2010
an other text 13.04.2011
19.07.2014
text 31.12.2015 text
.....


File two will contain:


some text 09.07.2006

09.07.2006

some other text 09.07.2006

09.07.2006 yet an other text

an text 20.11.2010
an other text 13.04.2011
19.07.2014
text 31.12.2015 text

.....



we want to see if the date 20.11.2010, 13.04.2011, 19.07.2014
or 31.12.2015 changes, as the wanted test result is that there is no difference.
But the date 18.07.2006 in file one and 09.07.2006 in file two,
we want to mask by DD.MM.YYYY.

But this will only work if we can get the creation date of the file.

Do you have a solution for that, maybe in the next version ?
I think there a some functions which might be very usefull in the filtering part.

Actually we favor the use of four tools.
One for converting the pdf to the txt.
Then using sed to mask irrelevant changes in the file.
Then using a tool to compare the files and create report.
Then modifing the report and creating a summary report via a script.

As we have already the license for the tools and it works fairly OK,
we will only cange if one tool can take over all this four steps in one.

Compare It is only lacking one point in the masking part,
otherwise it would be perfect.

Thanks and regards, Ringo.

grigsoft
Site Admin
Posts: 1673
Joined: Tue Sep 23, 2003 7:37 pm
Contact:

Post by grigsoft »

Well, I see the only way to do it - adding some special syntax to RegExp to reflect date of file. Something like \D, \M, \Y, which can be used for filtering. This is not a big problem, at least from the first sight, so I will try to add this in next update.

Post Reply