https://github.com/nef10/swiftbeancountparser
Parser to parse plain text into a ledger model
https://github.com/nef10/swiftbeancountparser
parser plaintext-accounting swiftbeancount
Last synced: 4 months ago
JSON representation
Parser to parse plain text into a ledger model
- Host: GitHub
- URL: https://github.com/nef10/swiftbeancountparser
- Owner: Nef10
- License: mit
- Created: 2017-11-14T01:53:34.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T01:54:08.000Z (about 1 year ago)
- Last Synced: 2024-10-10T13:28:49.602Z (9 months ago)
- Topics: parser, plaintext-accounting, swiftbeancount
- Language: Swift
- Homepage: https://github.com/Nef10/SwiftBeanCount
- Size: 911 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftBeanCountParser
[](https://github.com/Nef10/SwiftBeanCountParser/actions?query=workflow%3A%22CI%22) [](https://nef10.github.io/SwiftBeanCountParser/) [](https://github.com/Nef10/SwiftBeanCountParser/blob/main/LICENSE) [](https://github.com/Nef10/SwiftBeanCountParser/releases)  
### ***This project is part for SwiftBeanCount, please check out the main documentation [here](https://github.com/Nef10/SwiftBeanCount).***
## What
This is the parser of SwiftBeanCount. It takes a string or a file and returns a `Ledger` (from [SwiftBeanCountModel](https://github.com/Nef10/SwiftBeanCountModel)).
## How
Either call `Parser.parse(contentOf: URL)` or `Parser.parse(string: String)`. You can check out the complete documentation [here](https://nef10.github.io/SwiftBeanCountParser/).
## Usage
The library supports the Swift Package Manger, so simply add a dependency in your `Package.swift`:
```
.package(url: "https://github.com/Nef10/SwiftBeanCountParser.git", .exact("X.Y.Z")),
```*Note: as per semantic versioning all versions changes < 1.0.0 can be breaking, so please use `.exact` for now*