Menu categories request for help
November 13, 2012 —
BarryK
I am looking for someone who is not a developer but has experience using a wide range of Linux applications.
Over the last couple of days I have improved the speed of updating the Ubuntu/Debian package databases, see blog posts:
http://bkhome.org/archive/blog2/201211/very-fast-deb-db-to-pup-db.html
http://bkhome.org/archive/blog2/201211/fast-conversion-deb-to-pup-db.html
The script '0setup' also creates an updated 'PKGS_HOMEPAGES' file, which lists project homepages, for example, some lines from the file:
abinit http://www.abinit.org/
abiword http://www.abisource.com/
abook http://abook.sourceforge.net/
aboot http://sourceforge.net/projects/aboot/
abootimg http://gitorious.org/ac100/abootimg
abr2gbr http://www.sunnyspot.org/gimp/tools.html
abraca http://abraca.xmms.se/
Woof now has a file, which will be /usr/local/petget/categories.dat in a running Puppy, which relates package-names to categories.
The new 'debdb2pupdb' utility, called from the PPM, reads 'categories.dat' to help it determine the appropriate category.
The "category" is where-abouts an application will appear in the menu. Although, there will only be an actual menu entry if the package contains a .desktop file. In other words, "category" is where it would appear in the menu if it had a menu entry.
Category also determines where a package is listed in the PPM. It also determines a thumbnail icon in the PPM window.
When Woof converts an Ubuntu/Debian package db to Puppy-format, the 'categories.dat' is looked at, failing that there is a search through keywords of the description. The Ubuntu/Debian db also has a 'Section' field that may help.
What we really need to do is greatly expand the content of 'categories.dat'. Here is an extract of entries for the "Graphic" category:
CONST PKG_CAT_Graphic_Sub$=" autoq3d autotrace blender xv "
CONST PKG_CAT_Graphic_paint$=" gimp gimp-help mtpaint xpaint "
CONST PKG_CAT_Graphic_draw$=" inkscape inkscapelite inkview varicad xfig "
CONST PKG_CAT_Graphic_flow$=" dia dia-gnomeless "
CONST PKG_CAT_Graphic_viewer$=" eog flphoto fotoxx gimageview gpicview gqview gview "
CONST PKG_CAT_Graphic_camera$=" gphoto2 gtkam "
CONST PKG_CAT_Graphic_scanner$=" peasyscan xsane "
CONST PKG_CAT_Graphic_print$=" peasyprint "
CONST PKG_CAT_Graphic_utility$=" gcolor2 grabc scale2x "
This is the layout in the JWM window manager menu 'Graphic' entry. The variable 'PKG_CAT_Graphic_Sub$' is the generic 'Graphic' category, and displays at the top. The variables below display with horizontal separator bars -- click the menu to see this.
A package is only put into the top generic variable if it cannot be made to fit into one of the more-specific lower ones. For example, a scanner application would go into 'PKG_CAT_Graphic_scanner$'.
Now, here is the challenge: PKGS_HOMEPAGES now has 16,919 packages, and it would be great if many of them can be entered into categories.dat.
This will then make it 100% certain that when one of those packages is listed in the PPM it shows up in the appropriate category, and when installed it will be in exactly the right place in the menu (if it has a .desktop file).
It is also very helpful if a package is listed in the most appropriate category in the PPM.
We don't have to put all of those 16,919 packages into categories.dat, we should probably just focus on those that people are likely to want to install. Also probably focus on those packages that will have a menu entry.
Here are links to the two files. If anyone wants to contribute, PKGS_HOMEPAGES has links to homepages, so the applications can be examined to determine their appropriate category.
Files (4KB, 200KB):
http://puppylinux.com/test/categories.dat.gz
http://puppylinux.com/test/PKGS_HOMEPAGES.gz
More packages can be inserted into 'categories.dat', please keep them in alphabetic order on each line, to ease manual searching.
If you are interested, let me know! I will start a Forum thread.
Comments
Categories Forum threadUsername: BarryK
I started a thread on the Forum: http://murga-linux.com/puppy/viewtopic.php?t=82186
Cutdown package list
Username: BarryK
"Forum member L18L analysed PKGS_HOMEPAGES and found only those packages that have a .desktop file. This is a much smaller list, 2078 packages, down from about 16000. I have uploaded this smaller homepages file, for anyone who is interested: http://puppylinux.com/test/PKGS_HOMEPAGES-desktop.gz
Tags: woof