memops

memops
Login

memops

memops is a simple plain-text to PostScript converter tool.

memops is implemented as a single Embedded Ruby (.erb) document which reads plain text from the standard input and writes the PostScript to standard output. However, because the percent symbol (%) actually has significance within PostScript, it is necessary to run erb with the -P option. For example:

  $ erb -P memops.ps.erb < mynotes.txt > mynotes.ps

In case you don't like PostScript, or you NEED to give someone a PDF document, then you can use the handy ps2pdf command which comes with the Ghostscript package:

  $ erb -P memops.ps.erb < mynotes.txt | ps2pdf -sPAPERSIZE=letter - mynotes.pdf

With all that said, memops is, in reality, incredibly limited:

Therefore, your input text will usually have to be formatted before being sent to memops. Most implementations of the fmt(1) command make text at most 65 characters long by default, which is perfect for memops:

  $ fmt mynotes.txt | erb -P memops.ps.erb > mynotes.ps

Of course, you can also specify an alternative width if you wish:

  $ fmt -w 40 mynotes.txt | erb -P memops.ps.erb > mynotes.ps 

One last note. This software is so stupidly simple that I disclaim all copyright to it and release memops into the public domain.