Some time ago, you authored a document about some important topic, and now you want to retrieve that document for an update. The problem is, you don't remember what the file was called or even where it is stored. A document management system (DMS) could aid you in locating that errant file.
Many commercial document management systems are available for purchase. Any one of them could help you keep tabs on the many electronic documents that your company produces. This month, we will look at an open-source, Web-based document management system (DMS) that can meet your basic requirements--for free.
Meet DocMGR
Organizing a group of objects can be a rather mindless task (as in organizing the writing implements in your desk), or it can take on gargantuan proportions (like organizing the "stuff" in your garage). Most tasks fall somewhere in between these two extremes. Take cataloging a coin collection, for instance. Collectors organize their coins according to attributes such as denomination or country of origin. Besides the obvious thematic classifications, other more mundane attributes of interest could include the condition of each coin, its purchase price, and its purchase date.
Cataloging a coin collection would be a rather straightforward proposition using a simple DBMS-based application. Once you entered the desired attributes for each coin in the collection, you could search the resulting database using any of the attributes.
Organizing a collection of electronic documents is not all that different from organizing a coin collection. Instead of denominations or countries, you would be interested in author, topic, or document type (e.g., image, word processing, spreadsheet), among other attributes.
DocMGR, the subject of this month's article, is one of the many open-source projects that can handle the task of cataloguing your electronic documents, making it a snap to find that elusive document you wrote years ago.
More Than Just Attributes
The main screen of DocMGR (Figure 1) gives you an idea of some of the features available to the user. The most obvious is that documents entered into DocMGR are segregated by category. Although three categories are created upon installation, additional ones can be entered at will. Thus, people in your billing department can ensure that their documents are commingling with the documents generated in your accounting department.
Figure 1: The main page of DocMGR summarizes the available features. (Click images to enlarge.)
DocMGR has the obligatory user ID/password security system so that documents can be secured by individual user. Like in the iSeries, group profiles can be generated, and individual users can be added to those groups. The aforementioned categories can be secured by user or group for read-only, read-write, or no access, making for a fairly flexible system. Figure 2 shows the administration screen, displaying the features available to the system administrator.
Figure 2: The administration page gives access to the user and database administration tasks.
DocMGR would be rather unremarkable if it required you to type in all of the attributes for each document. In fact, it would be almost useless. If you have ever attempted to build a database for one of your collections, you will recall the huge amount of time you had to spend inputting all of your data. While you will have to enter your own description for digital images that you wish to store, the content of text, HTML, PDF, and Word documents is easily extracted and indexed. Upload a Word document, and you can immediately retrieve that document based on any of the words contained within it. Talk about a time-saver! The software author even claims to be able to extract text using OCR from an image file (say, from a fax TIFF image), but I have not tested that part of DocMGR.
Once you have some documents indexed, you can search on their content. Figure 3 shows the advanced search page, which you use to create complex search requests.
Figure 3: The advanced search page allows for flexible search parameters.
System Requirements
The system requirements for DocMGR are easily filled by any modern Linux distribution. I use Red Hat Linux 9 on my laptop computer and was able to install DocMGR with a minimum of fuss. During the initial installation, I selected both the database and Web server options as well as the graphics packages. As a result, the only missing package was php-pgsql, which allows PHP to connect to the PostgreSQL database. To solve that problem, I simply ran this command: rpm -i php-pgsql.
Installation Fine Tuning
Installation was quite simple using the instructions provided on the Web site. There were some slight deviations that may trip up someone unfamiliar with Linux, so I'll add the following notes:
- When you untar the tarball containing the software (tar -xzf docmgr-0.44.tar.gz), you will have created a directory called "doc." On a stock Redhat installation, the Web root directory is /var/www/html, so that is where DocMGR must be placed. I wanted the URL to be http://localhost/DocMGR, so I issued the following command to position the software in the correct location for Apache and to rename it simultaneously:
mv doc /var/www/html/DocMGR - The fifth instruction states the following: Set "register_globals=on" in your php.ini file. That file is stored in the /etc directory.
- In its stock configuration, PostgreSQL does not accept TCP/IP connections. You will need to enable TCP/IP connections. To do that, edit the file /var/lib/pgsql/data/postgresql.conf; and then uncomment the line tcpip_socket = true. Next, edit the file /var/lib/pgsql/data/pg_hba.conf, and at the bottom of the file, ensure that the "host all all 127.0.0.1 255.255.255.255 trust" is uncommented. This will allow you to connect to your local DBMS without using a password. This wouldn't be a suggested course of action in a production environment, but for testing and demonstration, it will save you some aggravation. For more information about PostgreSQL configuration, visit their Web site.
- The config.inc.php file referred to in step 4 of the instructions is in the DocMGR/include directory (if you renamed the directory as instructed above).
- Ensure that you restart postgresql and Apache after you have made these changes so that they take effect.
Does It Handle Document Type "X"?
My company is migrating to the Open Office (OO) office suite. The format in which OO documents are stored is a zip file (with a filename extension representing the document type instead of .zip) containing plain text with XML markup. As it comes from the Web site, DocMGR will not automatically index that format. However, DocMGR is open source, so it is possible to extend the functionality to include auto-indexing of OO documents. It is a trivial matter to extract the content from an OO document, returning the text and removing the XML markup. (How trivial? This command will do the trick: unzip -p someDoc.sxw content.xml|tr "<" "12" | cut -c1-256 | grep ^text | cut '-d>' -f2, | uniq)
Armed with that knowledge and the DocMGR PHP code, it should be fairly easy to extend DocMGR to handle OO documents. I hope to have this modification completed by the time you read this article, and I will contribute it back to the author of DocMGR. Perhaps it will be integrated in the software by the time you download DocMGR!
No Doubt
There is no doubt that the commercial document management systems have a lot to offer in terms of features. If your needs are sophisticated (and your wallet is, too), then by all means take advantage of what the technology has to offer.
If your needs (and pocketbook) are more modest, then give an open-source alternative a try. If DocMGR doesn't fulfill your expectations, go to http://www.Freshmeat.net and search for "Document Management System." When I did that, I found 38 projects. Perhaps one of those will be a better fit.
That's it for this month. Have fun with your DMS project, and remember: There are tons of open-source software jewels out there. Spend a little time researching them, and consider using them as well as the commercial alternatives. You may be surprised by what you uncover!
Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms for over 21 years. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He recently co-authored the book Understanding Linux Web Hosting with Don Denoncourt. Barry can be reached at
LATEST COMMENTS
MC Press Online