<commit_before>Wealth Pulse
============

Wealth Pulse is web frontend for a ledger journal file. The ledger journal file is
based on the command line [Ledger][1] journal file format and features double-entry 
accounting for personal finance tracking.


Objective
---------

Short-term, the focus is on what ledger cannot do right now: tables and charts.

Medium-term, I may deviate from the ledger file format to my own file format,
so that I can handle investments better.

Long-term, the idea is to replace the command line ledger with my own tool that
does all reporting via a web interface. Editing will still be done by text file,
though in the long-long term, perhaps a front end for adding/editing 
transactions would be a possibility.


Dependencies
------------

*	FParsec 1.0.1
*	Nustache 192.168.127.12
*	FsUnit.xUnit.1.2.1.2
*	xunit 1.9.1
*	xunit.runners 1.9.1



How to Run
----------

*	Setup LEDGER_FILE environment variable to point to your ledger file



Command Bar Supported Commands
------------------------------
[NOTE: Not implemented yet]

Commands:

	balance [accounts-to-include] [parameters]

	register [accounts-to-include] [parameters]

Parameters:

	:excluding [accounts-to-exclude]

	:period [this month|last month]

	:since [yyyy/mm/dd]

	:upto [yyyy/mm/dd]

	:title [report title]




Implementation Notes
--------------------

Investments & Commodities:
*	I'm basically ignoring these for the moment. The parser will parse them,
but all processing after that point assumes one commodity and basically assumes
only the "amount" field is used. I'll need to revisit this once I get around
to adding investment/commodity support.



Phase 1 Implementation (Reporting)
----------------------

### Objective

*	Replace the ledger bal and reg commandline options with a web interface.
*	Provide some basic reporting like net worth, income vs expenses, ...
*	See http://bugsplat.info/static/stan-demo-report.html for some examples


### First Milestone

Parsing Ledger File
- [x] Basic / optimistic parsing of ledger file
- [x] Autobalance transactions

Initial Static Balance Reports:
- [x] Assets vs Liabilities, ie Net Worth
- [x] Income Statement (current & previous month)
- [x] Net Worth chart


### Second Milestone

Parsing Ledger File
- [] Review / revise parsing & post-processing:
	- [] Ensure transactions balance (if not autobalanced)
	- [] Can I remove mutable fields?
	- [] Add unit tests

Balance Report
- [x] Combine balance sheet & income report into single balance report with parameters
- [] Can I improve the account filtering code?
- [] Can I get rid of the list comprehension?
- [] Can I clean it up so the main function is just sub-function calls?

Net Worth Chart
- [] Make it a separate page/report
- [] Can I patch Nustache so that it serializes objects to json?<commit_msg>Net worth was working, just missing d3.js! Ha ha!<commit_after>Wealth Pulse
============

Wealth Pulse is web frontend for a ledger journal file. The ledger journal file is
based on the command line [Ledger][1] journal file format and features double-entry 
accounting for personal finance tracking.


Objective
---------

Short-term, the focus is on what ledger cannot do right now: tables and charts.

Medium-term, I may deviate from the ledger file format to my own file format,
so that I can handle investments better.

Long-term, the idea is to replace the command line ledger with my own tool that
does all reporting via a web interface. Editing will still be done by text file,
though in the long-long term, perhaps a front end for adding/editing 
transactions would be a possibility.


Dependencies
------------

*	FParsec 1.0.1
*	Nustache 192.168.127.12
*	FsUnit.xUnit.1.2.1.2
*	xunit 1.9.1
*	xunit.runners 1.9.1



How to Run
----------

*	Setup LEDGER_FILE environment variable to point to your ledger file



Command Bar Supported Commands
------------------------------
[NOTE: Not implemented yet]

Commands:

	balance [accounts-to-include] [parameters]

	register [accounts-to-include] [parameters]

Parameters:

	:excluding [accounts-to-exclude]

	:period [this month|last month]

	:since [yyyy/mm/dd]

	:upto [yyyy/mm/dd]

	:title [report title]




Implementation Notes
--------------------

Investments & Commodities:
*	I'm basically ignoring these for the moment. The parser will parse them,
but all processing after that point assumes one commodity and basically assumes
only the "amount" field is used. I'll need to revisit this once I get around
to adding investment/commodity support.



Phase 1 Implementation (Reporting)
----------------------

### Objective

*	Replace the ledger bal and reg commandline options with a web interface.
*	Provide some basic reporting like net worth, income vs expenses, ...
*	See http://bugsplat.info/static/stan-demo-report.html for some examples


### First Milestone

Parsing Ledger File
- [x] Basic / optimistic parsing of ledger file
- [x] Autobalance transactions

Initial Static Balance Reports:
- [x] Assets vs Liabilities, ie Net Worth
- [x] Income Statement (current & previous month)
- [x] Net Worth chart


### Second Milestone

Parsing Ledger File
- [] Review / revise parsing & post-processing:
	- [] Ensure transactions balance (if not autobalanced)
	- [] Can I remove mutable fields?
	- [] Add unit tests

Balance Report
- [x] Combine balance sheet & income report into single balance report with parameters
- [] Can I improve the account filtering code?
- [] Can I get rid of the list comprehension?
- [] Can I clean it up so the main function is just sub-function calls?

Net Worth Chart
- [x] Make it a separate page/report
- [] Can I patch Nustache so that it serializes objects to json?
{'fraction_non_alphanumeric': 0.10859251449657353, 'fraction_numerical': 0.009312950272359866, 'mean_word_length': 3.3516819571865444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3124321', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1574, 'n_words': 744}