From 2f43748d7da82a56a3d02fc206eb65c832924d65 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 16 Apr 2009 06:33:01 +0000 Subject: [PATCH] docs --- NOTES | 24 ++++++++++++++++++++++++ Utils.hs | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/NOTES b/NOTES index fdea39018..feb41c648 100644 --- a/NOTES +++ b/NOTES @@ -18,6 +18,27 @@ We aim to make reliable, maintainable, usable software, sustainably. * to do ** errors +*** $ hledger -f new.ledger add +hledger: new.ledger: openFile: does not exist (No such file or directory) + +*** runhaskell hledger.hs reg -p 'daily this month' -E +hledger.hs: Prelude.head: empty list + +*** joyful> make ci +["/repos/hledger/hledger","web","--debug"] | + +*** ghci> readLedger "~/src/hledger/sample.ledger" +Exception: ~/src/hledger/sample.ledger: openFile: does not exist (No such file or directory) + +*** not: +hledger: user error (Text.Regex.Posix.String died: (ReturnCode 14,"empty (sub)expression")) +*** histogram stops after last occupied interval +*** hledger: could not balance this transaction, amounts do not add up to zero: +2007/12/08 * bus + expenses:transportation:bus $1.25 + assets:cash $-1 + assets:coins:quarters $-0.25 + ** docs/marketing/packaging *** streamline - less is more *** automate @@ -30,6 +51,7 @@ We aim to make reliable, maintainable, usable software, sustainably. ***** gmane description ***** darcsweb description **** keep Options.hs and README option list in sync +**** discover commands for --help **** accouncements *** document smart dates, period expressions, display expressions *** develop funding process @@ -281,6 +303,8 @@ competitors/fellow niche inhabitants *** graph and reduce dependencies *** pair programming ** features/wishlist +*** simplify hours again - no default -p, instead alias today="hours -ptoday" +*** allow no command or unordered command with pattern args *** --flat timelog balance report option for clients *** alternative easy timelog format *** better web gui diff --git a/Utils.hs b/Utils.hs index 2c3d9cc61..4dae61def 100644 --- a/Utils.hs +++ b/Utils.hs @@ -21,12 +21,11 @@ import qualified Data.Map as Map (lookup) withLedgerDo :: [Opt] -> [String] -> ([Opt] -> [String] -> Ledger -> IO ()) -> IO () withLedgerDo opts args cmd = do f <- ledgerFilePathFromOpts opts - -- kludgily read the file a second time to get the full text, + -- kludgily read the file a second time to get the full text. Only the ui command needs it. -- kludgily try not to fail if it's stdin. XXX rawtext <- readFile $ if f == "-" then "/dev/null" else f t <- getCurrentLocalTime let runcmd = cmd opts args . filterAndCacheLedgerWithOpts opts args t rawtext . (\rl -> rl{filepath=f}) - return f >>= runErrorT . parseLedgerFile t >>= either (hPutStrLn stderr) runcmd -- | Get a Ledger from the given string and options, or raise an error.