Bookmarks with folders

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!

9 comments ↓

#1 Kurt McKee on 03.20.08 at 10:18

I’m not sure what your particular application is, but perhaps XBEL might be a good format to use?

#2 Jonh Wendell on 03.20.08 at 10:28

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

#3 Bookmarks with folders on 03.20.08 at 10:52

[...] http://www.bani.com.br/2008/03/20/bookmarks-with-folders/ asks Hoosgot, [...]

#4 Neil J. Patel on 03.20.08 at 11:42

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

#5 Jeff Schroeder on 03.20.08 at 11:47

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

#6 bochecha on 03.20.08 at 18:07

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…

#7 David Dallet on 03.20.08 at 18:30

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

#8 Jeff Schroeder on 03.21.08 at 11:55

Tags are annoying. There is no way (I’ve found) to have subfolders of folders in epiphany. With 3000+ bookmarks this is annoying

#9 ReinoutS on 03.21.08 at 12:45

@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