processi

about processes and engines

Archive for the ‘shell’ Category

kotoba

I’m implementing a journaling functionality for OpenWFEru, our open source Ruby workflow and bpm engine. OpenWFEru currently uses unique ids for business process instances that are mostly plain integers.

Journaling goal is to help rebuild broken processes and when this is done manually, it involves matching various files whose names sport those “workflow instance ids”. Matching 1174038400840 among 1174137717900 might be really tiresome for the eyes especially on some platforms without a decent ‘find’ or ‘grep’ implementation.

kotoba.pngI’ve just implemented a base 10 to base 70 converter… Sounds boring ? Indeed but maybe with a look at these examples, it might get more interesting:

Kotoba uses 70 of the syllables of the Japanese language to produce strings that are [usually] easier to remember than their integer counterparts.

Of course, Kotoba is usable as a library (require ‘kotoba’) from your Ruby code (but the command line version is great for integrating into your nifty shell scripts).

Kotoba’s source is available under a BSD license as a single file download. Else, it’s currently part of OpenWFEru. I don’t plan to ‘gemify’ it for now.

update : it’s been ‘gemified’ as openwferu-kotoba. It’s available via a classic download as well.

Written by John Mettraux

March 18, 2007 at 6:02 am

Posted in coding, openwferu, ruby, shell, utils

find based tools

find” is one of the most useful program/command in a unix[-like] environment.

I wrote two small shell scripts based on it.


vf stands for “Vi[m] Find”, you type

vf '*Servlet.java'

and it will open in your editor ($EDITOR) the first file ending with “Servlet.java” that it’ll find in the current tree (the current dir and its subdirs, recursively).


fijar stands for “Find In JAR”. You can type

fijar 'Servlet'

and it will scan all the jars in the current directory to list the ones with files whose name contain the ‘Servlet’ string. If you add the ‘-r’ option, it will search in all the jars in the current directory and in the subdirs, recursively.


Just thought it might interest some hardcore command line coders. I’ll try to add more of my scripts there : http://www.openwfe.org/tools/.

After a discussion with my colleague Alain Hoang, I release those two scripts under the MIT License, which is very close to ‘public domain’. Thanks for the hint Alain.

Written by John Mettraux

September 28, 2006 at 4:14 am

Posted in dev, java, shell, technical