Saturday, August 18, 2012

Interactive selection for ASCII lines using python

Recently I found this nice curses based directory bookmarking tool called cdargs.
I thought it will be nice to have interactive selection for the list. For my bash functions which shows list. Like I have a bash function which can show me a list of clearcase view and then I can choose one of them. That is all bash. But it would have been nice if the list was little interactive and I could have moved around. So I found curses to my help and found another nice tool called iselect.

Iselect does what I need but it does not show the line number like cdargs, so you cannot really select a line by pressing a number. I googled and realized that I can pretty much do the same stuff in python. Since there was no available open source python tool which I can customize to my need, I thought of writing my own. I call it pyselect. It is work in progress and tries to do things like cdargs and iselect. But more customizable and smaller, after all it is scripting in python.

You can checkout the git :

It is still a work in progress but does not look difficult till now.
The current version as of 18Aug2012, lets you interactively lines fewer than 30.

No comments:

Post a Comment