Compare commits

...

2 Commits

Author SHA1 Message Date
Lynne Megido 05819824b2
handle files with no statements
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-27 15:57:28 +10:00
Lynne Megido d91030d5ea
indentation 2020-09-27 15:55:50 +10:00
2 changed files with 13 additions and 8 deletions

View File

@ -135,6 +135,11 @@ namespace BunyMuny {
Console.WriteLine(statement);
}
if (statements.Count == 0) {
Console.WriteLine("No statements found.");
return 2;
}
Console.WriteLine("Summary:");
Console.WriteLine("==================");
var summaries = statements.GroupBy(s => s.Category). // group statements by category

View File

@ -12,9 +12,9 @@ dotnet build
```
## Supported banks
- ME Bank ([guide](https://git.bune.city/lynnesbian/BunyMuny/raw/branch/master/guide/me.png))
- NAB
- CommBank
- ME Bank ([guide](https://git.bune.city/lynnesbian/BunyMuny/raw/branch/master/guide/me.png))
- NAB
- CommBank
## The rules file
By default, BunyMuny checks for rules in `rules.csv` in the current directory.
@ -31,13 +31,13 @@ This means that:
- Any statement that doesn't match these two rules will be categorised as "Other", and will use the description provided by the bank file.
### Detailed explanation
- `Match` specifies the type of matching to perform. It can be any of the following:
- `Match` specifies the type of matching to perform. It can be any of the following:
- "Start": Match the start of the description.
- "End": Match the end of the description.
- "Contains": Match anywhere in the description.
- "Exact": Only match if the bank statement's description is exactly equal to the provided value.
- "Regex": Match with [regular expressions](https://en.wikipedia.org/wiki/Regular_expression).
- `Value` specifies the value to match against.
- `Category` is the category that the statement should be filed under.
- `Description` is a short description to distinguish the particular merchant.
- `CaseSensitive` specifies whether or not the match should be case sensitive.
- `Value` specifies the value to match against.
- `Category` is the category that the statement should be filed under.
- `Description` is a short description to distinguish the particular merchant.
- `CaseSensitive` specifies whether or not the match should be case sensitive.