Zapping · ZVBIZapping Homepage

News | Download | Screenshots | Sourceforge | HelpHelp

Controlling Zapping from the command line

zapping_remote (what a silly name...) is a small command line application included with Zapping 0.7 and later. Its purpose is to send commands to a running Zapping process, modeled after xawtv-remote. Examples:

zapping_remote "zapping.quickshot('JPEG')"

This sends a command to take a screen shot ("quick" because no dialog appears) in JPEG format. Currently Zapping understands some 30 commands. Naturally you can send any Python command, for example:

zapping_remote 'print "Hello!"'

will print Hello! on the console you started Zapping from. Or if you like it a bit more complex:

zapping_remote '
import gtk

def on_quit(*args):
        zapping.quit()
 
window = gtk.Window()
button = gtk.Button("Quit")
button.connect("clicked", on_quit)
window.add(button)
window.show_all()
'

This Python scriptlet creates a new Gtk window with a Quit button. When you click on the button Zapping terminates.