[Debtags-devel] Using tags to create menu hierarchy
Tim Dijkstra
newsuser at famdijkstra.org
Wed Nov 16 19:16:27 UTC 2005
On Wed, 16 Nov 2005 17:12:06 +0100
Enrico Zini <enrico at enricozini.org> wrote:
> <rant>
> Heck, I do agree with you. I even tried mentioning the idea on the
> freedesktop mailing list, but noone cared about it:
>
> http://lists.freedesktop.org/archives/xdg/2004-February/003352.html
>
> Appearently, they have this wonderful menu reorganization and merging
> algorithm which doesn't seem to be working with the Debian menu.
> </rant>
I looked a bit in their archive, but apart from the statement that Math
is (not) a Science, I don't see a lot of usefull remarks on that list :)
> The problem with using the tags as they are now, is that not
> necessarily the tags of a package can be precisely applied to the
> binaries inside it.
Hmm, yes. But I guess most packages that ship menu files will not have
to much binaries inside...
> However, this wouldn't mean they aren't useful.
> If you can get a list of all executable files launched by the menu
> entries, you can "easily" get a list of their tags:
>
> #!/bin/sh
> for FILE in "$@"
> do
> PKG=$(dlocate $FILE | grep "$FILE\$" | cut -f1 -d:)
> TAGS=$(debtags tag ls $PKG | perl -e 'while (<>) { chop; push
> @a, $_ } print join(", ", @a)') echo "$FILE: $TAGS"
> done
We don't need the dlocate, the files in /usr/lib/menu have a field for
the package name.
> You can take this script, give it as arguments the list of executables
> you find in the mens and save the output into a file. This file you
> can then use it to experiment with tagcoll:
>
> tagcoll hiearchy yourfile
I'll play around with it a bit.
grts Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debtags-devel/attachments/20051116/00fbf2e8/attachment.pgp
More information about the Debtags-devel
mailing list