Atom Publishing Protocol
To allow any developer to interact with its publishing workflow, Feedbooks is releasing a new API based on the Atom Publishing Protocol standard. Based on the principles of a REST architecture, AtomPub is used by companies such as Google (GData), Microsoft (Live Framework) or Automattic (Wordpress) as a standard way to manipulate resources.
Implementation on Feedbooks
Currently, the AtomPub service on Feedbooks is strictly compliant with the standard, but to improve several things, it’ll be extended through Atom’s standard extension model in the near future:
- Support for hierarchies will be added, probably using the following draft proposal.
- Currently, for each item, we create a section in the book. We’ll extend AtomPub to specify if the item is a part, a chapter, a section or a simple text flow.
- We don’t sort the order of the items in our feeds based on the last update, but based on the order of the items in the book. We’ll add this information in our items, and enable the possibility to re-order elements through AtomPub.
Service document
Our service document can be automatically discovered in any of our webpages through the link element with service as a value for its rel property.
To avoid long service documents, we use standard Atom pagination.
Collections/Items
A book can have several megabytes of text, and for this reason we don’t list the full content of each item in a collection but rely on GET requests on the item as recommended in the specs:
Clients MUST NOT assume that an Atom Entry returned in the Feed is a full representation of an Entry Resource and SHOULD perform a GET on the URI of the Member Entry before editing it.
What it means for publishing on Feedbooks
The main goal for this first release is to provide a service that’ll work with any AtomPub client. This way, the same software could both publish a post on a Wordrpress blog and a new section in a book on Feedbooks, without any additional work to support Feedbooks. While the next release will extend AtomPub to add things that are specific to books and publishing on Feedbooks, we’ll always be compatible with any AtomPub compliant client.
One of the first use for the API will be to make conversions from various formats easier. In our team, Benoît Larroque is currently working on a script to divide an HTML file and send it to Feedbooks through AtomPub. Such scripts will focus on properly dividing the text into parts/chapters/sections that the user can finetune afterwards in our Web UI.
Integration into other platforms such as blogs (Wordpress) or Wiki will be another focus, and dedicated desktop or mobile tools for publishing could also use this service.
But the main goal of course, is to provide a service that any developer can use to build innovative tools.