Giter VIP home page Giter VIP logo

autozaiminputter's Introduction

autoZaimInputter

ZaimAPIを用いて、収入/支出の自動入力を行うCUIツール

静的に作成した、登録用のテンプレートに基いて登録作業を行うため、毎月の固定収支を登録しておき、cronで自動実行することを想定している

前提

以下のシステム構成で動作を確認

要素 バージョン
debian 8.6
ruby 2.2.2
gem 2.4.5
bundle 1.1.3
また、ZaimAPI用のアクセスキー及びアクセストークンを取得済みであること

セットアップ

本リポジトリをクローン

git clone [email protected]:Sa2Knight/autoZaimInputter.git

必要なライブラリをインストール

bundle install --path bundle/vendor

プロジェクトルートに、ZaimAPI用のアクセスキー及びアクセストークンをJSONで記載した、secret.jsonを作成する。以下はsecret.jsonの例

{
    "key":"hoge",
    "secret":"fuga",
    "access_token":"foo",
    "access_token_secret":"bar"
}

プロジェクトルートに、自動登録する収支の内容をJSONで記載した、template.jsonを作成する。以下はtemplate.jsonの例

{
  "income": [
    {
      "category_id": 11,
      "amount": 200000,
      "place": "会社",
      "comment": "給料"
    }
  ],
  "payment": [
    {
      "category_id": 106,
      "genre_id": 10601,
      "amount": 50000,
      "place": "不動産",
      "comment": "家賃"
    },
    {
      "category_id": 108,
      "genre_id": 10803,
      "amount": 540,
      "place": "ニコニコ動画",
      "comment": "プレミアム会員料金"
    },
    {
      "category_id": 104,
      "genre_id": 10403,
      "amount": 972,
      "place": "さくらインターネット",
      "comment": "Redmine用VPS"
    }
  ]
}

実行方法

bundle exec ruby main.rb

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.