WorKflow ======== Utility to automate workflows on KDE desktops. Thomas Kadauke (tkadauke@gmx.de) [1] 1. Introduction Traditionally, the UNIX operating system consists of many small, simple but powerful components with well-defined interfaces, which can be combined at will to achieve a plethora of different tasks [2]. The following impressive example from Wikipedia [3] illustrates this powerful concept: curl http://en.wikipedia.org/wiki/Pipeline | \ sed 's/[^a-zA-Z ]//g' | \ tr 'A-Z ' 'a-z\n' | \ grep '[a-z]' | \ sort -u | \ comm -23 - /usr/dict/words This combination of commands implements a simple online spell checker for websites, which prints all unknown words. While this concept works well for command-line utilities, today's free desktops still lack simple and user-friendly ways to combine little tools. In Mac OS X, Apple introduced Automator [4], which provides a graphical user interface to record a workflow once and to play it multiple times. Examples of Automator's use cases are batch-renaming of files or downloading all linked images from a website. While it is possible to remote control applications on the free desktop, and by that, to automate tasks, this is generally achieved through programming. In KDE, this is possible with any programming language that is capable of using DCOP, which is probably all of them. However, the majority of KDE's user base is not comfortable with any programming language. Also, even for programmers, most of the features offered through DCOP are hard to discover. As a consequence, there is a need for a graphical application. 2. Project Goals The goal of this project is to implement a user-friendly application, called WorKflow, similar to Automator for the KDE desktop, using KDE's DCOP technology [5] to direct data and commands to other applications. 3. Project Details The main task of WorKflow is to provide a way to forward commands between different applications as well as a user-friendly way to define the rules to forward them. It is the applications' resposibility to process the command and answer back to WorKflow. While Apple's Automator is limited to combine so called actions, which are made available by graphical applications, WorKflow will allow to use DCOP calls provided by KDE applications as well as to use command-line applications directly. In this proposal, the union of DCOP calls and command-line applications shall be called commands. Together, this approach opens the door for great flexibility. As an example, consider you want to sell a lot of items on ebay.com, each one with a different picture. As it turns out, the pictures you've taken with your camera need to be adjusted in brightness and contrast. Also, you need to scale the pictures down. As a personal trademark, you always add your name on your pictures. Together, this is a very repetitive task, usually involving a lot of mouse clicks. However, this task is so specialized that there is probably no working solution available for KDE. Using WorKflow, it will be easily possible to design this simple task and to apply it to all of your images, making the image manipulation a matter of seconds. The commands used in this task could be 1) a command to acquire a list of selected images from Konqueror, 2) three commands using ImageMagick's command-line tools to adjust brightness, contrast and image size and 3) one command to start Krita [6], one to add the personal trademark and one to save the image. Note that this workflow is very similar to what a user would normally do. It will be very easy to design a workflow with the mouse. The WorKflow application's main window will be divided into two parts: one parts holds the list of available commands. The main part shows to currently designed workflow in an intuitive fashion. Commands can be dragged from the list to the main part. There, commands will be represented as small forms, called WorKflow parts, which contain user interface elements to adjust the commands' parameters. There will be different categories of WorKflow parts: the first category provides user interfaces to commands which are provided by KDE applications via DCOP, for example a command to get the list of files in the current directory from Konqueror. The GUI of such a WorKflow part can be either designed explicitely or autogenerated from the correspoding DCOP call's signature. The second category adds a GUI layer to command-line utilities, for example to ImageMagick's "convert" program, which converts between different image file types. Both of these categories implement mainly GUIs, adding only little to no functionaly to existing features of KDE or command line applications. The third category, however, implements global commands useful in workflows, which are not (or can't be) provided by external applications. Examples are conditional execution of commands, early termination of the workflow, or to start a new application. 4. Deliverables Within the scope of this project, the WorKflow framework library, libworkflow, along with a small number of WorKflow parts will be implemented. In addition, the WorKflow application to design workflows will be implemented. As a proof of concept, at least one existing KDE application will be extended to use the WorKflow framework. 5. Project Schedule I can start working on this project on May 23rd and finish it by August 21st, as required by the Summer of Code timetable. I will be able to work on the project full-time. 6. License The license of this project will be GPL version 2. 7. Motivation As a long-time KDE user, I'm always fascinated by the ways KDE offers to save me time. However, time-saving features are often difficult to discover. This project helps users discover features of KDE applications (and UNIX tools in general) which are usually hidden. A unified way to work with DCOP calls as well as command-line utilities decreases the learning curve of a user considerably. Since I have been using KDE for quite a while, I feel it is my responsibility to contribute back to the project. In the past year, I started coding on the KDE platform: I wrote a number of KFile plugins [7], and I worked on the KDE's APIDOX. I am very excited about the Summer of Code project, since it will give me the opportunity to devote my time fully to a project I am highly interested in. 8. About Myself I'm a fifth-year bioinformatics student in Tübingen, Germany. I have extensive coding experience on Linux, since this is the primary coding platform used by the Tuebingen bioinformatics department. In addition to countless academic assignments, I have also developed a number of applications for personal use in my spare time, some of which I am planning to polish up in order to make them fit for release to the public. A QT-based project I am currently involved with is scheduled to be released later this year under the GPL [8]. References [1] For my resume, see http://vophercel.homelinux.org/~tkadauke/files/resume.pdf [2] D. M. Ritchie and K. Thompson, "The UNIX Time-Sharing System". See http://cm.bell-labs.com/cm/cs/who/dmr/cacm.html [3] http://en.wikipedia.org/w/index.php?title=Pipeline_%28Unix%29&oldid=49794725 [4] http://www.apple.com/macosx/features/automator/ [5] http://developer.kde.org/documentation/other/dcop.html [6] http://www.koffice.org/krita/ [7] http://www.kde-apps.org/content/show.php?content=30112 up to ...?content=30116 [8] http://open-ms.sourceforge.net/index.php