dyweb / beancount-sjtu

Beancount Importer of SJTU jAccount API for E-card Transaction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beancount-sjtu

Beancount Importer of jAccount API for E-card Transaction.

Usage

Get Data from jAccount API

# generate millisecond timestamp
$ export TIMESTAMP=$(date -d "2021-05-01" "+%s000")

# Generate URL
$ export URL="https://api.sjtu.edu.cn/v1/me/card/transactions?beginDate=${TIMESTAMP}"

# Get token after authenticated
$ export TOKEN=<TOKEN>

# Fetch data
$ curl -H "Authorization: Bearer $TOKEN" $URL > sample.json

Generate Beancount File

$ bean-extract samples/config.py sample.json

About

Beancount Importer of SJTU jAccount API for E-card Transaction

License:GNU General Public License v2.0


Languages

Language:Python 100.0%