Amanda-Users

Re: OT: LTO Barcodes

2007-06-15 15:51:36
Subject: Re: OT: LTO Barcodes
From: Chris Hoogendyk <hoogendyk AT bio.umass DOT edu>
To: Harald Schioeberg <harald AT net.t-labs.tu-berlin DOT de>
Date: Fri, 15 Jun 2007 15:37:18 -0400

Harald Schioeberg wrote:
> Hi,
>
> definately off-topic, but i have written a script to generate sheets
> with LTO barcode labels.
>
> Still i think i can share it with the amanda community, and as i don't
> know a good place for it, perhaps somebody here on the list will put it
> to a place where others can find it :)

It's fun to do that kind of stuff; and, if it is precisely what you (or
someone else) need(s), then it is a quick, easy solution.

But, since there are lots of variations (other tape types, barcode
types, with/without checksums, with/without text, etc.), why re-invent
the wheel?

When I was looking for barcode solutions a little while back, I found
what I thought was an absolutely elegant solution -- a barcode writing
program written in pure postscript
(http://www.terryburton.co.uk/barcodewriter/). It's a neat, modular
solution akin to amanda's implementation of a planner that then uses the
native tools on each platform to do backups and recoveries. So, we have
a set of postscript subroutines that is completely modular. Then,
whichever tool you use to do page layouts or forms, just needs to access
those subroutines. A line of postscript like this:

50 450 moveto (1-86074-271) (includetext) isbn barcode

prints out a barcode. It covers just about every barcode format you can
think of. It's postscript, so they can be repositioned, rotated,
resized, etc. Just by tweaking parameters, I was able to exactly
reproduce the labels that came with my AIT library. And there are front
ends or plugins for Scribus, TeX, a wysiwyg layout program for linux, a
web based generator, etc. Plus, it is very easy to write your own
programs in perl or whatever. But, instead of having to deal with all
the details and variations of barcodes, you just include the postscript
barcode writer in your output and then generate the one-liner to
actually draw a barcode. Put it in a loop and you have a page of barcodes.

If you are doing this a lot, and are concerned about the bulk of the
postscript, you can edit out just the barcode type you want (there are
instructions) and then output that with your lines. Or, you could even
upload the code to your printer so that it stays resident in memory
(like postscript fonts) and then get barcodes from any application by
just outputing that one line.

So, if you wanted to, you could re-write your perl script to use Barcode
Writer and even allow calling parameters to generate pages of labels for
different types of backup tapes.

I don't mean to put down your effort. It's a decent piece of work. But
it's sort of like my tapewriter backup script that I wrote and relied on
for a couple of years. When I managed to get a tape library and a
dedicated backup server, I threw out my script and adopted amanda. Well,
I didn't completely throw it out. I used some of the code for  a wrapper
that I use with amanda to get ufsdumps of solaris snapshots.

Anyway, I have no connection with barcode writer at all other than being
jealous. Twenty years ago I did some serious research on barcodes with
the intention of writing a program for graphic artists and package
designers. I still have the paper files. But, I doubt I ever would have
come up with such a simple, elegant solution.

I would still put your tool on the wiki; because, if it is precisely
what someone needs, it will serve the community positively. Then, if you
feel like it, rework it as a front end to barcode writer to make it
simpler and more general.



---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst 

<hoogendyk AT bio.umass DOT edu>

--------------- 

Erdös 4



<Prev in Thread] Current Thread [Next in Thread>