aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-22 12:24:49 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-24 01:51:22 +0300
commitb36973b3e08e6d1f8a7d42a6984249486d0cebfe (patch)
treed14d015a3d5aa20d8a6e1effb9630643abaa847a /README.md
downloadmolodivo-b36973b3e08e6d1f8a7d42a6984249486d0cebfe.tar.gz
Initial commit0.0.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dd87c22
--- /dev/null
+++ b/README.md
@@ -0,0 +1,74 @@
+Malodivo
+========
+
+Budget planning in a fairy Kingdom of Malodivo.
+For the whole story read the [plot](./doc/plot.md).
+
+
+Requirements
+============
+
+Malodivo is written in Haskell with [GHC](http://www.haskell.org/ghc/).
+All required Haskell libraries are listed in [malodivo.cabal](malodivo.cabal).
+Use [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install) to fetch
+and build all pre-requisites automatically.
+
+
+Command-line utility
+====================
+
+The command-line utility `malodivo` provides a means to process input JSON
+files and output JSON describing the actual amounts that go towards each bill
+by each district. This utility reads input JSON data from standard input
+and writes output JSON data to standard output. _The format of output is
+unstable and subject to change_.
+
+Usage
+-----
+
+```
+Usage: malodivo [options] < input.json > output.json
+
+Options:
+
+ -h, --help Show this message and exit
+
+```
+
+
+Examples
+--------
+
+We would get this:
+```
+$ malodivo < sample/simpleBudget.json
+[["Lakos",100],["Palolene",66],["SouthernPalolene",133]]
+```
+
+with this file ([sample/simpleBudget.json](sample/simpleBudget.json)):
+```json
+{
+ "bills": [
+ {
+ "name": "An Act to Construct the Great Wall of Malodivo",
+ "ministry": "Defense",
+ "amount": 300
+ }
+ ],
+ "districts": [
+ {
+ "name": "Palolene",
+ "availableFunds": 200
+ },
+ {
+ "name": "SouthernPalolene",
+ "availableFunds": 400
+ },
+ {
+ "name": "Lakos",
+ "availableFunds": 300
+ }
+ ]
+}
+```
+