@@ -0,0 +1,1902 @@
+#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2015 J%C3%A9r%C3%A9mie DECOCK (http://www.jdhp.org)%0A%0A%22%22%22%0AA simple GEGL snippet with the Gobject automatic introspection method.%0A%0AThis inverts the colors of a PNG file.%0A%0ABUG: GEGL has been built without introspection on Debian 8.%0A     See https://github.com/jsbueno/python-gegl/issues/2%0A%0ASee: http://linuxfr.org/news/gegl-0-3-0-et-babl-0-1-12-sont-de-sortie%0A     http://gegl.org/operations.html#Gegl%0A     http://gegl.org/operations.html#GEGL%2520operations%0A     https://github.com/jsbueno/python-gegl/blob/master/snippets.py%0A     https://github.com/jsbueno/python-gegl%0A%0ADebian dependencies: libgegl-dev (?)%0A%22%22%22%0A%0Aimport argparse%0A%0Afrom gi.repository import Gegl as gegl%0A%0Adef main():%0A%0A    # Parse options%0A%0A    parser = argparse.ArgumentParser(description='An argparse snippet.')%0A%0A    parser.add_argument(%22--infile%22,  %22-i%22,  help=%22the input file%22,  required=True, metavar=%22STRING%22)%0A    parser.add_argument(%22--outfile%22, %22-o%22,  help=%22the output file%22, required=True, metavar=%22STRING%22)%0A%0A    args = parser.parse_args()%0A    infile = args.infile%0A    outfile = args.outfile%0A%0A    # GEGL ######################################%0A%0A    gegl.init(%5B%5D)%0A%0A    #print(gegl.list_operations())%0A%0A    # Make nodes%0A%0A    node1 = gegl.Node()%0A    node2 = gegl.Node() # png-load%0A    node3 = gegl.Node() # invert%0A    node4 = gegl.Node() # png-save%0A%0A    # Set properties%0A%0A    node2.set_property(%22operation%22, %22gegl:png-load%22)%0A    node2.set_property(%22path%22, infile)%0A%0A    node3.set_property(%22operation%22, %22gegl:invert%22)%0A%0A    node4.set_property(%22operation%22, %22gegl:png-save%22)%0A    node4.set_property(%22path%22, outfile)%0A%0A    # Make the graph%0A%0A    node1.add_child(node2)%0A    node1.add_child(node3)%0A    node1.add_child(node4)%0A%0A    node2.connect_to(%22output%22, node3, %22input%22)%0A    node3.connect_to(%22output%22, node4, %22input%22)%0A%0A    # Process%0A%0A    node4.process()%0A%0Aif __name__ == '__main__':%0A    main()%0A%0A

Add a snippet (Python GEGL).