appfs is a utility that can mount remote resources exposed via the Atom Publishing Protocol (Atompub) as a local filesystem.
After installing appfs and its dependencies, you use appfs simply by specifiying, via the command line or configuration file, the local mountpoint (an empty directory), the URL of the Atompub service document, and the username and password required to edit entries and view drafts.
Everything but the mountpoint can be specified in a configuration file. The configuration file must be called .appfs_config and located in the user's home directory.
$ cat ~/.appfs_configurl: http://example.com/path/to/service/documentuser: usernamepass: password
Specifying the same information as options to appfs overrides the configuration file. Order is not important.
$ ./appfs.rb mountdirectory -s http://example.com/service_doc -u whoever -p whatever
or
$ ./appfs.rb mountdirectory --svc-url http://example.com/service_doc --user whoever --password whatever
The -h (--help) flag brings up a usage message.
Currently, appfs runs until terminated. You'll need another shell to manipulate the filesystem. You can send and interrupt (ctrl-C) to appfs to stop it.
The mountdirectory is any empty directory. When the remote service is loaded, all workspaces will show up in the mount directory. In each workspace directory will be a directory for each collection. In each collection will be a "drafts" and "published" directory. And in each of those will be the appropriate entries.
At this point you cannot create or remove directories. You can only manipulate entries (files). The filename will be the entry's title with spaces converted to underscores. You can edit and remove files at will. You can also create new files. If so, then the filename will become the entry's tile with underscores converted back to spaces. Currently, only XHTML is supported as a content type, and all file content is passed through RedCloth before being sent to the server. This allows you to use Textile wiki formatting in your entries.
If you create files in the "drafts" directory they will be published with app:control/app:draft set to "yes." If you move a file from "drafts" to "published," app:draft of this entry will be set to "no." If you copy a file from "drafts" to "published," then you will have two identical entries on the server with different draft states—you probably don't want to do this. If you move a file from "published" to "drafts," nothing will happen.
appfs has not yet been widely tested. If you encounter any problems or bugs, please notify me at placey@wanderingbarque.com