<commit_before># Kresus

Kresus is a personal finance manager hosted on your cozy server. It allows you
to safely track your banking history, check your overall balance and know
exactly on what you are spending money with the use of tags!

It's a fork of [cozy-pfm](https://github.com/seeker89/cozy-pfm), because I can't deal with backbone.

[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=bnj&url=https://github.com/bnjbvr/kresus&title=Kresus&language=&tags=github&category=software)

# How do I install Kresus?

## On CozyCloud

If you already have a Cozy instance set up, then you can install Kresus either
from the Marketplace or by hopping on the machine and running the following
command:

```cozy-monitor install kresus -r https://github.com/bnjbvr/kresus```

## On Debian

Kresus can be installed standalone, without a cozy, but it will run
without a few features (e.g. email notifications).

```make install-debian```

This will install the dependencies, build the project and install at the global
node.js program location. Note that if this location is `/usr/local/bin`, you
might need to use root access to apply this command properly.

## On any other (UNIX based) operating system

1. Make sure to have installed all the dependencies.

    On Debian based operating systems, these are `python-dev libffi-dev
libxml2-dev libxslt-dev libyaml-dev python-virtualenv` and can be installed
with `make install-debian-deps`.

    For Fedora (as of version 22), these are `python-devel libffi-devel
libxml2-devel libxslt-devel libyaml-devel` and `virtualenv`.

    You'll also need a machine with at least **1 GB of RAM**, for compiling
python modules needed for Weboob.

1. When the OS dependencies have been installed, install the node dependencies
and build the scripts (this won't install kresus globally). This command will
do all of it and start Kresus:

    ```make run```

Note that it runs on **port 9876** by default; this can be overridden by
setting the env variable `PORT`:

    ```PORT=1989 make run```

1. Alternatively, if you want to install Kresus globally, you'll need to use

    ```make install```

    And then you can simply start Kresus from any terminal in any directory with:

    `kresus`

Note that databases are saved in `~/.kresus`, by default.


## Firewall recommendations

Note that Kresus will need to install Weboob at startup, and to do so it needs
the following firewall authorizations:

- git access to `git.symlink.me/` and the `pipy`, for installing weboob.
- http/https access to your bank website, for fetching new operations on your
  behalf.

# Hack

If you want to hack on kresus, you'll need to install the app's dependencies:

```make install-node-deps```

Then, you can use ```make dev``` to automatically compile files to JS, prepare
and move files around, etc.

If the auto-watching doesn't work, under UNIX based operating systems (Linux,
MacOS), you might need to [increase the number of inotify
nodes](https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit).

### Can I propose a pull request?

Oh yeah, that'd be awesome! If you think about it, create a branch on your fork
and if you feel like sending a pull request, please propose to **merge into the<commit_msg>README: add a "runtime options" section;<commit_after># Kresus

Kresus is a personal finance manager hosted on your cozy server. It allows you
to safely track your banking history, check your overall balance and know
exactly on what you are spending money with the use of tags!

It's a fork of [cozy-pfm](https://github.com/seeker89/cozy-pfm), because I can't deal with backbone.

[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=bnj&url=https://github.com/bnjbvr/kresus&title=Kresus&language=&tags=github&category=software)

# How do I install Kresus?

## On CozyCloud

If you already have a Cozy instance set up, then you can install Kresus either
from the Marketplace or by hopping on the machine and running the following
command:

```cozy-monitor install kresus -r https://github.com/bnjbvr/kresus```

## Runtime options

Note that whatever the launch process you're using (global or local install),
you can set several options at runtime:

- the default **port** is 9876. This can be overriden with the env variable
  `PORT`.

- the default **host** on which Kresus listens is `localhost`. This can be
  overriden with the env variable `HOST`.

- in standalone mode (i.e. not running on CozyCloud), the default install
  location is `~/.kresus/`. This can be overriden with the env variable
`POUCHDB_NAME`.

## On Debian

Kresus can be installed standalone, without a cozy, but it will run
without a few features (e.g. email notifications).

```make install-debian```

This will install the dependencies, build the project and install at the global
node.js program location. Note that if this location is `/usr/local/bin`, you
might need to use root access to apply this command properly.

## On any other (UNIX based) operating system

1. Make sure to have installed all the dependencies.

    On Debian based operating systems, these are `python-dev libffi-dev
libxml2-dev libxslt-dev libyaml-dev python-virtualenv` and can be installed
with `make install-debian-deps`.

    For Fedora (as of version 22), these are `python-devel libffi-devel
libxml2-devel libxslt-devel libyaml-devel` and `virtualenv`.

    You'll also need a machine with at least **1 GB of RAM**, for compiling
python modules needed for Weboob.

1. When the OS dependencies have been installed, install the node dependencies
and build the scripts (this won't install kresus globally). This command will
do all of it and start Kresus:

    ```make run```

1. Alternatively, if you want to install Kresus globally, you'll need to use

    ```make install```

    And then you can simply start Kresus from any terminal in any directory with:

    `kresus`

## Firewall recommendations

Note that Kresus will need to install Weboob at startup, and to do so it needs
the following firewall authorizations:

- git access to `git.symlink.me/` and the `pipy`, for installing weboob.
- http/https access to your bank website, for fetching new operations on your
  behalf.

# Hack

If you want to hack on kresus, you'll need to install the app's dependencies:

```make install-node-deps```

Then, you can use ```make dev``` to automatically compile files to JS, prepare
and move files around, etc.

If the auto-watching doesn't work, under UNIX based operating systems (Linux,
MacOS), you might need to [increase the number of inotify
nodes](https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit).

### Can I propose a pull request?

Oh yeah, that'd be awesome! If you think about it, create a branch on your fork
and if you feel like sending a pull request, please propose to **merge into the
{'fraction_non_alphanumeric': 0.08236308753773178, 'fraction_numerical': 0.004599683771740692, 'mean_word_length': 4.283219438116933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, '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': '2382353', 'n_tokens_mistral': 2112, 'n_tokens_neox': 1969, 'n_words': 963}