Wednesday, December 30, 2009

Dublin Core in HTML and new releases

OK, so Sigil 0.1.7 was released a couple of days ago. It’s a bugfix release for the 0.1.x branch while work on 0.2.0 is underway… and then 0.1.8 was released about an hour ago.

It seems that lately I can’t make a release without breaking something. This time it was (ironically) a fix for issue #139 that was the problem: CSS was being jumbled up into one line. Everything still worked, but if you are importing an epub book with hand-coded CSS, you want it to stay human-readable. This fix has been removed and will be looked at after the redesign.

Normally I’d release a “b” version, but this was major enough to warrant a whole new release treatment with a notification update pushed to everyone using 0.1.7.

But onto lighter topics… what did 0.1.7 bring? Mostly fixes, as I’ve said. View switching used to be less than reliable and could occasionally cause Sigil to crash. This was caused by differences in what WebKit thinks is a node, and what Qt’s QDom implementation thinks is one. Apparently they can’t agree whether continuous whitespace is just one text node or several, even after you tell both of them to normalize the tree. Or what is a child node, and whose child is it anyway. Plus a few other disagreements.

The net effect was that Sigil would crash if the tree-descending instructions it created from WebKit’s DOM couldn’t be executed upon the QDom DOM. This should be remedied now. If Sigil can’t quite figure out where it needs to scroll the View, it will scroll to the place before the ambiguity begins. In other words, as close as it can get. Still, this is only needed in rare cases.

The other important fixes are the line ending issue and the encoding detection improvements I talked about in previous posts. For a complete list of what was fixed, refer to the changelog.

But there was also one new feature: Sigil now imports HTML metadata if that metadata conforms to the Dublin Core standard. It’s been requested, and Kevin Hendricks kindly provided the code that implements this.

An interesting discussion on what is currently supported and what can still be added has started on MobileRead. Anyone interested in this feature should check out that thread to see examples of how you can use this new functionality, and if you happen to have any ideas for its improvement, we’d all love to hear them.