Skip to content

Mounting Atompub Resources Locally

Minor update:  A couple of errors in the installation instructions have been fixed and atom-tools has revved to 0.9.4, fixing all known issues.  If you’re using appfs, you should upgrade your atom-tools gem.
$ mkdir myblog
$ appfs.rb myblog
$ cd myblog
$ ls -l
dr-xr-xr-x 1 placey placey 4096 2007-08-02 11:25 WordPress_Workspace
$ cd WordPress_Workspace
$ ls -l
dr-xr-xr-x 1 placey placey 4096 2007-08-02 11:25 WordPress_Media
dr-xr-xr-x 1 placey placey 4096 2007-08-02 11:25 WordPress_Posts
$ cd WordPress_Posts
$ ls -l
dr-xr-xr-x 1 placey placey 4096 2007-08-02 11:25 drafts
dr-xr-xr-x 1 placey placey 4096 2007-08-02 11:25 published
$ cd published
$ ls -l
-rw-rw-rw- 1 placey placey 0 2007-08-02 11:25 First_Post
$ cat First_Post
This is a test. This is <em>nothing</em> but a test. If this had been an actual post, then I wouldn’t have many readers.
$ vim First_Post
This is a test. This is <em>nothing</em> but a test. If this had been an actual post, then I wouldn’t have many readers. Look *RedCloth* support.
:wq
$ cat First_Post
This is a test. This is <em>nothing</em> but a test. If this had been an actual post, then I wouldn’t have many readers. Look <strong>RedCloth</strong> support.
$ vim New_Post
I can create new posts. too. The title will be the filename with underscores replaced by spaces.
:wq
$ ls -l
-rw-rw-rw- 1 placey placey 0 2007-08-02 11:25 First_Post
-rw-rw-rw- 1 placey placey 0 2007-08-02 11:25 New_Post
$ cd ../drafts
$ vim Another_Post
When I create files in the “drafts” directory, they are published as drafts in the Atompub server (if it supports it).
:wq
$ rm Another_Post
$ vim Yet_Another_Post
This post is worthy of publishing.
$ mv Yet_Another_Post ../published


Installation instructions. Usage Instructions.appfs leverages Fuse (Filesystem in Userspace) and the Fuse Ruby binding, FuseFS, as well as the Atom-Tools Ruby library by Brendan Taylor. appfs simply glues the two together.If you want to play with this and don’t have an Atompub enabled server, I have created an anonymous account on a WordPress install I care nothing about. You can access this server at:url: http://72.249.21.88/nonintersecting/wp-app.php/service
user: anon
pass: sekrit

(Incidentally, that’s a valid appfs config file.)

appfs is tested only against a (heavily patched) WordPress 2.2. I would love people to try it against other Atompub servers.

In this first release there are a number of limitations, all of which will be addressed in the near future.

Limitations

  • No support for media entries
  • No support for categories
  • XHTML content only
  • Cannot create/delete workspaces or collections

I decided to use WordPress 2.2 in order to test appfs. That may have not been the best decision as the Atompub code in WordPress is chock full of bugs. The good news is that I fixed all the bugs that I found. I’ve reported them to the WordPress developers, but most won’t be fixed until 2.4. So I’ll make the fixes available here.

WordPress 2.2 Atompub bugs fixed here

  • Service document uses Atompub 09 formatting
  • Draft entries not included in a feed
  • If the above worked, drafts would have been shown to all feed consumers, not just the draft entry authors (enhancement, not a bug)
  • Entries updated from draft to published are not actually updated
  • Atom parser doesn’t parse properly

To fix that last one, I grabbed Elias Torres‘ PHP Atom Parser, phpatomlib, and updated the wp-app.php code accordingly. Elias is the original author of the Atompub support in WordPress, but his code has been assumed into the trunk, so Elias broke out the parser for continual refinement (fortunately).

To use these fixes, backup your existing wp-app.php file and replace it with this one. Then drop the latest version of the atomlib.php parser (Revision 7, copied here for convenience) into the same (WordPress top level) directory.

Update: Tim Bray found some more lingering issues in WordPress’s support for Atompub. I fixed these and updated the local version of wp-app.php. This does not guarantee that WordPress can now be made fully Atompub compliant. Unfortunately, the Ape is having some issues of its own right now. But I’ll squash ‘em as I find ‘em.

Also unfortunately, fixing the WordPress issues exposed similar issues with atom-tools. I have fixes if needed, but Brendan is pretty responsive and hopefully will put out an 0.9.4 soon.

{ 2 } Comments

  1. ozan s yigit | August 2, 2007 at 2:34 pm | Permalink

    i see the installation instructions at al. but i do not see a download link… :-P

  2. Pete | August 2, 2007 at 3:44 pm | Permalink

    ozan It’s way down there at the bottom. http://wanderingbarque.com/appfs/appfs.rb

{ 5 } Trackbacks

  1. Sam Ruby | August 2, 2007 at 12:38 pm | Permalink

    appfs…

    Pete Lacey: [via Pete Lacey] Wow….

  2. snellspace.com » Blog Archive » appfs | August 2, 2007 at 1:09 pm | Permalink

    [...] What Sam said. This is amazingly cool [...]

  3. [...] Update on WordPress and APP It’s early still, but I can feel the momentum and all thanks to Pete’s recent work on appfs. Pete has been doing some work on WP-APP to test his FS and was wondering about the status on the WordPress implementation. [...]

  4. Stefan Tilkov's Random Stuff | August 3, 2007 at 2:11 am | Permalink

    An Atompub-based File System…

    Pete Lacey: appfs leverages Fuse (Filesystem in Userspace) and the Fuse Ruby binding, FuseFS, as well as the Atom-Tools Ruby library by Brendan Taylor. appfs simply glues the two together. Very cool. Who said “Any sufficiently advanced Web API wi…

  5. RFC5023 » LSDR.net | October 9, 2007 at 10:31 am | Permalink

    [...] O que isso implica? Em coisas bacanas como o appfs, só para dar um exemplo. atompub • atom • blogging • tech • web 09.10.07 @ 12:28 • [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *