项目作者: cpageler93

项目描述 :
Piggy Cash helps you to organize income and expenses
高级语言: Ruby
项目地址: git://github.com/cpageler93/piggy-cash.git
创建时间: 2016-12-30T09:09:44Z
项目社区:https://github.com/cpageler93/piggy-cash

开源协议:MIT License

下载


Piggy Cash

Support for OSX only

Installation

In Development

  1. ./install_and_run_example

Later

  1. gem install piggycash

Entities

Account

Represents a banking account

Main Properties:

  • name
  • iban

BookingEntry

Represents a booking entry for one account

Main Properties:

  • booking_date
  • valuta
  • participant
  • booking_type
  • usage
  • value
  • saldo

Checksum:

There is a checksum attribute for each booking entry for quick checks of uniqueness

BookingEntryQuery

Query for booking entries.

Main Properties:

  • name
  • query

Query:

Query is just a MySQL where condition for the table booking_entries as be
So you can type be.participant like "%DIGITALOCEAN%"

BookingEntryTagRecognizer

Assign tags to booking entries, queried by a `BookingEntryQuery

Main Properties:

  • booking_entry_query_id
  • tag_id

EvaluatedBookingEntry

Basic: just a copy of BookingEntry

Advanced:
A booking entry will be transfered to an evaluated booking entry at creation time. Since the booking entry represents the 100% original version of your balance, we dont want to modify it.

An evaluated booking entry can be assigned to tags and can be splitted.

Split:

You paid 70€ in a supermarket for food and detergents.
You can split your evaluated booking entry into two pieces referencing to the same original booking entry.

Lets say you paid 17,50€ for the detergents and 52,50€ for food:

BookingEntry 1 -> name: “detergents at mycoolsupermarket”, tags: mycoolsupermarket, detergents, total_value: 70,00€, split: 0.25
BookingEntry 2 -> name: “food at mycoolsupermarket”, tags: mycoolsupermarket, food, total_value: 70,00€, split: 0,75

Tag

Tag

Main Properties:

  • name

CLI

Setup

Initial setup

  • database connection
  • database migration / create
    first account

    setup

API

Serve

serves REST API at given port

  1. piggycash api serve --port 1234

Import

  1. piggycash import --file ~/path/to/file.csv --encoding ISO-8859-1 --seperator ';' --type ingdiba

Query

  1. piggycash query assign tags

Tags

Recognize

  1. piggycash tags recognize

Reveal untagged

  1. piggycash tags reveal untagged

Validate

  1. piggycash validate saldo

GLOBAL OPTIONS:

  1. --verbose
  2. --debug
  3. --force
  4. -h, --help
  5. Display help documentation
  6. -v, --version
  7. Display version information

API

Routes

Accounts

  1. GET /accounts index
  2. GET /accounts/:id show
  3. POST /accounts create
  4. PATCH /accounts/:id update
  5. DELETE /accounts/:id delete

Booking Entries

The API will return evaluated_booking_entries,
although the entry is called booking_entries.

The internal BookingEntry is kind of private and
not usefull for external services. The EvaluatedBookingEntry
entity contains more information and is based on the original
BookingEntry

  1. GET /booking_entries index
  2. GET /booking_entries/:id show
  3. POST /booking_entries/:id/split split entry into single fractions
  4. POST /booking_entries/:id/add_tag add tag to entry
  5. DELETE /booking_entries/:id/remove_tag/:tag_id remove a tag from entry
  6. GET /booking_entries/find_by_query/:query

Booking Entry Query

  1. GET /booking_entry_queries index
  2. GET /booking_entry_queries/:id show
  3. POST /booking_entry_queries create
  4. PATCH /booking_entry_queries/:id update
  5. DELETE /booking_entry_queries/:id delete
  6. POST /booking_entry_queries/:id/recognize_tag/:tag_id add a tag to be automatically recogized by the query
  7. DELETE /booking_entry_queries/:id/remove_recognized_tag/:tag_id remove a tag from being automatically recognized by the query

Tag

  1. GET /tags index
  2. GET /tags/:id show
  3. POST /tags create
  4. PATCH /tags/:id update
  5. DELETE /tags/:id delete