#20 Allow actions to filter clipped text

open
nobody
5
2009-05-26
2009-05-26
Anonymous
No

I changed actions.py as follows, which allows me to write actions that filter text that I select. I wrote a program to change smb:\\ paths to their windows equivalents. Perhaps you could add an option for each action's command to optionally replace the selection with the output of the action - and then use something like the code below?

def commandActivated(menu, cmd):
command = cmd.replace("%s", glipper.get_history_item(0))
str = os.popen(command).read()
glipper.set_history_item(0, str)
glipper.add_history_item(str)

Thanks for Glipper!
- Leslie Viljoen

Discussion


Log in to post a comment.