View previous topic :: View next topic |
Author |
Message |
hpaluch1 n00b

Joined: 05 Mar 2005 Posts: 4
|
Posted: Sat Mar 05, 2005 7:10 pm Post subject: Simple script to list packages with description |
|
|
Hi folks!
Recently I have an idea to create simple list of all portages in /usr/portage along with one line description, but didn't find command to do this. So after little analysis of /usr/bin/emerge I had written this tiny python script:
Code: |
#
# portage_list.py
# show 1line descriptions of all portage packages
# Note: you must be in portage group (or root)!
import portage
for x in portage.db["/"]["porttree"].getallnodes():
e_build = portage.portdb.xmatch("bestmatch-visible",x)
descr = "*** None"
if len(e_build) > 0: # sometimes no unmasked ebuild available!
descr = portage.portdb.aux_get(e_build,["DESCRIPTION"])[0]
print "%-20s - %s" % ( x, descr )
|
It will produce output like this:
Code: |
app-accessibility/gok - Gnome Onscreen Keyboard
app-accessibility/epos - language independent text-to-speech system
app-accessibility/yasr - general-purpose console screen reader
app-accessibility/gnome-mag - Gnome magnification service definition
app-accessibility/flite - Flite text to speech engine
app-accessibility/festival-gaim - A plugin for gaim which enables text-to-speech
...
|
That simple old plain text list can be handy for browsing with less, etc. Maybe someone find it useful
Best regards _________________ --Henryk Paluch |
|
Back to top |
|
 |
G2k l33t


Joined: 06 Mar 2004 Posts: 672 Location: Rome, Italy
|
Posted: Thu Dec 29, 2005 3:09 pm Post subject: |
|
|
nice idea this should be included in portage's -v option. _________________ Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 18157
|
Posted: Thu Dec 29, 2005 8:34 pm Post subject: |
|
|
See also app-portage/esearch _________________ Those who know what's best for us must rise and save us from ourselves. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|