Packages
tech_stack_changes
1.0.0
Elixir library and Mix task that compares two CSV snapshots of technologies per domain and lists what was added and removed.
Current section
Files
Jump to
Current section
Files
tech_stack_changes
README.md
README.md
# tech_stack_changes
Elixir library and Mix task. Give it two CSV snapshots of technologies per domain (columns domain, technology; one row per pair) and it lists what changed: for each domain present in both snapshots, the technologies added (in the new file only), removed (in the old file only) and how many stayed the same, then the totals and the technologies added or removed on the most domains.
Rules: a domain is trimmed and lower-cased. A technology is trimmed, inner whitespace is collapsed to one space, and it is compared case-insensitively; the first spelling seen is the one shown. The same pair twice counts once, and the number of repeated rows is reported. Header names are matched trimmed and case-insensitive, extra columns are ignored, and a UTF-8 BOM and CRLF line endings are accepted. Changed domains are sorted by added plus removed (highest first), then by domain. The most added and most removed lists sort by the number of domains (highest first), then by name; `--top N` (a whole number of 1 or more, default 5, set by you) sets how many entries they show.
A domain that appears in only one of the two files is listed on its own and gives no added or removed technology: a domain missing from a snapshot is not proof that a technology was dropped, so the tool does not infer that.
What it does not do: it compares two lists you give it. It detects no technology, reads no vendor data and calls nothing.
Exit code 0 means the report was printed, 2 means the input could not be used: a missing file, a missing column, no data rows, an empty domain or technology (the message names the file and the data row) or a bad option.
Part of the [OneGTMLab](https://www.onegtmlab.dev) free GTM tools. Background on the idea: [BuiltWith](https://www.onegtmlab.dev/tool-directory/enrichment/builtwith).
## Install
```
{:tech_stack_changes, "~> 1.0"} # in mix.exs deps
```
## Use
Two files, old.csv and new.csv, each with the columns domain, technology. The sample uses invented example domains and labels such as Tool A.
```
$ mix tech_stack_changes old.csv new.csv
domains in old: 5
domains in new: 4
domains in both: 3
domains in both with changes: 2
technologies added: 3
technologies removed: 3
technologies unchanged: 4
repeated rows ignored: old 1, new 0
changes (domain: +added | -removed):
gamma.example.com: +Tool A, +Tool D | -Tool B, -Tool C
alpha.example.com: +Tool D | -Tool C
not in the other snapshot (a missing domain is not proof a technology was dropped):
only in old: delta.example.com, epsilon.example.org
only in new: zeta.example.org
most added (top 5):
Tool D: 2 domains
Tool A: 1 domain
most removed (top 5):
Tool C: 2 domains
Tool B: 1 domain
```
## Test
```
mix test
```
Offline, no network calls, no dependencies beyond the language runtime. MIT licensed.