DOH

From ODF::Wiki

Jump to: navigation, search

doh is a project to read, create, edit and convert different archives. Archives are abstract collections of files, which can be - by now - usual Directories or archive files (called "Archfiles") - like the TAR file format.

DOH
{{{Screenshot}}}
{{{Description}}}
Information
Producer: The Open Descent Foundation
Developers: King Lo
Current version: 0.10
Latest release: 06 Dec 2009
Operating systems: Linux, Windows
Category: Utilities
License: GPL version 2
Languages: C++
Website: none
Project page: click here

doh can currently handle the following archive types:

  • HOG1
  • HOG2
  • TAR (only POSIX Tar files)
  • PIG (since July 2009, readonly)
  • Directories

doh is the project name, but it includes two projects:

  • libdoh - a C++ library
  • doh - a commandline tool to handle libdoh

There is also a GUI available named "XDoh" (written in Qt4).

Contents

[edit] Functionality

doh has the following features:

  • reading and writing archives, creating new ones
  • reading/writing header of an archive
  • reading/writing headers of stored files
  • returning/printing a list containing all filenames
  • printing a list of all files and their attributes
  • checking for existence of a stored file with given filename
  • printing, extracting, adding and deleting a file
  • iterators for better control

[edit] Concepts

libdoh was written in C++ following the standards of OOP. The base class for all archives is the pure virtual "Archive" class, which means that it tells you which functions are needed. It is inherited by the "Directory" and "Archfile" classes. ArchFile (which itself inherits from libodf's "tFILE" class, too) is a pure virtual, too. It is written in a way so that it is very easy to write code for a new Archfile subclass - simply extend all pure virtual functions in an inherited class - which means, e.g. write a function that returns the size of a headers for stored files. However, the working code is done by ArchFile - which means no duplication of code. Writing your own Archfile subclass is like filling a form.

Another concept is the strict use of exceptions in case of errors. All functions have exception qualifiers.

libdoh makes use of iterators and operator overloading.

When libdoh was written, it was important to write a library that could be understood easily. Hence, all functions are - even if documented - mostly self-explanatory. For example, to extract a special file, you simply set the iterator on it and call "void delete_cur(void)". You do never need to know where the filepointer exactly is positioned - for extracting a file, you don't even need to know *what* a filepointer is.

[edit] The Commandline Tool

The commandline tool has the same functionality as the library. It is very user friendly.

[edit] The GUI

The GUI, called XDoh, shall make it easier to handle directories and Archfiles - you can process files with only one click. See XDoh for more information.

[edit] State of Development

The first version was released. The most recent development version can be downloaded on our Bazaar repository. It carries the project name "doh".

Planned extensions are a file stats printer and new file formats (GZ, BZ2, ZIP). For reading ZIP files, in many projects, currently a special libunzip is used instead.

Personal tools