James,
We should have coordinated this a bit better...
I've got a python version of install-menu working quite nicely now. I
did not change the syntax of the /usr/lib/menu files, (which will save
us a lot of headaches). The custom parser was not too hard.
I did, however, change the syntax of the /etc/menu-methods scripts, (I
actually found the description of the secret script language and it's
pretty nasty). The new syntax is real python code. This will introduce
only very minor headaches as we'll have to port the script for each
window manager, (I've got blackbox and foal working already).
I've just got one or two buglets left and hope to release a complete
menu system for Familiar this weekend.
-Carl
PS. My python install-menu and /bin/sh update-menus total up to about
6kB which is a bit easier to swallow than the 300kB for the Debian
counterparts. ;-)
--
Carl Worth
USC Information Sciences Institute cworth_at_east.isi.edu
4350 N. Fairfax Dr. #770, Arlington VA 22203 703-812-3725
James ''Wez'' Weatherall writes:
> I've been trying to write a Debian-menu reader in Python. I'm falling foul
> of the evil syntax of the menu definitions. The seem to be treated as
> little scripts in some secret script language that I can't find details of.
> Admittedly, I haven't spent too long looking...
>
> Anyway, do we really want to use their format, or could we instead use a
> more portable Python script format? How much support do we want for
> machines without Python installed in this? It just seems crazy to go
> reimplementing wheel.py... ;)
>
> I'd suggest a simple conversion like:
> ?package(foal):needs=x11,command=foal.py,...
> becoming:
> if have_package("foal"): Item(needs="x11",command="foal.py",...)
>
> The second would be python exec'd and would create a menu Item with the
> relevant properties.
>
> If people prefer the normal format then someone really will have to
> implement the install-menu program. :(
>
> ---
> James "Wez" Weatherall
> "The path to enlightenment is /usr/bin/enlightenment"
> Laboratory for Communications Engineering, Cambridge - Tel : 766513
> AT&T Labs Cambridge, UK - Tel : 343000
>
>
> _______________________________________________
> Familiar mailing list
> Familiar_at_handhelds.org
> http://handhelds.org/mailman/listinfo/familiar
> irc://irc.openprojects.net #familiar
>
Received on Thu Jun 21 2001 - 11:15:54 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:27 EDT