S-Flux SourceForge.net Logo

What is S-Flux

How many times you can't realize what application you need to perform a particular operation on your documents? Or you just don't know what kind of operations you can perform on your files? That's where S-Flux come in.
Starting from one or more documents (images, movies, musics, texts, whatever) S-Flux check applications installed on your system to gather informations about them and will show you a comprehensive and organized list of what operations you can make on your documents.

But that's not enough. Using S-Flux you can also perform the operations you are looking at. Not only, you can also link operations together making pipelining extremely easy.

Maybe you can think to S-Flux as an intelligent universal graphical user interface for all kinds of applications.

Installation

In order to get S-Flux working you'll need to install some third party libraries (Pyhton, wxWidgets, wxPython and librdf). In the next sections you'll find installation instructions for the three main operating systems.

Installation on Microsoft Windows platforms

First of all you have to install the support libraries, as follows:

Then you can get S-Flux from here, unzip it on a folder of your choice and start using it (for better user experience see the next section "Integrating S-Flux in a Microsoft Windows environment").

Integrating S-Flux in a Microsoft Windows environment

It can be useful to launch S-Flux using a "Send to..." contextual menu shortcut. In order to get S-Flux appear in your menu you have to add a link to S-Flux in the directory named "C:\Docuemnt and Settings\User\Send To" (where C: is the drive where you have installed your operating system and "User" is the name of your user). In particular the link to point to have to be something like this "C:\Python24\python.exe "C:\Programs\S-Flux\SFlux.py".

Installation on Mac OSX

S-Flux has been tested with Mac OSX version 10.3 and 10.4. Installations instructions are different depending on the version but both needs a preliminary step: compiling librdf library. In order to compile the library you need to have the "Developers Tools" installed on your machine. Usually you can find them on you Operating System DVD but you can also find them, for free, at the Apple website. Once you're sure to have the Developer Tools installed you can go on compiling librdf proceeding as follow:

Then the installation process differs from 10.3 and 10.4, so follow the instructions from the right section.

Mac OSX 10.3 (Panther)

You have to install wxWidgets and wxPython libraries (necessary to build the Graphical User Interface):

Then you can get S-Flux from here, uncompress it on a folder of your choice and start using it (for better user experience see the next section "Integrating S-Flux on a Mac OSX environment").

Mac OSX 10.4 (Tiger)

You don't need to install any other libraries, just get S-Flux from here, uncompress it on a folder of your choice and start using it (for a better user experience see the next section "Integrating S-Flux on a Mac OSX environment").

Integrating S-Flux on a Mac OSX envirnoment

It can be useful to have S-Flux always ready at your fingers, having a way to directly process the documents selected on the Finder. All you have to do is to make a simple Applescript script like this one:

on run
	set command to "pythonw /Users/yourname/Desktop/S-Flux/SFlux.py"
	
	tell application "Finder"
		set this_item to the selection
	end tell
	
	repeat with i from 1 to the count of this_item
		set elemento to (item i of this_item) as alias
		set mypath to posix_path(elemento)
		set comando to comando & " " & mypath
	end repeat
	
	tell application "Terminal"
		do script with command comando
	end tell
end run

on posix_path(mac_path)
	set mac_path to (mac_path as text)
	set root to (offset of ":" in mac_path)
	set rootdisk to (characters 1 thru (root - 1) of mac_path)
	set appoggio to text (root + 1) thru end of mac_path
	set unixpath to "/" & appoggio
	set chars to every character of unixpath
	repeat with i from 2 to length of chars
		if item i of chars as text is equal to "/" then
			set item i of chars to ":"
		else if item i of chars as text is equal to ":" then
			set item i of chars to "/"
		else if item i of chars as text is equal to "'" then
			set item i of chars to "\\'"
		else if item i of chars as text is equal to "\"" then
			set item i of chars to "\\" & "\""
		else if item i of chars as text is equal to "*" then
			set item i of chars to "\\*"
		else if item i of chars as text is equal to "?" then
			set item i of chars to "\\?"
			--else if item i of chars as text is equal to " " then
			--	set item i of chars to "\\ "
		else if item i of chars as text is equal to "\\" then
			set item i of chars to "\\\\"
		end if
	end repeat
	set xxx to ""
	repeat with carattere in chars
		set xxx to xxx & carattere
	end repeat
	return xxx
end posix_path

REMEMBER to change the 'command' value to the path where you have installed S-Flux and to save the script in the Applescript folder on your system.

Next you have to make Applescript menu always visible, to do so download and install the very little utlity that you can find at http://www.apple.com/applescript/scriptmenu/.

Installation on GNU/Linux

To make S-Flux work you need to have the following software installed on your system:

GNU/Linux systems are really etherogeneous so it's hard to provide a common installation method. At the moment S-Flux has been tested on Debian (etch) and Ubuntu (Hoary, Breezy, test on Feisty coming soon) distributions. In these cases you need to install the following packages:

Now just get S-Flux from here, uncompress it on a folder of your choice and start using it (for a better user experience see the next section "Integrating S-Flux in a GNOME desktop environment").

Integrating S-Flux in a GNOME desktop environment

The Gnome desktop environment is usually shipped with the Nautilus file manager. With Nautilus you can easily call user-defined scripts from a contextual menu after having selected some files with its graphical interface.
So all you have to do is to create a shell script as the following and put it in your "~/.gnome2/nautilus-scripts" directory:

#!/bin/bash
#Title=S-Flux

python <S-Flux_installation_path>/SFlux.py $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS

Of course, remember to make that script executable (chmod 755 'script-name') and to sobstitute <S-Flux_installation_path> with the real path where you have installed S-Flux.

The RDF repository

S-Flux functionality strictly depends on what external applications "teach" to it using RDF documents. So you have to specify to S-Flux the directory where you'd like to place those crucial documents. It can be everywhere on your file-system, and can be named whatever you like. At the first S-Flux execution it will ask you for the location of that directory, then you'll be able to change it using the "Prefereces..." menu choice.

Starting S-Flux

If you have not integrated S-Flux in your system as described in one of the sections "Integrating S-Flux in a Microsoft Windows environment", "Integrating S-Flux in a Mac OSX environment" or "Integrating S-Flux in a GNOME desktop environment" you can launch S-Flux using the command line. So, assuming that the 'python' command location is in your PATH all you have to do is:

python <S-Flux_Installation_Dir>/SFlux.py <Path_To_The_Document>/DocumentName.ext

where <S-Flux_Installation_Dir> is the path to the directory where you have installed S-Flux and <Path_To_The_Document> is the path to the document you want to process using S-Flux.

ATTENTION!! In a MacOS X environment you have to use the 'pythonw' command instead of 'python'.

Working with S-Flux

S-Flux interface is really simple and self-expressive. Once you've launched it you'll face a small window with some basic informations about the documents you'd like to process (name and mimetype), a list of the applications installed on your system that can manage the documents, a button "Open with" that let you open the documents with the selected application and a button named "Add operation". Pressing the "Add operation" button will add to the interface a new panel from which you can choose one of the operations that can be perfomed on your documents using the applications installed on your system. The list of operations is categorized and when needed you'll be able to specify parameters for the selected operation.
If the operation you have selected produce some document(s) as result you'll be a new panel will appear and you can use it to specify the filename(s) for the new document(s).
When you add an 'operation panel' using the 'Add operation' button you'll see a new button appear next to the last one, named "GO!", pressing it will execute the operation you have selected. While the operations are being executed a progress bar will show you what's going on.
You are not limited to an operation at time, you can add operations to operations just going on pressing the "Add operation" button. S-Flux will examine the output of the last operation in the flow and will show you only the operations that can be done on those kind of documents. And, of course, you can save your operations flow using the File-Save menu option to reload it at your needs using the File-Load menu option.

You don't need to concentrate on applications anymore, operations are the only thing you have to think about.

Applications complexity

The applications installed in your system can be classified by a complexity level. This can help your operations list to not be too long. The complexity level is a number that can vary from 1 to 5, by default S-Flux will not show you applications (and so their operations) with a complexity level greater than 2. To change this behaviour you can act on the "Show complexity" voice in the "Tools" menu that will let appear a slider from which you can choose the complexity level of your choice.

Choosing the application

Sometimes may happen that a single operation can be performed by more than one application on your system (for example two image processing programs could perfrom the conversion to black and white of an image). In these cases S-Flux choose randomly one of the applications but you can always choose it by your own. All you have to do is to habilitate the "Show applications" voice from the "Tools" menu.