Privacy and Security Notice

New Tools for sorting/comparing/counting .db files


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New Tools for sorting/comparing/counting .db files




Capfast has an annoying tendency to completely reorder its output files
in response to small changes in schematics. This makes it difficult to
identify changes between versions. I have added three new tools to
appSRcebaf/tools/ to make it easier to assess changes in .db files.

dbcount file1.db [file2.db ...]

This script takes a list of .db files as arguments and reports the
number of records in each and the total number of records in all.

dbsort file.db >sortedfile.db

This script takes a single .db file as argument and writes a sorted
version to stdout. The records are sorted first by record type, then
record name. The fields within each record are also sorted by field
name. The output is a valid .db file.

dbdiff file1.db file2.db

This script takes two unsorted .db files, sorts them, and writes the
diff of the sorted versions to stdout. The original files are not
modified.

These scripts should make it much easier to identify changes between
versions of .db files. I propose making dbsort a standard step in the
makefile. This will make the .db files easier to read and search and
will eventually make dbdiff unnecessary.

--Brian Bevins