This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Spoon

NOTE: This page has now been superseded by Rarian. It has been left here for historical value.

What is it

Spoon is an experiment first and foremost. It's an experiment to see if we can kill Scrollkeeper, without causing huge amounts of pain to everyone involved.

In other words, Spoon is a replacement for Scrollkeeper, that might someday, in some form, be used within GNOME to find help documentation.

What's wrong with scrollkeeper

Taken from the ProjectMallard wiki page Scrollkeeper is the current document registration system for GNOME and Yelp. It tells yelp where to look for your documents. It has a few problems.

Structure of Spoon

1. Libspoon

The basis of Spoon is the library, libspoon. This (for now) consists of 2 calls: a for_each and a shutdown

2. Utilities

The package also contains several utilities that are useful

Comparison with Scrollkeeper

As mentioned above, scrollkeeper has a few difficulties. This section examines these difficulties and shows how Spoon handles them

Use Case

1. Developers

This section describes a typical use case for libspoon: how a document would be installed and how yelp (or another help browser) would access it. Here, the fictional package "Foo" and is used.

The developer of Foo (Mark) has previous documentation in docbook format that is viewed in yelp. He hasn't converted it to gnome-doc-utils yet (bad man. No cookie for you). Instead, in his "help" Makefile, he copies 4 omf's (foo-{C,es,de,ru}.omf to the directory /usr/share/omf/foo/ and runs scrollkeeper-update. This is the traditional scrollkeeper-y way of installing scrollkeeper files.

On the devel announce list, he notices that from now on, yelp will be using libspoon to access documentation metadata. In the short term, he doesn't need to do anything: Spoon at install time will take care of moving currently installed omf's to their new format. Any new versions will still support the old scrollkeeper-update method of installation (with the installed omf's being translated to new spoon files within the scrollkeeper-update program).

In the longer term, he decides to update his documentation and move to the new-fangled Spoon scrolls. He writes a spoon scroll file (foo.document) and removes the old omf files. The Makefile is then changed to only copy this new spoon scroll to the <prefix>/share/spoon directory, overwriting any previous foo.document file. That's all that's needed. Done.

Another package, Baz, is also maintained by Mark. This one has already been converted to gnome-doc-utils (okay, you can have you're cookie back). When Mark is updating Foo, he decides to move Baz over to spoon registration as well, seeing as how easy it is. This time, there is no mucking about with Makefiles. As gnome-doc-utils is already altered to cope with both scrollkeeper and spoon, he just removes the omf.in file and adds a baz.document file in its place. That's it.

2. Users

A user, Mary, uses Foo. Her distro has a Foo package installed in /usr. It has already been translated to use spoon for its help registration (Good distro. Have a cookie). She wants to install the latest and greatest Foo, complete with its new spoon-ised help, in her home directory. She does the ./configure --prefix=/home/mary && make && make install dance and the package is installed. In yelp now though, the manual for Foo has changed to show the updated help. Spoon has found a new version of foo.document in $XDG_DATA_HOME/help and is now using that. As other people on her system are still using the older Foo package, they won't see this new help, instead getting the older manual.

Current Status

Spoon has now reached 0.4. This has redone the library to mimic the Help Spec (proposed here). It also added the spoon-sk-update utility.

V0.3 allows installation, using a configure-time option. This defaults to OFF (i.e. --enable-installed MUST be specified in order to work properly). There are a load of instructions and such in the enclosed README file (though its pretty messy).

For those brave souls eager to try it out, the latest release can be found here. Instructions are included in the README. Please read them. I'm not taking responsibility if it deletes all your omf files, or anything else on you're computer ;) .

More details can be found in the emails: Spoon 0.1 release announcement , Spoon 0.2 release announcement and Spoon 0.4 release announcement

Before progressing any further with this, I'd really like some feedback from people about the structure of the library, the scroll file format and anything else. Without any feedback, I get the feeling this'll turn into another scrollkeeper style arrangement, where the idea is good, but the implementation sucks. Since this is based on a draft help system spec, please comment on that. The future now lays in trying to get yelp to use spoon internally. Then, getting jhbuild to run fully with Spoon, getting all docs showing up as before. Then and only then, could Spoon be considered for addition to GNOME. I'm hoping to get these 2 ideas done before 2.20 and get Spoon into that.

0.1. Comments

MikkelKamstrup: Firstly, I totally support your efforts. Scrollkeeper has always struck me as stoneage technology. Now for the constrcutive critisism: In the Libspoon section you write that spoon goes through all registered documents during initialization, but in Comparison With Scrollkeeper you write that spoon needs no registration... Which one is it? I'm not sure I totally grok how libspoon works - perhaps you can outline a use case describing a concrete example using libspoon.

EmmanueleBassi: thanks for tackling this stuff: SK has become a pain for everyone to use. with regards to the libspoon API: why are the init/finalize calls even necessary? there has been an interesting thread on dbus-list about the initialization functions, and I kind of agree with the position expressed by Havoc here and here: if libspoon_init() is really needed before calling libspoon_foo(), then it should be implicitly called by any of the functions inside libspoon API and cache its data so that any subsequent call is a no-op. if you really care about releasing memory as soon as possible, a libspoon_shutdown() might be provided (this might be an issue with dynamically loaded modules using libspool, by the way).


2024-10-23 10:58