An open API service indexing awesome lists of open source software.

https://github.com/dyweb/beancount-sjtu

Beancount Importer of SJTU jAccount API for E-card Transaction
https://github.com/dyweb/beancount-sjtu

beancount beancount-importer jaccount shanghai-jiao-tong-university

Last synced: 3 months ago
JSON representation

Beancount Importer of SJTU jAccount API for E-card Transaction

Awesome Lists containing this project

README

          

# beancount-sjtu

Beancount Importer of jAccount API for E-card Transaction.

## Usage

### Get Data from jAccount API

```shell
# 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=

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

### Generate Beancount File

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