blob: b13e1b7f33f0b7411cf0d9f9449f870bdef60be3 (
plain)
- #!/bin/sh
- set -e
- infile="$1"
- basename=$(basename "$infile" .csv)
- outfile="${2:-$basename.ledger}"
- rulesfile="$basename.rules"
- cat "$basename".*.rules > "$rulesfile"
- hledger print --rules-file "$rulesfile" -f "$infile" > "$outfile"
- [ "-d" = "$2" ] || rm "$rulesfile"
|