topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 20, 2019, 04:16 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Wish: NumberComparer tool to compare two list of words and export differences  (Read 2198 times)

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
I need a tool to compare list of strings (numbers and chars).

Maybe someone is interested?  ;)  :Thmbsup:


Like
List A | List B | Result 'C'|
123DF..|.123df..| In Both...|
123X...|........| In A......|
.......|.133X...| In B only.|
___....|.444....| In B .....|
x456...|.X456...| In Both...|
789....|.___....| In A......|
___....|.888....| In B......|
-------------------------------
___4___|__5_____| A:2 / B:3 / C:2|
----------------------------------





Wanted features:
- Standalone, portable EXE plus INI for Win7 and newer
- Whole line comparing, do not compare inside string (123X and 133X are completely different)
- Working with lists with ~150.000 entries,  maybe 10 to 15 sign long each entry
- Show amount of entries in status bar for A and B column, maybe for Result too?
- Result column features: in A only / in B only / in both A and B (Doubles) / in A or B unique (in A only + in B only = together)
- Sort the result column
- Filter the result column
- Export the result column (copy to clip, or export to current working dir,.... maybe the folder from List A)
- Command line option: provide both list as path (NumbComp.exe C:\Temp\ListA.txt C:\Temp\ListB.txt)
- Drag&Drop lists to the GUI


- Maybe possibility to remove duplicated entries (without sorting) from  List A and from List B
- Maybe export unique entries from both list together (merged A+B+Both, remove duplicates)
- Maybe automated command line option to load lists, compare and export as wanted (e.g. A only, -or- That only in both)
(NumbComp.exe C:\Temp\ListA.txt C:\Temp\ListB.txt /O __Result_%timestamp% /F InBothOnly)
- Maybe option to compare case-sensitive (not need by me right now; 123x and 123X are same)
- Maybe in-line comparing (not need by me right now; x456 and X456 would be different)
- Maybe allow to work with one single file only, for to sort or to remove duplicates


I have done that in VBS and PoSh, but want a GUI,
and I have done that in Excel (2016/32-bit), but that will freeze my PC (16G RAM) for some minutes...
And I would had to take care to copy the formula down the whole lines till the end.
I also have tried a  few text comparing tools, but non have satisfied me.


Thanks in advance.



 
« Last Edit: January 31, 2019, 09:30 AM by AbteriX, Reason: added specification for "- Result column features:" »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,366
    • View Profile
    • Donate to Member
A few developer tools come to mind:
- Compare It! by Grigsoft (shareware, my personal favorite)
- Beyond Compare by Scooter Software (shareware)
- WinMerge (OSS)

They may need some configuration/settings to act as described.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,055
    • View Profile
    • Donate to Member
I'm not sure how much (if any) this helps, but you might like to review these threads (in which I bang on about Unix comm):

DONE: Are any of the files missing???

Compare text files and keep only the DIFFERENT lines?

I also mentioned fintrsct = File Intersection.  Its home page seems to have disappeared, so I attach the latest version I know of.  DC's forum software won't let me upload a tar.bz2 file, so I've had to ZIP it.
« Last Edit: January 28, 2019, 05:49 PM by rjbull »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,234
    • View Profile
    • Donate to Member
I have done that in VBS and PoSh, but want a GUI,

If you've already done a PoSh script then why not design and add a GUI to it using POSHGUI ?

It's pretty easy to integrate into your script.

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,184
    • View Profile
    • Donate to Member
I'm not sure how much (if any) this helps, but you might like to review these threads (in which I bang on about Unix comm):

Probably not much use if he wants a GUI yes, but unix tools are great for munching text, for instance in WSL on my Win10 machine:

comm -12 <(sort -u english.txt) <(sort -u danish.txt) | wc -l

sorts a 4 MB list of random english words, sorts a 2 MB list of random danish words, finds all lines in common, and counts how many, in less than a second. I would assume PowerShell is similarly effective at this.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,166
    • View Profile
    • Donate to Member
I need a tool to compare list of strings (numbers and chars).
Maybe someone is interested?  ;)  :Thmbsup:

Do you have any sample files we can work with?

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Thanks you all for your kind interest!

File Intersection looks good. Same output as my own scripts.
POSHGUI is interesting, I have to play more with this.
But since I have played with AHK ListView, I can imagine that that would be a far way to go for me.

All that command line tools are looking good and are fine with me, but for a quick overview and filtering I prefer a GUI right now.



- - -

Thanks for jumping in, skwire!

Do you have any sample files we can work with?


Nothing special I am thinking of right now.
Just lines as generated for example with "http://www.den4b.com/tools/regex" plus an hyphen in between.
Maybe lines with a few words too? Basically only compare each line from A with each line from B?!?
My think, the special I am looking for is the result column plus the export of that result.


Here are shorter lists I tested with (do you need lists with 100.00 lines?):

List A
X003223450753
X073847643953
lowercase
NurInEins
X10GC562
uppercase
X11LJX72
X11TV062
InBeidenInBoth
X12CRPC2
X12KTX72
X12P4NC2
X12SLPF2
X13MQPC2
InOneOnly
X13YFX72
ThisIsInBoth
XMXL7241VN8
XMXL7311V4X
MPC-DD-E0304
MPC-DD-E3497
MPC-PR-E0180
MPC-PR-E0192
http://www.den4b.com/tools/password
CH3J7K6J5E
TBFDWZR34B
67V93JCLH4
DL85U69MB5
RV5XYNE997
A54V5T4637
Y5FVX2NX8Q
MN6D6SR9QR
6QGX789Y53
UPT269KGWF
----
Plus 120.000 more


List B
X003223450753
X073847643953
ThisIsInBoth
X10GC562
PapaBaer
OnlyInTwo
X11LJX72
LadyGaga
X11TV062
X12CRPC2
X12KTX72
ZweiTwo
12345678
X12SLPF2
TwoZwei
X13YFX72
XMXL7241VN8
XMXL7311V4X
InBeidenInBoth
UPPERCASE
LOWERCASE
----
https://xkpasswd.net/s/
these EVERYONE grass
level FIFTY first
coat WORD past
-----
And maybe 8.000 more



- - - Results:

in A only
lowercase
NurInEins
uppercase
X12P4NC2
X13MQPC2
InOneOnly
MPC-DD-E0304
MPC-DD-E3497
MPC-PR-E0180
MPC-PR-E0192
http://www.den4b.com/tools/password
CH3J7K6J5E
TBFDWZR34B
67V93JCLH4
DL85U69MB5
RV5XYNE997
A54V5T4637
Y5FVX2NX8Q
MN6D6SR9QR
6QGX789Y53
UPT269KGWF
Plus 120.000 more


in B only
PapaBaer
OnlyInTwo
LadyGaga
ZweiTwo
12345678
TwoZwei
UPPERCASE
LOWERCASE
https://xkpasswd.net/s/
these EVERYONE grass
level FIFTY first
coat WORD past
-----
And maybe 8.000 more


in both
X003223450753
X073847643953
ThisIsInBoth
X10GC562
X11LJX72
X11TV062
X12CRPC2
X12KTX72
X12SLPF2
X13YFX72
XMXL7241VN8
XMXL7311V4X
InBeidenInBoth




 
 

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,166
    • View Profile
    • Donate to Member
Is there a need to actually display both A and B lists in a listview?  The reason I ask is that loading 100000+ lines, without some tricks, can take a while.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Is there a need to actually display both A and B lists in a listview?

That was the whole purpose: having all that for an overview, side-by-side.


But now I must ask myself... for what? I would have to scroll, which I don't would do for sure.
Maybe I have to redesign my wish, maybe just a tool to load two lists and display a numeric result, with option to export?

--------------------------------------------
List A:[ ____________][...] 645 lines
List B:[ ____________][...] 378 lines
Duplicates: 23
[Remove B from A, without sorting, and export] (611 lines) Purpose: have one list A, and a white list B to remove from A.
[Merge both, Remove Dups, without sorting, and export] (1.000 lines) Purpose: have two lists, merge both, but remove duplicates
--------------------------------------------


Export to same folder and file name as A, but add a suffix.

Me think I could do that new design on my own too.



Thanks for all the help!
Sorry, I really want such GUI-Tool as mentioned in my first post, but must say now, it would not really made much sense, isn't it?




 

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
I think I have found a way to handle my work like that:
2019-02-01 151355 # Clipboard.pngWish: NumberComparer tool to compare two list of words and export differences

2019-02-01 153100 # Clipboard.pngWish: NumberComparer tool to compare two list of words and export differences


I think my biggest fear was how to add the file content to the ListView. Which I now know that content is not really necessary.
(I can work with ListView, but it was more the 'c' column with sort and filter and export...)


Thanks for all the support, I will try to upload that "tool" somewhere once I am finished.



 
« Last Edit: February 01, 2019, 08:32 AM by AbteriX »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,166
    • View Profile
    • Donate to Member
I will try to upload that "tool" somewhere once I am finished.

Nice job -- looking forward to it.   :Thmbsup: