収支データの変換
beancountやっていく
セブン銀行
$ java -jar Downloads/tabula-1.0.5-jar-with-dependencies.jar ~/Downloads/statement_202204.pdf -p 2- -g
取引日,お支払い金額,お預かり金額,差し引き残高,摘要,機番
"",,,"20,033",3月末残高,
22/04/17,"4,000",,"16,033",,1100621
22/04/26,480,ショウニンバンゴウ576603,"15,553",デビット利用,
22/04/27,154,DF.ラクテンモバイル,"15,399",口座振替,1111111
22/04/27,"2,966",ラクテンカ-ドサ-ビス,"12,433",クレジット,1111111
MyJCBのCSVと承認番号をキーに結合
sjis = File.read ...csv
content = sjis.encode 'utf-8', 'sjis'
v.lines.map {|x| x.split ','}.filter {|l| l.length == 6}[1..-1]
==begin
=>
[["\"1004\"", "\"2023/03/28\"", "\"メルカリ\"", "\"666\"", "\"\"", "\"[053217]\"\r\n"],
["\"1004\"", "\"2023/03/26\"", "\"SPOTIFY\"", "\"480\"", "\"(現地通貨額)480.000JPY/(換算レート)1.0000円/JPY/(換算日)2023年3月27日\"", "\"[367237]\"\r\n"],
["\"1004\"", "\"2023/03/26\"", "\"メルカリ\"", "\"900\"", "\"\"", "\"[401677]\"\r\n"],
["\"1004\"", "\"2023/03/26\"", "\"メルカリ\"", "\"873\"", "\"\"", "\"[397345]\"\r\n"]]