[pmwiki-users] New Recipe: PowerTools

Randy randy at brownragfilms.com
Mon Feb 4 14:09:34 CST 2008

Wow, Hans, you keep adding great recipes - it's hard to keep up with  

You asked for feedback and suggestions. Many years ago I wrote a  
collection of power tools in C that I used in DOS, feeding the output  
of one into the next using pipes. I still have a hard copy of the  
manual. (I might have the code somewhere on an old computer...)

Here are a few of the tools that I wrote. I can send you more  
information about any that interest you (or anyone else interested in  
writing power tools). I was dealing with files, but most of these  
tools could as easily apply to pages:

Calc - to do a calculation using numbers that are either on the  
command line or in a file.

Decode - to display the ASCII values of graphic characters

Define - to remove strings from your file, and optionally, to replace  
them with other strings.

Delq - to delete a set of files, asking user to say yes or no to each

Echox - to copy text multiple times

Ensure - to ensure that the last character of a file is the desired  
one. Or to remove a character that is not wanted.

Findat - to extract or delete particular lines from a file.

Merge - to combine already sorted files into one single sorted file

Move - to move files by one command, instead of by copy and erase

Movedate - to rename files into subdirectories based on their creation  

Reformat - to reformat text based on a template (this was a very  
powerful tool, but hard to explain concisely)

Showerr - to show the errorlevel

Showstat - to show the status of a file or subdirectory, and to set  
errorlevel to indicate the status

Siz - to subtotal file sizes

Space - to calculate disk space requirements for files

Split - to separate lines of a file into different result-files,  
according to rules specified in a table (a very powerful tool)

Sum - to total up a column of numbers

Text - to convert a file into standard ASCII text.

Try - to make, remove, or change to a directory without showing an  
error message when unsuccessful

Uniq - to remove lines from a file that are identical to the previous  

Whatis - to document or to look up the meaning of a word

Width - to show the width of each line in file; also, to set errorlevel

Wordwrap - to fit text into a specified column width

Xtrbytes - to extract or delete sections of a file

Xtrchars - to extract or rearrange characters in text lines

Xtrline - to extract or delete one or more lines from a file

I hope this sparks some recipe ideas!


On Feb 4, 2008, at 1:22 PM, Hans wrote:

> A collection of markup  expressions which can be used to process
> multiple pages.
> See http://www.pmwiki.org/wiki/Cookbook/PowerTools
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20080204/aaea0ab5/attachment.html 

More information about the pmwiki-users mailing list