usage links
project page
download Logo

netJS logo


desift - the template-based text formatter

Desift is a tool for formatting and filtering text data. It occupies a niche that falls between spartan, but highly leveraged shell utilities such as 'cut'; and full-featured, but often application- or technology-specific template engines. As a result, desift is a remarkably flexible tool that can solve 80 or 90% of your template-based formatting problems.

Like cut, printf, and other multi-purpose shell scripting favorites, desift provides generic text formatting and filtering functions accessible from the shell. It uses standard input and output channels to maximize how it can be leveraged. Desift is particularly effective when combined in a pipeline with programs that query a data source or perform non-interactive text editing. It's lightweight and easy to use for impromptu tasks. While you can create a template file to use for repeated or rigorous formatting tasks, you can also simply specify a template as a command-line option, in much the same way as sed allows you to provide a simple search and replace function as an argument to perform edits (as opposed to an external sed script file).

Akin to robust markup/code generators, desift allows you to clearly separate data from presentation. Formatting templates can be managed and reused independently of the data or logic used to create/edit/filter data. But unlike a full-featured template engine, it provides no facilities for a "template language." Desift is purely driven by data, as opposed to template directives; the template is only used to define placeholders for data elements. The absence of this kind of logic encourages desift to be used for "part of the problem," allowing you to leverage other purposeful tools depending on the task. But while desift is specific in what it does (format data using a template), it's generic in its usage and application.

home · usage · - project page · download