ppbert
A simple command-line utility to pretty print structures encoded using Erlang's External Term Format. The input is read from stdin and output on stdout, making ppbert a good candidate for shell pipelines.
At the moment, ppbert supports only a subset of the field types of the External Term Format:
- integers;
- big integers;
- floats;
- atoms (latin-1 and UTF-8);
- binaries;
- tuples;
- lists.
Usage
[
}
}
{
[
{
<<"X-Real-Ip">>,
}
}
}
}
|
Performance
Ppbert is written in Rust and offers an appreciable performance gain
over using Erlang's erlang:binary_to_term/1 and io:format/2.
#!/usr/bin/env escript
) ) } = )
)
)
Future work
- Add flags to control the pretty printing (e.g., indentation width, number of basic values on a single line, etc.).
- Do latin-1 encoding for atoms and strings.
- Add a jq-like query language.
- Write a man page.