§ What is Pâté?
Pâté (or just Pate) is a plugin for Kate on KDE3 that allows you to create new plugins in Python for Kate.
What is its use?
Pate makes Kate plugin development simple and intuitive. No more creating a mish-mash of shared libraries, desktop files, rc files, etc... Just create your plugin and drop it in a directory.
A simple example
Create a new file (in your editor of choice ;-)) with the following contents:
import kate
@kate.onAction("Hello World", "Ctrl+H")
def insertHelloWorld():
currentDocument = kate.document()
currentDocument.insertText("Hello World!")
Assuming you have Pate installed, save it as helloworld.py (or any name so long as it has a .py file extension) and drop it in ~/.kde/share/apps/kate/pyplugins/. Restart Kate and hit Ctrl+H or click 'Tools->Hello World'. Voilà. Elegant, huh?
What kind of stuff can I make with it?
As the project was originally created to "scratch an itch" (namely, making Kate scriptable easily) it comes with a few bundled scripts. You can view a demo of the included plugins (ogg, 20mb). Some notable scripts are:
- Expand – Programmable text expansions.
- Source Browser – Browsing and navigating through the structure your source file.
- Pastebin Upload – What it says on the tin.
§ Download
Pate is available as a source tarball. You can get the latest source from the bazaar repository.
Source tarballs
Bazaar repository
To get the bazaar branch simply run
bzr get http://paul.giannaros.org/bzr/pate
Packages
- pate-0.1.1.suse102.i386.rpm
- pate-0.1.suse102.i386.rpm
- pate-0.1.pkg.tar.gz (courtesy of Nicolas Doualot)
If anyone wants to make any other kind distro-specific package feel free to mail it to me.
§ Installation
In short:
tar zxf pate-version.tar.gz
cd pate-version/
./configure
cd build/
make && sudo make install
You will need recent versions of sip, PyQt, and PyKDE. Some distros (i.e Mandriva and openSUSE) provide very old versions as they packaged the dismally old ones bundled in kdebindings3. Instructions and some scripts to install them automatically are provided, however!
The build system uses CMake.