Comments (8)
Hi @lestephane, yes, it is definitely needed, I'll work on this when I get some time.
No promises exactly when (I'm away for the weekend), but it should be easy to do.
Thinking aloud here: perhaps a single -v
to hledger-makeitso import
would make it print some basic information, with more than one v
added would cause it to print more information, and pass along the verbose flags to custom scripts like preprocess
.
I'll see what the command-line options library allow here.
from hledger-flow.
@lestephane I've started a branch and a pull request to work on this:
#2
Currently the import subcommand will accept a verbose flag on that branch, but it doesn't use the flag just yet.
More commits on this PR should address that.
from hledger-flow.
Hi @lestephane, I've added some verbose output on the ISSUE-1-verbose-output
branch.
Could you try it out?
This is an example of what you might see:
$ hledger-makeitso import --verbose
2019-03-03 22:52:41.510390024 SAST hledger-makeitso: Collecting input files...
2019-03-03 22:52:41.664377916 SAST hledger-makeitso: Found 3 input files
2019-03-03 22:52:41.664611207 SAST hledger-makeitso: Found a preprocess file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:41.688166122 SAST hledger-makeitso: Finished executing hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:41.688724062 SAST hledger-makeitso: Did not find a construct file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/construct
2019-03-03 22:52:41.689199073 SAST hledger-makeitso: Starting import of hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-04-28.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
2019-03-03 22:52:41.851953474 SAST hledger-makeitso: Finished importing hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-04-28.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
2019-03-03 22:52:41.852803905 SAST hledger-makeitso: Found a preprocess file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:41.87625886 SAST hledger-makeitso: Finished executing hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:41.876770231 SAST hledger-makeitso: Did not find a construct file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/construct
2019-03-03 22:52:41.880150044 SAST hledger-makeitso: Starting import of hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-05-28.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
2019-03-03 22:52:42.041891675 SAST hledger-makeitso: Finished importing hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-05-28.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
2019-03-03 22:52:42.042725295 SAST hledger-makeitso: Found a preprocess file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:42.065642929 SAST hledger-makeitso: Finished executing hledger-makeitso-example-finances/import/gawie/bogart/cheque/preprocess
2019-03-03 22:52:42.06612022 SAST hledger-makeitso: Did not find a construct file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/construct
2019-03-03 22:52:42.06656573 SAST hledger-makeitso: Starting import of hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-03-30.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
2019-03-03 22:52:42.228158811 SAST hledger-makeitso: Finished importing hledger-makeitso-example-finances/import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-03-30.csv using rules file at hledger-makeitso-example-finances/import/gawie/bogart/cheque/bogart-cheque.rules
from hledger-flow.
I changed the output to include the execution times of the custom scripts and a few other tweaks:
$ hledger-makeitso import -v
2019-03-04 22:48:50.519642439 SAST hledger-makeitso Collecting input files...
2019-03-04 22:48:50.697360986 SAST hledger-makeitso Found 3 input files
2019-03-04 22:48:50.697638997 SAST hledger-makeitso Found a preprocess file at 'import/gawie/bogart/cheque/preprocess'
2019-03-04 22:48:50.698029777 SAST hledger-makeitso Begin: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-04-28.csv'
2019-03-04 22:48:50.720766651 SAST hledger-makeitso End: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-04-28.csv' (0.022230173s)
2019-03-04 22:48:50.721555152 SAST hledger-makeitso Did not find a construct file at 'import/gawie/bogart/cheque/construct'
2019-03-04 22:48:50.722799403 SAST hledger-makeitso Begin: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-04-28.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules'
2019-03-04 22:48:50.886823326 SAST hledger-makeitso End: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-04-28.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules' (0.163296212s)
2019-03-04 22:48:50.887605317 SAST hledger-makeitso Found a preprocess file at 'import/gawie/bogart/cheque/preprocess'
2019-03-04 22:48:50.887976737 SAST hledger-makeitso Begin: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-05-28.csv'
2019-03-04 22:48:50.922670644 SAST hledger-makeitso End: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-05-28.csv' (0.034184796s)
2019-03-04 22:48:50.923391585 SAST hledger-makeitso Did not find a construct file at 'import/gawie/bogart/cheque/construct'
2019-03-04 22:48:50.923867345 SAST hledger-makeitso Begin: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-05-28.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules'
2019-03-04 22:48:51.084951075 SAST hledger-makeitso End: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-05-28.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules' (0.160474009s)
2019-03-04 22:48:51.085645726 SAST hledger-makeitso Found a preprocess file at 'import/gawie/bogart/cheque/preprocess'
2019-03-04 22:48:51.086249207 SAST hledger-makeitso Begin: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-03-30.csv'
2019-03-04 22:48:51.109296881 SAST hledger-makeitso End: executing 'import/gawie/bogart/cheque/preprocess' on 'import/gawie/bogart/cheque/1-in/2016/123456789_2016-03-30.csv' (0.022477384s)
2019-03-04 22:48:51.109882621 SAST hledger-makeitso Did not find a construct file at 'import/gawie/bogart/cheque/construct'
2019-03-04 22:48:51.110270852 SAST hledger-makeitso Begin: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-03-30.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules'
2019-03-04 22:48:51.272289433 SAST hledger-makeitso End: importing 'import/gawie/bogart/cheque/2-preprocessed/2016/123456789_2016-03-30.csv' using rules file 'import/gawie/bogart/cheque/bogart-cheque.rules' (0.161423111s)
from hledger-flow.
Optional verbose mode is now in master, after #2 has been merged
from hledger-flow.
from hledger-flow.
@lestephane There has been another merge that might affect you if you already got to a point where you created an opening journal. The file needs to move one level up now.
The PR description has more details: #3
from hledger-flow.
from hledger-flow.
Related Issues (20)
- File-specific rules HOT 5
- hledger-flow does not 'see' _manual_ year subdirectory if there is no corresponding 1-in subdirectory HOT 1
- QUESTION: how to break up a transaction/payment? HOT 12
- If I delete a file in a `1-in` directory, re-running `hledger-flow import` does not remove the corresponding files in the `2-preprocessed` and `3-journal` directories HOT 4
- Missing version bound on turtle breaks build HOT 3
- Have a way to use `--cost` option for income-expense reports HOT 1
- Documentation on workflow HOT 8
- `hledger-flow` reports empty for user sub-accounts (due to missing `directives.journal` at lower levels) HOT 3
- (docs) unclear what to do if starting balance is not 0 HOT 6
- Where to put account declarations and prices?
- Support for Apple Silicon (aarch64-darwin) HOT 3
- hackage doesn't have the 0.15 release
- Windows: the preprocess and construct scripts are not executed HOT 1
- QUESTION: tags, reports, multiple contributors, virtual accounts, how to do it simply? HOT 2
- when preprocess is called with a $1 that has a .timeclock extension, $2 has a .csv extension HOT 3
- 3-journal/ files not ending in ".journal" extension are added to yearly include files HOT 6
- Make it possible to configure the number of cores being used (the default is to use all cores, which slows down the machine) HOT 18
- hledger-flow does not 'see' hledger despite it being present in the PATH as a symlinked executable HOT 3
- cabal install error: Not in scope: type constructor 'Rel' HOT 2
- Question: where to include "meta" statements (`account...`, `commodity format` & `alias`) & prices? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hledger-flow.