Dear lazyweb,
What is the easiest way to create a bookmarks structure with folders/subfolder feature?
Currently Vinagre’s bookmarks don’t support this, and is implemented through an .ini-like file (GKeyFile).
Am I supposed to create and deal with a xml file by myself? Or is there any solution for this somewhere already implemented?
Thank you!
English
Portuguese
9 comments ↓
I’m not sure what your particular application is, but perhaps XBEL might be a good format to use?
Hi, Kurt. Yes, it could be. But I’m asking for an already implemented solution. For instance, GLib has GBookmarkFile API, but it doesn’t support folders hierarchy :(.
[...] http://www.bani.com.br/2008/03/20/bookmarks-with-folders/ asks Hoosgot, [...]
Hi,
You could use a structure like the freedesktop menus specfication, where you have:
- a .menu xml file which describes which .desktop files go into which categories (you can have overlap).
- .directory key-files which describe a category
- .desktop key-file describing the item.
A simpler approach, using the same idea is:
Each bookmark file (which is a key-file), has a ‘Category’ key, which is a csv of categories/folders. The folders themselves can be defined by a .directory key-file, where it’s category could be Root, or another directory name (for sub-sub-folders).
Okay, so it sounds OTT, but it won’t be hard _that_ hard to implement ;-).
/usr/share/applications
/usr/share/desktop-directories
/etc/xdg/menus
will provide some examples.
- Neil
Why use XML at all? Try yaml, it is sooo much easier. Here is a brief example
—
Planets:
- name: planet gnome
descrip: awesome blog site
url: http://planet.gnome.org
- name: planet freedesktop
descrip: cross desktop magical fairydust
url: http://planet.freedesktop.org
News:
- name: OSNews
descrip: not just operating systems
url: http://www.osnews.com
- name: CNN
descrip: damned lies
url: http://www.cnn.com
…
Sorry, no answer about a particular implementation, but why using folders ?
for example, Epiphany uses tags for its bookmarks, which is way superior to hierarchical organisation in my opinion.
Just my 2 cents…
I’m sorry to don’t really answer to your question but I’d just say I share bochecha’s point of view.
After it really depends on what you want to do, so…
Good luck
David
Tags are annoying. There is no way (I’ve found) to have subfolders of folders in epiphany. With 3000+ bookmarks this is annoying
@Jeff: that’s because Epiphany doesn’t have folders, but tags.
However an intelligent algorithm will create submenu divisions in the Bookmarks menu based on matching topics…
Leave a Comment