Giter Site home page Giter Site logo

pyledgertools's People

Contributors

cgiacofei avatar

Watchers

 avatar  avatar

Forkers

jonjitsu

pyledgertools's Issues

Merge budget scripts into this repo.

Maintaining shell scripts separate from this repo is annoying.
It would be easier to merge them together and not bother making this an installable package.

Use editor instead of taking input from the command line directly.

This will simplify manual account entry by allowing for autocomplete of account names.

Example code from stackoverflow

import sys, tempfile, os
from subprocess import call

EDITOR = os.environ.get('EDITOR','vim') 

initial_message = '' 

with tempfile.NamedTemporaryFile(suffix='.tmp') as tf:
  tf.write(initial_message)
  tf.flush()
  call([EDITOR, tf.name])

  # Read new file contents.
  tf.seek(0)
  edited_message = tf.read()

Something to consider:

I ran into the same problem of reading back the old contents of the file, and its true that in many cases, vim moves the old file aside and writes the new file, leaving our tf file descriptor still open on the now-backup file. The command line option "+set backupcopy=yes" added before the file name prevents this problem, and I'm now happily able to read the new contents of the file. call([EDITOR, '+set backupcopy=yes', tf.name]) โ€“ Chuck Buche Nov 22 '16 at 6:56

Mortgage parser calculates incorrect values if escrow is not processed last.

Current Config

Process Mortgage:
  conditions:
    - AND:
      - PAYEE CONTAINS Mortgage
  process:
    mortgage_process:
      file: "mortgage_schedule.csv"
      currency: $
      principal_pmt: "Liabilities:Mortgage:Principle"
      interest_pmt: "Expenses:Interest:Mortgage"
      escrow_pmt: "Assets:Escrow:Mortgage"

Fixed Config

Put accounts in a list so the order is preserved, ensuring escrow is always processed last.

Process Mortgage:
  conditions:
    - AND:
      - PAYEE CONTAINS Mortgage
  process:
    mortgage_process:
      file: "mortgage_schedule.csv"
      currency: $
      accounts:
        - principal_pmt: "Liabilities:Mortgage:Principle"
        - interest_pmt: "Expenses:Interest:Mortgage"
        - escrow_pmt: "Assets:Escrow:Mortgage"

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.