SwiftBeanCountSheetSync

1.1.0

Library to help Sync shared Expenses between a Google Sheet and a Beancount file
Nef10/SwiftBeanCountSheetSync

What's New

1.1.0 Syncer Ledger

2023-10-07T20:13:47Z

Changes

📈 Enhancements

  • Allow creating syncer with already parsed Ledger @Nef10 (#153)

🧰 Maintenance

  • Update SwiftLint config for 0.53.0 @file-sync-app (#149)
  • Update SwiftLint config for 0.52.2 @file-sync-app (#129)
  • SwiftLint: ignore Protocol Buffer files @file-sync-app (#128)
  • Update copyright year @file-sync-app (#125)
  • Release Drafter: Move dependencies to separate section @file-sync-app (#124)
  • Update SwiftLint config for 0.51.0 @file-sync-app (#120)
  • Migrate deprecated set-output to environment files @file-sync-app (#118)
  • Run SwiftLint in CI without action @file-sync-app (#99)
  • Update SwiftLint config for 0.50.3 @file-sync-app (#99)
  • Update SwiftLint config for 0.49.1 @file-sync-app (#95)
  • Update SwiftLint config for 0.49.0 @file-sync-app (#94)
  • Update swift version in CI @file-sync-app (#78)
  • Update Copyright year @Nef10 (#88)
  • Update SwiftLint config for 0.47.1 @Nef10 (#87)
  • Update SwiftLint config for 0.46.1 @file-sync-app (#62)
  • Update SwiftLint config for 0.45.1 @file-sync-app (#53)
  • Update SwiftLint config for 0.45.0 @file-sync-app (#46)

📦 Dependencies

  • Bump swift-actions/setup-swift from 1.24.0 to 1.25.0 @file-sync-app (#152)
  • Bump SwiftLint to 0.53.0 @file-sync-app (#150)
  • Bump tibdex/github-app-token from 2.0.0 to 2.1.0 @file-sync-app (#148)
  • Bump tibdex/github-app-token from 1.8.0 to 2.0.0 @file-sync-app (#146)
  • Bump actions/checkout from 3 to 4 @file-sync-app (#145)
  • Bump setup-swift from 1.23.0 to 1.24.0 @file-sync-app (#141)
  • Bump sticky-pull-request-comment to 2.8.0 @file-sync-app (#140)
  • Bump sticky-pull-request-comment to 2.7.0 @file-sync-app (#137)
  • Bump sticky-pull-request-comment to 2.6.2 @file-sync-app (#135)
  • Bump marocchino/sticky-pull-request-comment from 2.6.2 to 2.7.0 @dependabot (#134)
  • Bump SwiftLint to 0.52.4 @file-sync-app (#133)
  • Bump Release Drafter to 5.24.0 @file-sync-app (#132)
  • Bump SwiftLint to 0.52.3 @file-sync-app (#131)
  • Bump SwiftLint to 0.52.2 @file-sync-app (#130)
  • Bump sticky-pull-request-comment to 2.6.2 @file-sync-app (#127)
  • Bump peaceiris/actions-gh-pages from 3.9.2 to 3.9.3 @dependabot (#122)
  • Bump release-drafter/release-drafter from 5.22.0 to 5.23.0 @dependabot (#121)
  • Bump setup-swift from 1.21.0 to 1.23.0 @file-sync-app (#120)
  • Bump actions/github-script from 6.4.0 to 6.4.1 @file-sync-app (#120)
  • Bump sticky-pull-request-comment to 2.5.0 @file-sync-app (#117)
  • Bump sticky-pull-request-comment to 2.4.0 @file-sync-app (#116)
  • Bump tibdex/github-app-token from 1.7.0 to 1.8.0 @file-sync-app (#115)
  • Bump actions/github-script from 6.3.3 to 6.4.0 @file-sync-app (#114)
  • Bump Nef10/lcov-reporter-action from 0.3.1 to 0.3.2 @dependabot (#101)
  • Bump actions/github-script from 6.2.0 to 6.3.1 @dependabot (#100)
  • Bump setup-swift from 1.15.0 to 1.21.0 @file-sync-app (#99)
  • Bump very_good_coverage from 1.2.1 to 2.1.0 @file-sync-app (#99)
  • Bump actions/github-script from 6.3.1 to 6.3.3 @file-sync-app (#99)
  • Bump Nef10/lcov-reporter-action from 0.3.2 to 0.4.0 @file-sync-app (#99)
  • Bump peaceiris/actions-gh-pages from 3.8.0 to 3.9.2 @file-sync-app (#99)
  • Bump sticky-pull-request-comment from 2.2.0 to 2.3.1 @file-sync-app (#99)
  • Bump release-drafter/release-drafter from 5.21.0 to 5.22.0 @file-sync-app (#99)
  • Bump tibdex/github-app-token from 1.6.0 to 1.7.0 @file-sync-app (#99)
  • Bump release-drafter from 5.20.1 to 5.21.0 @file-sync-app (#96)
  • Bump actions/github-script from 6.1.1 to 6.2.0 @file-sync-app (#93)
  • Bump release-drafter from 5.20.0 to 5.20.1 @file-sync-app (#91)
  • Bump actions/github-script from 6.1.0 to 6.1.1 @file-sync-app (#90)
  • Bump tibdex/github-app-token from 1.5.2 to 1.6.0 @dependabot (#86)
  • Bump BrightFutures from 8.1.0 to 8.2.0 @swift-dependency-updater (#85)
  • Bump actions/github-script from 6.0.0 to 6.1.0 @dependabot (#84)
  • Bump release-drafter/release-drafter from 5.19.0 to 5.20.0 @dependabot (#83)
  • Bump tibdex/github-app-token from 1.5.1 to 1.5.2 @dependabot (#80)
  • Bump actions/upload-artifact from 2 to 3 @dependabot (#79)
  • Bump release-drafter from 5.18.1 to 5.19.0 @file-sync-app (#76)
  • Bump actions/checkout from 2 to 3 @file-sync-app (#74)
  • Bump fwal/setup-swift to 1.13.1 @file-sync-app (#73)
  • Bump setup-swift from 1.11.0 to 1.12.0 @file-sync-app (#71)
  • Bump actions/github-script from 5.1.0 to 6.0.0 @file-sync-app (#70)
  • Bump release-drafter from 5.18.0 to 5.18.1 @file-sync-app (#69)
  • Bump very_good_coverage from 1.2.0 to 1.2.1 @file-sync-app (#68)
  • Bump release-drafter from 5.17.6 to 5.18.0 @file-sync-app (#63)
  • Bump release-drafter from 5.16.2 to 5.17.6 @file-sync-app (#61)
  • Bump release-drafter from 5.15.0 to 5.16.2 @file-sync-app (#59)
  • Bump actions/github-script from 5.0.0 to 5.1.0 @file-sync-app (#57)
  • Bump fwal/setup-swift from 1.10.0 to 1.11.0 @file-sync-app (#56)
  • Bump tibdex/github-app-token from 1.5.0 to 1.5.1 @file-sync-app (#55)
  • Bump fwal/setup-swift from 1.9.0 to 1.10.0 @file-sync-app (#52)
  • Bump fwal/setup-swift to 1.9.0 @file-sync-app (#50)

SwiftBeanCountSheetSync

CI Status Documentation percentage License: MIT Latest version platforms supported: macOS SPM compatible

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

  1. 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.
  2. Authenticate the user to Google via GoogleAuthentication.
  3. Call start on the instance you created in step 1, passing in the authentication instance from step 2.
  4. Your completion handler will get a SyncResult if the sync was successful. This will include:
    • the transactions which need to be added (to the sheet for upload or the ledger for download)
    • parsing errors occured while reading the sheet
    • configuration which was used for syncing

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 here
  • account: Account which is used to keep track of the balance between the people
  • tag: Tag which is appended to all transactions which are or should be synchronized
  • name: Your name - this will be used to identify the colunms of the sheet
  • dateTolerance Tolerance in days which will be used when checking if a transactions already exists

These options are specified globally via customs like this (the date does not matter and will be ignored):

YYYY-MM-DD custom "sheet-sync-settings" "commoditySymbol" "CAD"

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:

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:

.package(url: "https://github.com/Nef10/SwiftBeanCountSheetSync.git", .upToNextMajor(from: "X.Y.Z")),

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Mon Oct 21 2024 13:56:02 GMT-0900 (Hawaii-Aleutian Daylight Time)