# PyXDG PyXDG is a python library to access freedesktop.org standards. Currently supported are: * Base Directory Specification Version 0.6 * Menu Specification Version 1.0 * Desktop Entry Specification Version 1.0 * Icon Theme Specification Version 0.8 * Recent File Spec 0.2 * Shared-MIME-Database Specification 0.13 [[Documentation on ReadTheDocs|http://pyxdg.readthedocs.org/en/latest/index.html]] ## Development Development takes place in [[a git repository|http://cgit.freedesktop.org/xdg/pyxdg/]], with a [[Github mirror|https://github.com/takluyver/pyxdg]]. Freedesktop.org hosts the [[bug tracker|https://bugs.freedesktop.org/buglist.cgi?product=PyXDG&component=PyXDG&resolution=---&list_id=97030]]. [![Build Status](https://travis-ci.org/takluyver/pyxdg.png?branch=master)](https://travis-ci.org/takluyver/pyxdg) ## Download * [[pyxdg-0.25.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.25.tar.gz]] ([[pgp|http://people.freedesktop.org/~takluyver/pyxdg-0.25.tar.gz.asc]]; December 2012) * Add support for $XDG_RUNTIME_DIR, Debian bug #656338. * Allow desktop entry files that are not encoded in UTF-8, Debian bug #693855. * Mime: Add support for subclasses and aliases. * [[pyxdg-0.24.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.24.tar.gz]] ([[pgp|http://people.freedesktop.org/~takluyver/pyxdg-0.24.tar.gz.asc]]; October 2012) * Update allowed DesktopEntry categories following changes to the specification. * Fix removal of empty submenu, freedesktop bug #54747. * Documentation is now available on RTD: [[http://pyxdg.readthedocs.org/|http://pyxdg.readthedocs.org/]] * A few more tests, and some code cleanup. * Fix failure to parse some menu files when kde-config is missing, freedesktop bug #56426. * [[pyxdg-0.23.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.23.tar.gz]] ([[pgp|http://people.freedesktop.org/~takluyver/pyxdg-0.23.tar.gz.asc]]; July 2012) * Fix a test for non-UTF-8 locales. * [[pyxdg-0.22.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.22.tar.gz]] ([[pgp|http://people.freedesktop.org/~takluyver/pyxdg-0.22.tar.gz.asc]]; July 2012) * Better unicode handling in several modules. * Fix for sorting non-ASCII menu entries, [[freedesktop bug #52492|https://bugs.freedesktop.org/show_bug.cgi?id=52492]]. * More tests. * [[pyxdg-0.21.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.21.tar.gz]] ([[pgp|http://people.freedesktop.org/~takluyver/pyxdg-0.21.tar.gz.asc]]; July 2012) * Tests can now be run conveniently using nosetests, and cover more of the code. * BaseDirectory: New `save_cache_path()` function, [[freedesktop bug #26458|https://bugs.freedesktop.org/show_bug.cgi?id=26458]]. * Config: Default icon theme is 'hicolor', not 'highcolor', [[freedesktop bug #29294|https://bugs.freedesktop.org/show_bug.cgi?id=29294]]. * Menu: Obsolete `Rule.compile()` method removed. * DesktopEntry: Corrected spelling of `checkCategories()` method, [[freedesktop bug #24974|https://bugs.freedesktop.org/show_bug.cgi?id=24974]]. * DesktopEntry: Consider `Actions` and `Keywords` keys standard. * DesktopEntry: Accept non-ASCII Keywords. * DesktopEntry: Update list of environments valid for `OnlyShowIn`. * Mime: Fix `get_type_by_contents()` in Python 3. * RecentFiles: Minor bug fixes. * [[pyxdg-0.20.tar.gz|http://people.freedesktop.org/~takluyver/pyxdg-0.20.tar.gz]] (June 2012) * Compatible with Python 3; requires Python 2.6 or later * Clean up accidental GPL license notice in Menu.py * Add test scripts for xdg.Mime, xdg.Locale and xdg.RecentFiles * Fixes for icon theme validation * Fix exception in xdg.Mime * Replace invalid string exceptions * Fall back to default base directories if $XDG* environment variables are set but empty. * Remove use of deprecated os.popen3 in Menu.py * Correct URLs in README * [[pyxdg-0.19.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.19.tar.gz]] * `IniFile.py`: add support for trusted desktop files (thanks to karl mikaelsson) * `DesktopEntry.py`: Support spec version 1.0, Debian bug #563660 * `MimeType.py`: Fix parsing of in memory data, Debian bug #563718 * `DesktopEntry.py`: Fix constructor, Debian bug #551297, #562951, #562952 * [[pyxdg-0.18.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.18.tar.gz]] * `DesktopEntry.py`: Add getMimeTypes() method, correctly returning strings * `DesktopEntry.py`: Deprecated getMimeType() returning list of regex (AdamB) * `Menu.py`: Add support for XDG_MENU_PREFIX (Piotr Lewandowski) * `Mime.py`: Add get_type_by_contents() (Tony Houghton) * [[pyxdg-0.17.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.17.tar.gz]] * Bugfixes around * [[pyxdg-0.16.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.16.tar.gz]] * Bugfixes around * [[pyxdg-0.15.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.15.tar.gz]] * `Menu.py`: Bugfixes, support for `TryExec` * `MenuEditor.py`: Bugfixes, pretty output for applications.menu * `IconTheme.py`: Performance improvements, Bugfixes * [[pyxdg-0.14.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.14.tar.gz]] * `Menu.py`, `MenuEditor.py`: Bugfixes * [[pyxdg-0.13.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.13.tar.gz]] * `Menu.py`, `MenuEditor.py`: Bugfixes... * `Config.py`: Add root_mode * [[pyxdg-0.12.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.12.tar.gz]] * `MenuEditor.py`: New in this release, use to edit Menus * `Menu.py`, `IniFile.py`, `DesktopEntry.py`: Lot of bugfixing... * `BaseDirectory.py`: Add xdg_cache_home * `IconTheme.py`, `Config.py`: More caching stuff, make cachetime configurable * thx to Travis Watkins <[[alleykat@gmail.com|mailto:alleykat@gmail.com]]> and Matt Kynaston <[[mattkyn@gmail.com|mailto:mattkyn@gmail.com]]> for their help * [[pyxdg-0.11.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.11.tar.gz]] * `Config.py`: Module to configure Basic Settings, currently available: * Locale, `IconTheme`, `IconSize`, `WindowManager` * `Locale.py`: Internal Module to support Locales * `Mime.py`: Implementation of the Mime Specification * `Menu.py`: Now supports `LegacyDirs` * `RecentFiles.py`:Implementation of the Recent Files Specification * A lot of bugfixes, thx to Travis Watkins <[[alleykat@gmail.com|mailto:alleykat@gmail.com]]> * [[pyxdg-0.10.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.10.tar.gz]] * various bugfixes * validate against menu-spec-1.0.draft-1 * [[pyxdg-0.9.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.9.tar.gz]] * various bugfixes * various performance improvements * validate against menu-spec-0.91 * thx to Matt Kynaston <[[mattkyn@gmail.com|mailto:mattkyn@gmail.com]]> for some suggestions * [[pyxdg-0.8.tar.gz|http://www.freedesktop.org/~lanius/pyxdg-0.8.tar.gz]] * `xdg/IconTheme.py` (getIconPath): The "hicolor" theme has to be used as the fallback. * `xdg/IniFile.py` (IniFile.getList): Fixed bug in splitting up strings. * Don't read .desktop-* files, only .desktop * Add . to the literal `FileExtensions` so that the checks work. * thx to * Martin Grimme ([[martin@pycage.de|mailto:martin@pycage.de]]) * Ross Burton ([[ross@burtonini.com|mailto:ross@burtonini.com]]) * pyxdg-0.7.tar.gz * add 'import codecs' to `IniFile`, needed by write support * Fix parsing of lists with only one entry * pyxdg-0.6.tar.gz * Performance Improvements * pyxdg-0.5.tar.gz * License change to LGPL * Support for write operations in `IniFile` * Support for menu-spec-0.7 * Validates `OnlyShowIn` and Categories * Performance improvements (e.g. 5 times faster in menu parsing) * A lot of bugfixes (e.g. `IconTheme` parsing) * Python 2.3 support * pyxdg-0.4.tar.gz * Bugfix release * pyxdg-0.3.tar.gz * Basedir Spec updated to version 0.6 * First part of separating Desktop Entry backend in `IniFile` * added getPath(...) function to `Menu.py` * Complete Icon Theme Spec implementation, including cache and validation * pyxdg-0.2.tar.gz * Rewrite of Menu Spec code * Use Basedir Spec code from ROX * pyxdg-0.1.tar.gz * Initial release.