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
- Host: GitHub
- URL: https://github.com/dyweb/beancount-sjtu
- Owner: dyweb
- License: gpl-2.0
- Created: 2021-12-07T16:56:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-07T17:07:46.000Z (almost 4 years ago)
- Last Synced: 2025-02-22T23:26:03.992Z (8 months ago)
- Topics: beancount, beancount-importer, jaccount, shanghai-jiao-tong-university
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```