Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
ma4nn committed Jan 16, 2024
0 parents commit 964a6e7
Show file tree
Hide file tree
Showing 11 changed files with 876 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
dist
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2022-24 Christoph Massmann <chris@dev-investor.de>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
TERSER_BIN = ./node_modules/terser/bin/terser --compress --mangle --

.PHONY: dist
dist:
npm install
npx tsc
export INCLUDE_TREE_JS=`$(TERSER_BIN) dist/Tree.js` && \
export INCLUDE_MAIN_JS=`$(TERSER_BIN) dist/main.js` && \
export STYLES_CSS=`sass --no-source-map src/styles.scss` && \
envsubst < src/SankeyChart.lua > dist/SankeyChart.lua && \
rm dist/*.js

clean:
rm -f dist/*.js dist/*.lua
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# MoneyMoney Extension: Sankey Chart

This is an extension for the great [MoneyMoney software](https://moneymoney-app.com/) to generate an HTML [Sankey Chart](https://de.wikipedia.org/wiki/Sankey-Diagramm) from the categories of the exported transactions.

![Sankey Sample Chart](https://dev-investor.de/wp-content/uploads/moneymoney_sankey_diagramm-1.jpg)

## Installation

This MoneyMoney extension must be installed as follows:
1. In the MoneyMoney app open menu Help → Show database in Finder
2. Copy the `dist/SankeyChart.lua` file into that folder.

## Usage

The Sankey Chart can be generated by selecting or filtering the appropriate transactions or accounts in MoneyMoney and choose menu Account → Export Transactions.
Afterwards choose "Sankey Chart (.html)" as the export format and open the generated file in your browser of choice.

For more information see also [my blog post](https://dev-investor.de/finanz-apps/money-money/kategorien-budgets-nutzen/).

## Build

```
make dist
```

## Notes

- Tested with MoneyMoney 2.4.x
- Modern browser is required

## Known Limitations
- Only 1 currency is supported (the currency of the first transaction is taken, other currencies are ignored then (see debug console))
- The report is available in German language only

## License

This repository is published under the [MIT license](./LICENSE).
This repository uses the great Highchart library, please obtain a valid license [on their website](https://shop.highcharts.com/).
174 changes: 174 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "moneymoney-sankey",
"description": "This is an extension for the great MoneyMoney app to generate an HTML Sankey Chart from the categories of the exported transactions.",
"version": "1.0.0",
"dependencies": {
"bootstrap": "^5.3.2",
"highcharts": "^11.3.0",
"terser": "^5.15.1"
},
"author": "Christoph Massmann <chris@dev-investor.de>",
"license": "MIT",
"devDependencies": {
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit 964a6e7

Please sign in to comment.