From owner-freebsd-questions@FreeBSD.ORG Fri Jun 18 02:57:05 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26DE106566B for ; Fri, 18 Jun 2010 02:57:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7542B8FC1A for ; Fri, 18 Jun 2010 02:57:05 +0000 (UTC) Received: from r55.edvax.de (port-92-195-117-232.dynamic.qsc.de [92.195.117.232]) by mx02.qsc.de (Postfix) with ESMTP id CA34F1E1D9; Fri, 18 Jun 2010 04:57:03 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o5I2v31a002095; Fri, 18 Jun 2010 04:57:03 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 18 Jun 2010 04:57:03 +0200 From: Polytropon To: "Michael W. Lucas" Message-Id: <20100618045703.22576f1c.freebsd@edvax.de> In-Reply-To: <20100617152237.GA68461@bewilderbeast.blackhelicopters.org> References: <20100617152237.GA68461@bewilderbeast.blackhelicopters.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: PDF storage software recommendations? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2010 02:57:05 -0000 On Thu, 17 Jun 2010 11:22:37 -0400, "Michael W. Lucas" wrote: > Hi, > > I have to store a bunch of PDFs of orders. I'd like to be able to > "tag" these by customer, date, and a couple of other characteristics, > and then search and/or sort by these tags. > > I'm certain that we have something in ports that will do this, but > danged if I can find a good candidate. While I'm sure I could build a > database/PHP app that would work, surely someone's already done this? > Any recommendations? Maybe my answer will sound "low level", but it works - REALLY works - and works with mostly every kind of data. Basically, you need to keep two things in mind: 1. PDF file filenames 2. a CSV database with a known format. Let's say you don't care much for the PDF file names. It's okay, as you don't have to. YOu have just to make sure that there aren't two files with the same name (but IF they are, different path prefixes / subdirs make it possible). Let's furthermore say you maintain a file of a format like this: # $1 : $2 : $3 : $4 # filename : Customer Name : Date : Keywords # --------------:---------------:---------------:-------------------- 0477763.pdf : Sixpack J. Q. : 2010-05-12 : paper, plastics 76248873aT.pdf : Meow C. : 2009-03-18 : fish, chips, beer UF/5u7r3jh.pdf : Woof D. : 2010-01-05 : explosives rrw85673.pdf : Monk A. : 2010-04-23 : tissues, water Now you can easily search it (as it is pure text), and you can use scripts (e. g. written in awk) to obtain specific information and perform certain actions (like calling a PDF viewer program with one or more files you want to view, or print files that match a certain criteria you can query for). You can use a script to compact the database (remove the "pretty printing" that helps when manually editing the file), or even sort it. The file name can then "point to" a specific subtree with all the "tricks" you can do on file system level. You can also easily (!) write your own GUI wrapper for a shell script that does - create new entries - edit entries - remove entries - search for entries - perform actions (open in viewer, print to printer) - add new / remove unneeded data columns I'd even recommend using Tcl/Tk for that. Oh, and did I mention that you can not only use this for PDF files, but for ALL files? It's very versatile and extendible. It doesn't tie you to a specific program. Additionally, it can be used on many platforms this way. You even don't need PHP or databases for that. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...