This project is part for SwiftBeanCount, please check out the main documentation here.
What
This library synchronizes transactions from Beancount files to a Google Sheets with shared transactions. This is helpful when you share expenses with another person who does not use beancount.
How to use
Create an instance of Uploader or Downloader depending on which way you want to sync, providing the HTTP URL of the Sheet as well as the file URL of the beancount file.
You can attatch sheet-sync-category metadata to accounts to map categories from the sheet to accounts and vice-versa in a 1-1 relationship. This is optional, in case no mapping could be found a fallback account / an empty category will be used.
Example:
2020-12-26 open Expenses:Communication:Internet
sheet-sync-category: "Internet"
Usage
The library supports the Swift Package Manger, so simply add a dependency in your Package.swift:
SwiftBeanCountSheetSync
This project is part for SwiftBeanCount, please check out the main documentation here.
What
This library synchronizes transactions from Beancount files to a Google Sheets with shared transactions. This is helpful when you share expenses with another person who does not use beancount.
How to use
Uploader
orDownloader
depending on which way you want to sync, providing the HTTP URL of the Sheet as well as the file URL of the beancount file.start
on the instance you created in step 1, passing in the authentication instance from step 2.SyncResult
if the sync was successful. This will include:Please check out the complete documentation here, or have a look at the SwiftBeanCountSheetSyncApp which uses this library.
Beancount meta data
The synchronization relies on meta data in your beancount file for configuration. Please add these to your beancount file.
General configuration
commoditySymbol
: The synchronization only works with one commodity which needs to be specified hereaccount
: Account which is used to keep track of the balance between the peopletag
: Tag which is appended to all transactions which are or should be synchronizedname
: Your name - this will be used to identify the colunms of the sheetdateTolerance
Tolerance in days which will be used when checking if a transactions already existsThese options are specified globally via
customs
like this (the date does not matter and will be ignored):Account configuration
You can attatch
sheet-sync-category
metadata to accounts to map categories from the sheet to accounts and vice-versa in a 1-1 relationship. This is optional, in case no mapping could be found a fallback account / an empty category will be used.Example:
Usage
The library supports the Swift Package Manger, so simply add a dependency in your
Package.swift
: