From acc17b06535cc4d1ae53484f02660275d37ad790 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Mon, 15 Jun 2009 08:41:32 +0000 Subject: [PATCH] Add groups.xml parser --- pisi/group.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pisi/group.py diff --git a/pisi/group.py b/pisi/group.py new file mode 100644 index 00000000..e8b07547 --- /dev/null +++ b/pisi/group.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2009, TUBITAK/UEKAE +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# Please read the COPYING file. +# + +import gettext +__trans = gettext.translation('pisi', fallback=True) +_ = __trans.ugettext + +import pisi +import pisi.pxml.xmlfile as xmlfile +import pisi.pxml.autoxml as autoxml + +class Error(pisi.Error): + pass + +__metaclass__ = autoxml.autoxml + +class Group: + "representation for group declarations" + + __metaclass__ = autoxml.autoxml + + t_Name = [autoxml.String, autoxml.mandatory] + t_LocalName = [autoxml.LocalText, autoxml.mandatory] + t_Icon = [ autoxml.String, autoxml.optional] + +class Groups(xmlfile.XmlFile): + "representation for component declarations" + + __metaclass__ = autoxml.autoxml + + tag = "PISI" + + t_Groups = [ [Group], autoxml.optional, "Groups/Group" ]