package ledes
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0687b2c6627d3e5a530e2e96c83dc1ffe402cc5ce9faed0c401a5a82c9917034
sha512=bf6463929f4aaea10bf073e7391c36b4bc96c4b758116e4de9a43a50b4a55609bb5a00d6d3913a5b4973589571db2b4ed208033dc3bb321983478a411ab274e2
Description
Legal Electronic Data Exchange Standard
README
LEDES
Legal Electronic Data Exchange Standard(https://ledes.org/)
Currently supports the parsing and validation of the following formats:
- LEDES98BI
- LEDES1998B
Two errors reporting modes are supported:
- eager: the first error encountered is bubbled up, fast path
- greedy: collects all errors, slow path
Parsing example
open Ledes
let read_lines filename =
let lines = ref [] in
let ic = open_in filename in
try
while true do
let line = input_line ic in
lines := line :: !lines
done;
[]
with End_of_file ->
close_in ic;
List.rev !lines
let lines = read_lines "ledes98bi.txt" in
let err = Ledes1998b.parse_and_validate_greedy lines in
if err = [] then print_endline "successful" else print_endline @@ String.concat "\n" err;Command line utility
A CLI app is also included which supports processing a LEDES file or a data string
Download the latest release:
Linux: https://github.com/Lexitree-Labs/LEDES/releases/download/0.1.0/ledes_cli_linux
MACOS: https://github.com/Lexitree-Labs/LEDES/releases/download/0.1.0/ledes_cli_macos
WINDOWS: https://github.com/Lexitree-Labs/LEDES/releases/download/0.1.0/ledes_cli_windows.exe
NAME
ledes_cli - A tool for parsing and validating LEDES file format
Example: ledes_cli_linux -- --eager --LEDES1998B --file /path/to/ledes199b
SYNOPSIS
ledes_cli [OPTION]…
Error collection options
--eager
Eager mode stops on first error encountered
--greedy
Greedy mode collects all error encountered
Data format options
--LEDES1998B
Process LEDES1998B data format
--LEDES98BI
Process Use LEDES98BI data format
Input options
--file=FILE
Specify data file location
--line=LINE
Specify data stringCAVEAT
Certain field validations, e.g. field totals which are open to interpretations on both sending and receiving end are omitted. Due to certain LEDES standard inconsistencies, few fields are validated in a more stricter fashion for total correctness.
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in LEDES by you, shall be licensed as MIT, without any additional terms or conditions.
Dependencies (6)
Dev Dependencies (2)
-
odoc
with-doc -
ppx_expect
with-test
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building ledes with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.1.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure