GithubHelp home page GithubHelp logo

sitanhuang / ledg Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 2.0 3.6 MB

Batch modifiable ledger-like written in nodejs

License: GNU Affero General Public License v3.0

Makefile 0.74% JavaScript 95.25% Shell 0.79% Ruby 1.19% Vim Script 2.04%
accounting command-line-tool plaintext-accounting ledger ledg cli

ledg's People

Contributors

sitanhuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kureijir quangkr

ledg's Issues

Problems importing via CSV

I think I'm not quite understanding the concept represented in the CSV parser examples:

https://github.com/SitanHuang/ledg/tree/develop/examples/csv

This might be a misunderstanding around double-entry but I can't seem to get what I think makes sense into something that is reported correctly. My CSVs look something like this:

10/28/21,2.47E+22,COMCAST CABLE COMM 800-COMCAST WA,800-COMCAST   WA ,-70,
9/11/21,2.47E+22,COVERCRAFT DIRECT 405-238-9651 OK,405-238-9651  OK ,-145.27,Expense.Josh
5/17/21,2.43E+22,COW CREEK RITZVILLE WA,RITZVILLE     WA ,-29.73,

... and my parser looks like this:

delimeter = ",";
dateformat = "M/D/YY";
default_account = "Expense.Family";
bail = true;
skip(1);
process(() => {
  trim();
  add(
    date(col(1)),
    description(col(3)),
    cleared(),
    transfer(
      account(col(6),{}),
      amount(col(5))
    ),
    transfer(
      account("Asset.Bank.BankOfAmerica"),
      invert(amount(col(5)))
    )
  )
})

Date and description come through fine but all the expenses show up in the default account, even if I have a different one in the 6th column. I run that import and get something mysterious like:

Accounts                         Balance
Asset.Bank.BankOfAmerica       -1,022.10
Assets.Cash                            0
Expense.Family                  1,022.10
Expense.Josh                           0
Imbalance                              0

What am I doing wrong here? Is there some reading I need to do on this concept?

Thank you!

date/timezone issue rewriting books

Today, adding an entry pushes dates of all entries back a day.

Before daylight saving ends, there were no such problems. Had downloaded binary from earlier releases and the same issue remained, meaining the problem had been since at least the last release.

Problems installing and running

I followed your getting started steps and not ending up where I would expect. Terminal history:

$ git clone [email protected]:SitanHuang/ledg.git && cd ledg
$ make && make install
# No obvious errors

$ echo $PATH
 ... :~/bin/: ... # ... and more

$ which ledg
ledg not found

# Restarted Terminal

$ which ledg
ledg not found

I'm able to run ~/bin/ledg but when I do that, I see:

/Users/user/ledg/bin/ledg:4599
class Chart {

SyntaxError: Identifier 'Chart' has already been declared
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47

Hope to get this up and running soon! I thankfully found this via Plain Text Accounting before I started writing my own. Happy to help document and contribute where I can, it looks like you've put a lot into this already.

hledger importer via JSON

hledger print -O json allows for export of ledger and hledger journals to JSON, which is easily parsable for ledg and can be used to migrate ledger/hledger journals to ledg books.

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.