Code Monkey home page Code Monkey logo

uledger's People

Contributors

danpat avatar

Stargazers

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

Watchers

 avatar

Forkers

xgenvn

uledger's Issues

uledge generates a empty report.thml with the example example.ledger

For first-starters I'd be nice to get a non-empty web report

$ git clone https://github.com/danpat/uledger.git
$ cd uledger
$ ./uledger.py -f example.ledger web
$ lynx -dump report.html

$ # Check that the produced report.html is empty.

The cause is that the the interval of years computed at web.make_report() is empty [].
I've attached a quick patch to address the issue.

Date: Thu, 5 Nov 2015 15:05:30 +0100
Subject: [PATCH] uledger: Fix web.py make_report date interval [startyear, endyear[

---
 web.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web.py b/web.py
index a5322a3..b20e85f 100644
--- a/web.py
+++ b/web.py
@@ -38,7 +38,7 @@ def make_report(ledger,destdir):
     enddate = ledger.enddate()

     startyear = startdate.split("-")[0]
-    endyear = enddate.split("-")[0]
+    endyear = str(int(enddate.split("-")[0])+1)

     # Year by year

-- 
2.1.4

Next thing to figure now is why the report.html now correctly handles the years,
but no accounting data is provided in the report :)

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.