[NFBCS] Diffing and Office files (was Re: Managing Pull Requests on Github with Screenreader)

Drenth, Joe Joe.Drenth at JBTC.COM
Wed Apr 1 22:15:10 UTC 2020


Yes, the "Diff.Tool" configuration setting can point to a custom application for performing difference calculations.

Joseph Drenth 
Senior R&D Software Engineer 
JBT Corporation  |  Automated Systems 
400 Highpoint Drive 
Chalfont, PA  18914, USA
E: joe.drenth at jbtc.com  P: 215 822 4457
www.jbtc-agv.com 

-----Original Message-----
From: NFBCS <nfbcs-bounces at nfbnet.org> On Behalf Of Doug Lee via NFBCS
Sent: Wednesday, April 1, 2020 5:56 PM
To: NFB in Computer Science Mailing List <nfbcs at nfbnet.org>
Cc: Doug Lee <dgl at dlee.org>
Subject: [NFBCS] Diffing and Office files (was Re: Managing Pull Requests on Github with Screenreader)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Pardon the tangent, but does anyone know if Git allows an external diff utility as bzr does, or a filter for each part of a diff? I ask because I wrote a couple of Python utilities a while back for comparing Office files, but I never thought to share them because I thought of them as too tied to my setup. I could certainly let them out of my corner if there is a need. They currently both require Python 3.7.

The utilities, in source form not compiled into anything, are

docStream: Take an Office file and make a text stream of it. A -t flag allows for a rudimentary text content extraction, while normal behavior covers more than just text content.
Warning: If the file type of the given file is not recognized, docStream will try to send it through a utility called strings, which is available under Linux, Cygwin, etc. and is for extracting text from binary files.

docDiff: Given two Office files, generate diff output based on the docStream streams for them.
Requires a diff utility to be available to do the actual comparison and output generation.

On Wed, Apr 01, 2020 at 01:55:43PM -0700, NFBCS mailing list wrote:
        hello Tim.  The command is diff, That's d i f f.
What Joe is talking about is called a unified diff and is created when you use the -u flag to diff.  For unified diffs, new lines begin with a "+"
sign and old lines begin with a "-" sign.  Unmarked lines are context around the change so you can more easily figure out where the change is happening.  There is also the diff -c flag, which stands for contextual diff.  It's similar to the unified diff, but only shows the old lines if they're modified, not if they're deleted.  If you haven't spent much time with this command, I highly recommend that you do.  Using diff makes it very easy to compare different files, especially large ones, and figure out what's changed even when you don't think anything has.  In combination with the sort and uniq commands, dif is an excellent way to detect differences in directory listings, csv files, and a host of other kinds of data.  It's also worth noting that diff, sort and uniq are just ordinary Unix/Linux commands and in no way depend on git, though you can use them with git tools.

Hope that helps.
-thanks
-Brian



_______________________________________________
NFBCS mailing list
NFBCS at nfbnet.org
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Flistinfo%2Fnfbcs_nfbnet.org&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237834785&sdata=u6AWls4DZwg9geo51f81snpua7PN0nNzwLBqb50jGgU%3D&reserved=0
To unsubscribe, change your list options or get your account info for NFBCS:
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Foptions%2Fnfbcs_nfbnet.org%2Fdgl%2540dlee.org&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237834785&sdata=LBLEgd7Lv9AurtuiR8KmeZYtkIxkEW7vBxrWcQcqdQI%3D&reserved=0

--
Doug Lee                 dgl at dlee.org                https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dlee.org&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237844780&sdata=YL%2BeR%2BRqHIi0eaAflzyDXGFayRzHRX6TK4H6fWmNZts%3D&reserved=0
Level Access             doug.lee at LevelAccess.com    https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.LevelAccess.com&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237844780&sdata=13n%2Ff%2BONXNIaGdomL7cyhQ3v4Cl2fWAzRkief2Jf9kw%3D&reserved=0
"When there is no enemy within, the enemies outside cannot hurt you."
--African Proverb

_______________________________________________
NFBCS mailing list
NFBCS at nfbnet.org
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Flistinfo%2Fnfbcs_nfbnet.org&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237844780&sdata=QDM81lz8wbHAtmo9uyOx6NpfNIvxeRMeIEozFDCoWUc%3D&reserved=0
To unsubscribe, change your list options or get your account info for NFBCS:
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Foptions%2Fnfbcs_nfbnet.org%2Fjoe.drenth%2540jbtc.com&data=02%7C01%7Cjoe.drenth%40jbtc.com%7Ca642f528fd904565873108d7d6879b72%7C91c2207902ce47e8bb5bc93a3d5f1a78%7C0%7C0%7C637213750237844780&sdata=mNZ4AHpOq0%2FpVwYNHd%2B0cT%2Fmteh3acMD3Dkl3inpu%2BA%3D&reserved=0




More information about the NFBCS mailing list