Date: Fri, 1 Jan 2010 18:42:19 +0100 From: Polytropon <freebsd@edvax.de> To: Doug Poland <doug@polands.org> Cc: questions@freebsd.org Subject: Re: Advanced printing/layout tools Message-ID: <20100101184219.6cd84f19.freebsd@edvax.de> In-Reply-To: <4B3E3121.6060106@polands.org> References: <4B3E3121.6060106@polands.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 01 Jan 2010 11:30:09 -0600, Doug Poland <doug@polands.org> wrote: > Hello, > > I've been tasked to print a phonebook style directory for an > organization. The data will be coming out of a MySQL database and can > be easily saved as comma-delimited, or whatever text format I need. > > My specific question is, what open source tools would one use to tackle > a project like this? I'm very comfortable in a CLI and do not > require/desire a GUI. I'd suggest to use awk + LaTeX. I've been very happy with this combination for a various number of tasks - just as you mentioned: Data coming from some kind of database (MySQL, CSV or whatever) and should then be layouted. I use an awk script that reads the input line-wise, and then splitting it via a known delimiter, e. g. ":". Before doing so, it creates a LaTeX preamble, and afterwards it "closes" the document. The tex file is then processed by pdflatex, giving you a PDF file as output. For your particular task, I'd suggest a two- or more column layout (LaTeX provides that), containing a tabular environment. This environment then contains the data. If LaTeX doesn't take care of "page full" for you - I don't know format or amount of your source data - you can do that easily with the awk script. In order to update the document, you just have to re-run the awk script and pdflatex command. I often (ab)use a Makefile for this. The awk interpreter comes with FreeBSD, and LaTeX can easily be installed, e. g. with "pkg_add -r teTeX". Of course, you stay in the free land of open source with this combination. In case you want to have an example file, write off-list to me - no need to pollute the list with this niche-market stuff. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100101184219.6cd84f19.freebsd>