blob: f2986abb99ea152597813b0f0e9f9c6c4b12925b (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
open Rdcapsis.Prelude
module Time_ns = Time_ns_unix
let () =
let ams_tz = Time_ns.Zone.find_exn "Europe/Amsterdam" in
let prim_txs =
In_channel.with_file ~binary:true "test.csv"
~f:(Rdcapsis.Ingcsv.read_channel ~ams_tz)
|> Result.unwrap
in
let euc_id = "EUC" in
let ledger =
List.map_result ~f:(Rdcapsis.Convert.les_from_current_acc euc_id) prim_txs
|> Result.unwrap |> List.concat
in
print_endline (Sexp.to_string_hum ([%sexp_of: Rdcapsis.Ledger.t] ledger))
|