This project is part for SwiftBeanCount, please check out the main documentation here.
This is a small library to convert downloaded data from a Compass Card (via CompassCardDownloader) to the Beancount format (via SwiftBeanCountModel).
The library relies on meta data in your Beancount file to find your accounts. Please add importer-type: "compass-card"
and card-number: "XXXXXXXXXXXXXXXXXXXX"
to your Compass Card Asset account. To automatically add the expense account, add compass-card-expense: "XXXXXXXXXXXXXXXXXXXX"
with the card number to an account - for auto load, use compass-card-load: "XXXXXXXXXXXXXXXXXXXX"
.
- Load your ledger, e.g. via SwiftBeanCountParser
- Create an instance of
SwiftBeanCountCompassCardMapper
using the ledger - Dowload the balance and transactions you want to convert via the CompassCardDownloader
- Use
createBalance
andcreateTransactions
on the mapper to convert the downloaded data
Please also check out the complete documentation here.
The library supports the Swift Package Manger, so simply add a dependency in your Package.swift
:
.package(url: "https://github.com/Nef10/SwiftBeanCountCompassCardMapper.git", .exact(from: "X.Y.Z")),
Note: as per semantic versioning all versions changes < 1.0.0 can be breaking, so please use .exact
for now
While my code is licensed under the MIT License, the source repository may include names or other trademarks of CompassCard, TransLink or other entities; potential usage restrictions for these elements still apply and are not touched by the software license. Same applies for the API design. I am in no way affilliated with TransLink other than beeing customer.