cloverleaf-larry/lib
Bryan Johnson 3eb88f86c8 v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv
Five small Unix-style loop & format helpers, fully offline:

lib/each.sh
  - replaces v1 `each`
  - run a CMD per item: args, stdin lines, or {}-placeholder substitution
  - example: tbn adt | awk '{print $2}' | each.sh 'route_test {}'

lib/each-site.sh
  - replaces v1 each_site / each_site_hdr / each_site_tcl patterns
  - iterates every site under $HCIROOT with HCISITE/HCISITEDIR auto-exported
  - --filter REGEX limits which sites; --hdr prints a header before each

lib/len2nl.sh
  - replaces v1 `len2nl`
  - strict superset: handles length-prefixed (digits before MSH),
    MLLP (\x0b...\x1c\x0d), and segment CRs (→ LF)
  - works as stdin filter or with file arg

lib/csv-to-table.sh
  - 2-column CSV → Cloverleaf .tbl format
  - emits proper prologue (who, date, bidir, type, version)
  - --has-header --default VALUE --bidir 0|1 --in-delim CHAR --user NAME --out PATH

lib/table-to-csv.sh
  - reverse: .tbl → CSV
  - --with-header --delim CHAR --include-meta
  - confirmed clean round-trip: CSV → table → CSV byte-identical for the data rows

All 5 are pipeable, have --help, zero external deps beyond bash+awk+sed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:05:19 -07:00
..
csv-to-table.sh v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv 2026-05-26 11:05:19 -07:00
each-site.sh v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv 2026-05-26 11:05:19 -07:00
each.sh v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv 2026-05-26 11:05:19 -07:00
hl7-desanitize.sh v0.3.3: PHI sanitize/desanitize + {{phi:...}} prompt preprocessing 2026-05-26 10:29:20 -07:00
hl7-diff.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
hl7-field.sh v0.3.4: field-name aliases, dot/dash syntax, ops (=, !=, ~, !~), new formats 2026-05-26 10:35:46 -07:00
hl7-sanitize.sh v0.3.3: PHI sanitize/desanitize + {{phi:...}} prompt preprocessing 2026-05-26 10:29:20 -07:00
journal.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
len2nl.sh v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv 2026-05-26 11:05:19 -07:00
lessons.sh v0.3.2: lesson capture (local-first learning loop) 2026-05-26 10:00:37 -07:00
nc-diff-interface.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-document.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-find.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-inbound.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-insert-protocol.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-make-jump.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
nc-msgs.sh v0.4.0: chain walk, OR/NOT filter groups, numeric/range ops, smat history 2026-05-26 10:58:16 -07:00
nc-parse.sh v0.4.0: chain walk, OR/NOT filter groups, numeric/range ops, smat history 2026-05-26 10:58:16 -07:00
nc-regression.sh v0.3.0: initial release of Larry-Anywhere 2026-05-26 09:46:20 -07:00
oauth.sh v0.3.1: OAuth subscription auth + offline manual cheat sheet 2026-05-26 09:57:44 -07:00
table-to-csv.sh v0.4.1: each / each-site / len2nl / csv-to-table / table-to-csv 2026-05-26 11:05:19 -07:00