MethLab File Layout

This page describes the structure of the MethLab source code.


Contains the main executable (methlab), tool executables (methlab-hide, methlab-quit, methlab-show, methlab-toggle), documentation (COPYING, CREDITS, README, TODO) and the install script ( with its manifest file (MANIFEST).


Contains the translation framework and the MethLab translation files.

  • nl/: Dutch translation.
  • ro/: Romanian translation.
  • Add a new language to the translation framework and add it to SVN.
  • Compile a single or all translation files.
  • Merge changes in the .pot file to all the .po files.
  • methlab.pot: Contains the translation template.
  • README: Documentation about the utility scripts.
  • Update the .pot file from the MethLab sources.


Contains the source code. Contains subdirectories with database source and audio player drivers.

  • db_sources/: Contains database source drivers.
  • drivers/: Contains audio player drivers.
  • images/: Contains images used by the user interface.
  • Empty file required to make this directory an importable python package.
  • Contains the database thread. This class abstracts accessing the MethLab database. Even though database access is threaded, this class provides both synchronous and asynchronous query runners. This class is also responsible for transparently migrating the MethLab database to a new layout.
  • Contains all the SQL queries used by the database class.
  • Implements the MethLab DBUS service. Currently implements a 'quit' method for the application and 'show', 'hide' and 'toggle' methods for the main application window.
  • Contains the user interface for the directory selector.
  • Contains all the logic for the user interface. Note that this contains the bulk of all the code and is quite fragile in some places.
  • Contains the layout of the main application window.
  • The query translator translates complex queries ('@artist = "foo"') to proper SQL.
  • A helper class for updating the database in a seperate thread.


Contains the datasources that can be used by MethLab and some utility classes and functions.

  • Scans the db_sources directory for valid database sources by importing all modules and checking if they export a DB_SOURCES variable.
  • Filesystem database source. Uses the mutagen or TagPy libraries to extract metadata from files in specified directories.
  • MPD database source. Talks to MPD to update MethLab's metadata database.
  • Symlink to ../drivers/ Library used to communicate with MPD.
  • Helper functions and classes to transparently support TagPy, old TagPy and Mutagen in the filesystem source.
  • Contains a helper function to extract a numerical part from a string.


Contains the audio player drivers that allow MethLab to communicate with several audio players.

  • Scans the drivers directory for valid audio player drivers by importing all modules and checking if they export a DRIVERS variable.
  • Driver for communicating with Audacious through its DBUS interface.
  • Dummy driver. Acts as a fallback and does absolutely nothing.
  • Driver for communicating with MPD.
  • 3rd party library for communicating with MPD.
  • Driver for communicating with XMMS using the PyXMMS library.
  • Driver for communicating with XMMS2 using XMMS2's python library.
  • Third party library that allows for communicating with XMMS, Beep and (old) Audacious using ctypes.
  • Drivers for communicating with XMMS, Beep and (old) Audacious using the 3rd party xmmsalike library.
Last modified 14 years ago Last modified on 01/08/09 11:17:57
Note: See TracWiki for help on using the wiki.