marshallward / f90nml

A Python module and command line tool for working with Fortran namelists
Apache License 2.0
136 stars 50 forks source link

Multiple Namelists in CLI #156

Open kgallmei opened 1 year ago

kgallmei commented 1 year ago

I would very much appreciate, if one could change variables in multiple namelists via the cli simultanuously.

So instead of giving '-g NML' and '-v "VAR=val"', which works only for only one 'NML' (I do not know, for which one, if one gives multiple '-g ...'), one could maybe implement an argument parser, which uses the syntax "-v "NML:VAR=val" and throw the '-g ...'?

Thanks for the cool work anyway.

marshallward commented 1 year ago

I agree, the current flags are neither good nor easy to use. I believe could use an entire overhaul.

Your suggestion seems good to me, I'll also look at how jq does this sort of thing.