Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Screenshot of some text of a German contract in a terminal. One of the sections has basically the same text, but some dates changed. The dates from a.txt are displayed in red, the ones from b.txt in green.

Download link

https://assets.chaos.social/media_attachments/files/110/854/973/739/916/764/original/477b184310ed6a30.png

Notices where this attachment appears

  1. scy (scy@chaos.social)'s status on Tuesday, 08-Aug-2023 21:09:51 UTC scy scy

    Okay, so. I have a #PDF and a #DOCX file. And I’d like to compare them. And since I’m a programmer, I don’t want to compare them visually, but with a #diff. But how?

    Like this.

    alias pdfcat='gs -q -sDEVICE=txtwrite -o-'
    alias doccat='pandoc -t plain'

    pdfcat a.pdf > a.txt
    doccat b.docx > b.txt

    git diff --no-index --word-diff a.txt b.txt

    And since we’re using --word-diff, it doesn’t matter that the two files use _wildly_ different line wrapping.

    #Unix #Linux #terminal #CLI

    In conversation Tuesday, 08-Aug-2023 21:09:51 UTC from chaos.social permalink
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.