News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

diffcar - compare CAR*.RES files

Started by Duplode, January 28, 2024, 04:51:32 PM

Previous topic - Next topic

Duplode

I'm happy to announce the release of diffcar, a command line tool for comparing and detecting changes in CAR*.RES files. diffcar currently offers two commands. The first one is diffcar single, which takes a pair of CAR*.RES files and prints a nicely formatted, Stunts-aware diff of them:



The second one is diffcar report which takes two directories and prints diffs of files with matching names (case insensitively) that exist in both of them. The output is printed to the terminal by default; you can specify a destination file instead with the -o option.

You can download Windows and Linux binaries from GitHub: https://github.com/duplode/diffcar/releases/tag/v0.1.0.0 . As ever, feedback is most welcome!

Cas

This is really good!  So the report would separate the list of differences by car ID, in the same format, right?  Very useful for somebody who's working on a car and needs to check without going back and forth between existing cars.

I still have to release a car of my own!
Earth is my country. Science is my religion.

Duplode

Quote from: Cas on January 28, 2024, 08:23:19 PMSo the report would separate the list of differences by car ID, in the same format, right?

Yup: it prints the diffs in that format, separated by headers with the pair of file paths. Here's a sample:

------------------------------------------------------------------------
scr/CARSHML.RES
ryo/CARSHML.RES
------------------------------------------------------------------------

Car {gsna = "Shamal\NUL" /= "Sha\NUL", simd = Simd {carMass = 29 /= 34}}
------------------------------------------------------------------------
scr/CARSTOC.RES
ryo/CARSTOC.RES
------------------------------------------------------------------------

_
------------------------------------------------------------------------
scr/CART832.RES
ryo/CART832.RES
------------------------------------------------------------------------

Car
  { gsna = "Thema\NUL" /= "T832\NUL"
  , simd = Simd {carMass = 28 /= 30, brakingEff = 256 /= 285}
  }


Lately I've been using the tool to detect performance changes between different releases of cars, and it's been very helpful for that purpose.

Cas

Really convenient!  The only thing I had done in that regard was when Daniel3D asks me to auto-generate a spreadsheet with the car specs. Not sure where I left the program that generates that. But it's a lot better to be able to just select which cars and characteristics you want to compare, like you do here
Earth is my country. Science is my religion.