make sep/delim customisable

This commit is contained in:
atagen 2024-12-05 23:40:30 +11:00
parent 6d98e1639b
commit c5c240ca2e
8 changed files with 60 additions and 26 deletions

View file

@ -1,11 +1,11 @@
open Processing
let read_all colours =
let read_all colours parser =
In_channel.set_binary_mode stdin true;
let open Types in
let t = Emitter.create and culr = Culriser.create colours in
Emitter.serialise t (Ansi [ Fg (Culriser.current culr) ]);
Angstrom_unix.parse_many ~buf_size:4096 Parse.culr_parse
Angstrom_unix.parse_many ~buf_size:4096 (Parse.culr_parse parser)
(fun c -> c |> ansi_filter culr |> Culriser.serialise_with_colour culr t)
stdin
|> function