magicgoose / simple_dr_meter

An (optimized) implementation of the music DR measurement (compliant with http://dr.loudness-war.info/), it supports CUE sheets and is faster than all currently available alternatives (at the time of writing, not sure about now)
GNU General Public License v3.0
20 stars 3 forks source link

Option to output to stdout only, to reduce clutter in directories when used in scripts #1

Closed bearcatsandor closed 6 years ago

bearcatsandor commented 6 years ago

I love this code! It's just what i've been looking for use in my music collection! Except for one thing: Would you add code to enable the output to be directed to stdout only (perhaps by default) instead of a file? That way i could use it in scripts and not have to delete the resulting txt file(s) which are adding extra steps and leaving a mess in my directories.

magicgoose commented 6 years ago

Sure, that's easy. I will add an option for this.

bearcatsandor commented 6 years ago

Thank you very much!

magicgoose commented 6 years ago

https://github.com/magicgoose/simple_dr_meter/commit/de4d29f4d829d08872eaa35e9db8f4e4f5aad5be

$ simple_dr_meter -h
usage: simple_dr_meter [-h] [--no-log] input

positional arguments:
  input       Input file or directory

optional arguments:
  -h, --help  show this help message and exit
  --no-log    Do not write log (dr.txt), by default a log file is written
              after analysis
magicgoose commented 6 years ago

hmm, do you mean to also print the log with formatting for http://dr.loudness-war.info/ (that is, full contents of dr.txt)? what I did right now is an option which simply disables writing dr.txt.

the most essential data is being printed to stdout in any case, but without formatting and tracks are in undefined order (because they are printed as soon as they are done and in some cases parallel processing is activated)