[Debtags-devel] Using tags to create menu hierarchy

Enrico Zini enrico at enricozini.org
Wed Nov 16 16:12:06 UTC 2005


On Wed, Nov 16, 2005 at 03:49:21PM +0100, Tim Dijkstra wrote:

> I really hate (well that's a bit strong;) the standard menu layout in
> debian. Under gnome for instance one has the standard gnome menu plus an
> additional debian menu which has everything. A lot of the folders are
> nearly empty, which doesn't help searching. Putting on hints helps a
> bit, but this has the drawback of getting very weird folders or
> inconsistently placed apps.
> Now I was wondering if somebody had already thought about using tags to
> organize the menu tree. And do you, all being much more accustomed with
> tags then I am, think it's feasible?

<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>

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.  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

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 don't know how useful it would be, but maybe you can try playing with
this and seeing if it leads somewhere.


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debtags-devel/attachments/20051116/97cd8f77/attachment.pgp


More information about the Debtags-devel mailing list