Skip to content

Beancount Importer of SJTU jAccount API for E-card Transaction

License

Notifications You must be signed in to change notification settings

dyweb/beancount-sjtu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages