I wrote this script to convert kde3 links into .menu files for
enlightenment. It might work for kde2 or kde1 links as well. I expanded
it to have a recursive function so that it could be used to re-create the
menu structure of the k-menu as .menu files also. It's not my best piece of
work, but it was useful enough that I thought it might be worth sending in
To use it:
1. chdir to the directory you want to scan and/or traverse for kde-links.
2. Execute the script like this:
kde2menu "Menu Name" "path/file" [-r]
*. The order of the arguments -is- important. The path/file is the path
to save your .menu file to. If it does not end with .menu, it will
automatically be appended to any files it generates.
The "Menu Name" is entered into the file as the first line.
any files matching the criteria for a "Desktop Entry" are grep'd for an
Exec= line, and if one is found, the Name= (or filename minus the .desktop
extension if Name= is blank) a line is added to the file for that command.
If used recursively, whenever a directory is encountered the command calls
itself with the "Menu Name" equal to the name of the directory and the
path/file equal to the path/file name it was called with plus and
underscore and the directory name. A line for that menu is also added to
the current menu file.
Please don't add me to any mailing lists or anything, but feel free to
reply with any questions/comments you may have. Feel free to do anything
you please with the file I'm sending. Keep up the good work.
- Bob Shaffer ][ -
- rrs@... -
- (330) 672-8113 -
Get latest updates about Open Source Projects, Conferences and News.