Gentoo Archives: gentoo-user

From: Moshe Kaminsky <kaminsky@××××××××××××.il>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: why gentoo doesn't have long description?
Date: Wed, 24 Aug 2005 20:38:20
Message-Id: 20050824202307.GA8760@kaminsky
In Reply to: Re: [gentoo-user] why gentoo doesn't have long description? by Fernando Canizo
1 * Fernando Canizo <conan@××××××××××.ar> [24/08/05 14:07]:
2 >
3 > El 24/ago/2005 a las 04:01 -0300, Jonas me decía:
4 > > >Second, the whole idea is to do this for non-connected systems. Meaning, a
5 > > >solution not involving the Internet... =)
6 > > If you're refering to the fact that the person doesn't have an internet
7 > > connection when he wants to view this information throught the emerge
8 > > interface, then you're wrong. When you want to install or you're just
9 > > searching for a package you're using the emerge interface , when you
10 > > need more info you have to 1) open your browser 2) type in the url (if
11 > > you're lucky you know the url or it's in your browsers cache) 3) search
12 > > for the package on the website , while instead you could just do
13 > > something like emerge --desc package. Now what's quicker and makes more
14 > > sence ?
15 >
16 > Exactly! That's what i'm refering to. It's not an issues of connection it's an
17 > issue of lazyness! It's like: "-- hey what are you doing this weekend? -- don't
18 > know, it's cold and raining, i think i'm gonna sit in my throne and check what's
19 > new on 'app-vim' to improve my vimyness, if find something interesting i'll
20 > check the package webpage."
21 >
22 > For now i'm using 'questo':
23 > === script ====
24 > #!/bin/bash
25 > # lun may 2 20:57:24 ART 2005
26 > # conan - GPLed
27 > #
28 > # script to check for apps on rainy sunday morning
29 >
30 > BASE_DIR="/usr/portage/"
31 >
32 > [ $# -ne 1 ] && echo "Uso: questo <category>" && exit 0
33 >
34 > cd $BASE_DIR$1
35 > for package in * ; do
36 > eix "^$paquete\$"
37 > echo "Looking for: $1/$paquete. ENTER to continue..."
38 > read
39 > done
40 > === end script ====
41 >
42 > Now i took sugestion from Ciaran to look in metadata.xml, i check a couple by
43 > hand and see the 'longdesc' field but... with short descriptions! Now maybe i
44 > just choose two with bad luck, but i got a feeling that gentoo maintainers
45 > doesn't like to provide longdesc, although there is the posibility.
46 >
47 > I was thinking of doing a little script that gives longdesc found in metadata to
48 > confirm this, but since i don't know nothing about xml, think it gonna take a
49 > little bit more that if there were already an application to check
50 > 'metadata.xml'
51
52 If you have the XML::Simple perl module (which can be emerged as
53 XML-Simple), you can do
54
55 perl -MXML::Simple -le 'print XMLin(shift)->{"longdescription"}' <file>
56
57 where <file> is the metadata.xml file.
58
59 However, it appears that this field is not widely supported. Instead,
60 you might use something like
61
62 lynx -dump -nolist `esearch -o %h <package>`
63
64 to dump the homepage of the package as text (of course, you still need
65 to be online for that)
66
67 Moshe
68
69 PS. Sorry if this actually seems on-topic :)