Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added doc file containing lot of useful things

  • Loading branch information...
commit 646bc29dee74ecf9afee29738a167c8bc9b898cd 1 parent bebcb84
Fabiano Francesconi authored
Showing with 50 additions and 3 deletions.
  1. +24 −0 doc
  2. +23 −0 libs/utils.py
  3. +3 −3 unmaskit
24 doc
View
@@ -0,0 +1,24 @@
+Link interessanti
+
+# gui per portage [può contenere spunti interessanti come get_dep_ebuild]
+http://porthole.svn.sourceforge.net/viewvc/porthole/trunk/porthole/backends/portagelib.py?revision=1191&view=markup
+
+# api ufficiali
+http://dev.gentoo.org/~zmedico/portage/doc/api/portage.dbapi.porttree.portdbapi-class.html
+
+# Funzione per controllare se un dato nome è un valido atom
+
+# Questa funzione non ritorna altro che vero o falso se la stringa passata
+# è un atom valido: non controlla l'esistenza di tale pacchetto.
+>>> import portage
+>>> portage.isvalidatom("=app-qualcosa/foo-0.21-r1", False)
+True
+
+# Funzione per controllare se una data stringa è un ebuild ed esiste
+# all'interno di portage (overlay inclusi)
+>>> PORTDB = portage.db[portage.root]["porttree"].dbapi
+oppure
+>>> PORTDB = portage.portdb
+>>> print PORTDB.cpv_exists("sci-calculators/galculator-1.3.4")
+1
+
23 libs/utils.py
View
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# This file is part of unmaskit
+
+# Copyright (c) 2010 - Fabiano Francesconi
+# encomiabile.it (c) 2010 - www.encomiabile.it
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+def does_package_exist(pname):
+
6 unmaskit
View
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# This file is part of pyhtml2bbcode
+# This file is part of unmaskit
-# Copyright (c) 2009-2010 - Fabiano Francesconi, Walter Da Col
-# encomiabile.it (c) 2009-2010 - www.encomiabile.it
+# Copyright (c) 2010 - Fabiano Francesconi
+# encomiabile.it (c) 2010 - www.encomiabile.it
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
Please sign in to comment.
Something went wrong with that request. Please try again.