Code Monkey home page Code Monkey logo

Comments (8)

apauley avatar apauley commented on June 12, 2024

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.

apauley avatar apauley commented on June 12, 2024

@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.

apauley avatar apauley commented on June 12, 2024

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.

apauley avatar apauley commented on June 12, 2024

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.

apauley avatar apauley commented on June 12, 2024

Optional verbose mode is now in master, after #2 has been merged

from hledger-flow.

lestephane avatar lestephane commented on June 12, 2024

from hledger-flow.

apauley avatar apauley commented on June 12, 2024

@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.

lestephane avatar lestephane commented on June 12, 2024

from hledger-flow.

Related Issues (20)

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.