GithubHelp home page GithubHelp logo

boobankphp's Introduction

# Boobank PHP

tools for weboob/boobank usage in php

## Weboob install
weboob need updates so the best way to use it is with venvs
 - apt-get install python-virtualenv

for using with web app, the home for www-data is /var/www
$ mkdir -p ~/.local/venvs
$ virtualenv ~/.local/venvs/weboob
$ source ~/.local/venvs/weboob/bin/activate
(weboob) $ pip install git+https://git.weboob.org/weboob/devel.git
(weboob) $ pip install pdfminer # add other optional dependencies if you want
(weboob) $ weboob-config update
(weboob) $ deactivate
$


## installation bundle


Step 1: Download the Bundle
---------------------------

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:

```console
$ composer require samker/boobankbundle
```

This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.

Step 2: Enable the Bundle
-------------------------

Then, enable the bundle by adding it to the list of registered bundles
in the `app/AppKernel.php` file of your project:

```php
<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new SamKer\BoobankBundle\SamKerBoobankBundle(),
        );

        // ...
    }

    // ...
}
````
Step 3: Edit Parameters
-------------------------
default boobank command at /usr/bin
but you can define another bin path in parameters.yml
```yml
  boobank:
        bin_path: "/var/www/.local/venvs/weboob/bin" #bin path for weboob weboob-config & boobank
        database: true
        dateInterval: "P1D" #interval for history
        filters:
              history: [ "date", "label", "amount" ]
              list: [ "label", "balance" ]
        watch: #default rules for watch by cron, 0 */1 * * * * www-data  php -f path/to/console --
              survey: [ "history", "list" ] #history or just list global 'amount' or both
              action: [ "database", "mail" ] #action mail or database or both
```

Step 4: import config
-------------------------
add this line to imports in config.yml file:
```yml
    - { resource: "/var/www/ryukenteam/vendor/samker/boobankbundle/Resources/config/config.yml" }   
```
       
Step 5: database
------------------------
```bash
sudo -u www-data php -f /path/to/project/bon/console -- doctrine:schema:update --force
```       

Step 4: Registered commands
--------------------------
you can use command line as follow
```bash
- boobank:backend:add --name=[backend]
- boobank:backend:list --name=[backend]
- boobank:backend:remove --name=[backend]

- boobank:account:list [backend]
- boobank:account:history -b [backend] -a [account] -d [date] -f [filters,..]

- boobank:watch   [-b [backend]] [-a [account]] [ -d [date(Y-m-d)]]
- boobank:watch:edit -b [backend] -a [account]


```

or use service
```php
$boobank = $container->get('boobank');
//list backend
$list = $boobank->listAccount($backend);
//history
$history = $boobank->getHistory($account, $backend, $date, $filters);
```

for use in web mod
create directory
```bash
/var/www/.config/
/var/www/.local/

chown www-data: -R /var/www/.config/
chown www-data: -R /var/www/.local/

chmod 700 -R /var/www/.config/
chmod 700 -R /var/www/.local/
```

boobankphp's People

Contributors

samker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.