memops

Update of "memops"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 0bbba8d89118f46eb1919c89fefd74eaa3544555
Page Name:memops
Date: 2012-03-02 02:24:07
Original User: cfkoch
Parent: 2e11c8a0d001551fe367ed5ea69ab74af0ce04c9
Content

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.