<div dir="ltr"><div><div><div><div><div><div><div>+1 from me.<br><br></div>I had actually started doing something very similar to Tom's proposal last year[1].<br></div>I never got around to finishing it because I got carried away and started changing other things which didn't get finished ;)<br><br></div>What I had done:<br><br></div>* replaced optparse with argparse<br></div>* use argparse subparsers<br></div>* decided on which parameters were optional and which ones were mandatory<br><br></div><div>Something which was on my mind as well was investigating if/how this newer implementation could be integrated into other tools, for example django's django-admin.py.<br></div><div><br></div>If folks are positive towards this change, It might be worth it to salvage my previous work and finish/improve it.<br><div><div><div><div><div><div><br><br>[1] - <a href="https://github.com/ricardogsilva/pycsw/blob/refactor_admin/bin/pycsw-admin.py">https://github.com/ricardogsilva/pycsw/blob/refactor_admin/bin/pycsw-admin.py</a><br><div><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 23, 2016 at 11:20 PM, Tom Kralidis <span dir="ltr"><<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all: given we are headed towards 2.0 it's a good time to think about<br>
serious changes that would valuable.<br>
<br>
One that has come to my mind is revamping the CLI for pycsw-admin.py<br>
to be more elegant, in particular:<br>
<br>
1./ using subcommands<br>
<br>
Instead of:<br>
<br>
pycsw-admin.py -c post_xml -u <a href="http://localhost:8000" rel="noreferrer" target="_blank">http://localhost:8000</a> -x path/to/file.xml<br>
<br>
pycsw-admin.py post-xml <a href="http://localhost:8000" rel="noreferrer" target="_blank">http://localhost:8000</a> path/to/file.xml<br>
<br>
Figuring out what's a positional arg (beyond the first 'subcommand'<br>
are) and what's worth a flag will need investigation.<br>
<br>
2./ moving pycsw-admin.py into into pycsw.core.admin within __main__<br>
and declaring pycsw-admin.py as an entry point in setup.py.  Looks<br>
like this requires a move (from distutils) to setuptools<br>
<br>
Thoughts?  What approaches<br>
or tools/libs can we use to move this forward?<br>
What do folks think about renewing the CLI?  Is it worth it?  Too much<br>
trouble for something that 'works'?  Of course this would<br>
break the existing CLI, but if folks agree this is a good idea, now<br>
is the time to move this forward.<br>
<br>
Cheers<br>
<br>
..Tom<br>
_______________________________________________<br>
pycsw-devel mailing list<br>
<a href="mailto:pycsw-devel@lists.osgeo.org">pycsw-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pycsw-devel" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pycsw-devel</a></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">___________________________ ___ __<br>Ricardo Garcia Silva</div>
</div></div></div></div></div></div></div></div></div></div></div>