orgstat icon indicating copy to clipboard operation
orgstat copied to clipboard

set subdirectory format by config.yaml

Open stites opened this issue 5 years ago • 2 comments

On occasion, I have used orgstat for visualizing my items and fixing any inconsistencies. In this case, it can be useful to only output to one subdirectory.

I think the addition is pretty simple, Just thread some kind of additional confgSubDirFormat through the logic starting from here https://github.com/volhovm/orgstat/blob/c4101f0eb6faea6f28ab08cfccd5bd7cae207943/src/OrgStat/Config.hs#L82 up till around here: https://github.com/volhovm/orgstat/blob/c4101f0eb6faea6f28ab08cfccd5bd7cae207943/src/OrgStat/Logic.hs#L37

Would this be a desirable PR? If so -- do I understand the scope of the problem correctly?

stites avatar Sep 20 '20 02:09 stites

Hi! Not sure I understand what exactly you want to achieve. If the target is just to replace the standard %F-%H-%M-%S subdirectory format, then yes, totally, just add it as a config option and change it in the second place, you're right. Otherwise, I guess you might have missed the command line argument --output-dir, which fixes the output directory to what is set, and does not create subdirectories. Perhaps that's what you need (I do agree it's not documented well). Tell me if it helps.

volhovm avatar Sep 20 '20 12:09 volhovm

I did miss --output-dir! This solves what I need, but I'm not sure it closes the ticket. I'll try to take a stab at this when I have some time -- it could also be nice to run orgstat without having to explicitly add extra command line arguments.

stites avatar Sep 28 '20 13:09 stites