A couple of minor changes in this release.
A new icon was introduced in the first beta of Fargo 2, but it was never completely implemented, and in practice isn't very useful. The space will be better used, and space in the left margin is limited.
There was a bug in the stream sites, reported by Lloyd Davis, where the date displayed on a day's post would be incorrect. There was a call to the date formatter in the CMS that didn't include information about the user's timezone. I checked all the other calls and they appear to be correct.
I added this feature because I wanted to try writing my own handlers without having to update Fargo Publisher.
If a request comes in that doesn't match any of the built-in functions, we check the scripts sub-folder of the data folder. If an item matches, we eval it and return the result.
How matching works: If the request is for /xyz then we look for xyz.js.
We convert the request to lowercase, so that requests are case-insensitive, however the files in the folder must have all lowercase names.
If we don't find it, we return 404. If there's a script error we return a 503.
If the script is in count.js and the server is running at pub.fargo.io, you'd access it through this URL: http://pub.fargo.io/count. You can try it, click the link. Reload the page. Every time you load it, the count should increment.
globals is a global object that you can hang persistent values on. They persist for the life of the server, when it's rebooted it's reset. You can think of it as a scratchpad.
Here's the source for the server. To find the part that implements this, search for 404. We look in the scripts folder before calling it a Not Found error.
I wrote a bit about this on Scripting News.
Some people want to edit more than one WordPress blog with Fargo. To make that possible, Fargo now has an outline-level setting for the URL of the associated WordPress blog.
To change the setting, choose Outline Settings from the File menu. Click on the Overrides tab. Enter a new value for the WordPress blog URL.
Here's a screen shot showing an outline with a different WordPress blog URL.
When you save a post from the outline, if this option is set, the post will be saved to the indicated WordPress site.
Note: There's no ability to override the username or password. This information has to be stored in the OPML file, and it's not cool to store passwords in such an easy-to-share format.
Fixed a bug where an old version of the Settings dialog in the System menu would appear.
This was caused by an error in mapping domains. It's a long story, but it's fixed now. However, it suggests there may be other similar problems in Fargo that we should be watching out for.
If you see any dialogs or user interface elements that appear to be dated, please report them here or on the Fargo2 list.
There's one new feature in this release, the ability to download an entire WordPress site into a Fargo outline.
There's no user interface for the feature.
There are limits to what it can do.
I don't know how well it will perform on WordPress sites other than the ones I tested with.
Make sure that you've configured Fargo to talk to the WordPress site you want to use, in the Blog panel of the Settings dialog in the System menu, at the right edge of the menu bar (the menu under your Dropbox name).
In any outline, type this:
getMyWordPressOpml () on a line by itself. Press Cmd-/ to run it.
After a while you'll see a dialog that says that it has downloaded your site into the wordpress folder. This is a sub-folder of your Fargo folder. Screen shot.
In the file system, move or copy the file into your Fargo folder.
Choose Open in the File menu.
Choose the outline you just moved. With any luck the outline will open.
If you want to make an editing change to any of the posts, do it as you would with any WordPress post you created in Fargo. 1. Make the change. 2. Put the cursor on the title headline. 3. Click the WordPress icon in the left margin. 4. Wait for confirmation. The Eye icon should take you to the changed version of the post.
Deleting or moving the posts has no effect on the website. You can organize the posts any way you like.
The great thing about this feature is that you can easily edit the contents of an entire blog using the outline interface to find your posts. You have the full organizational power of the outline to arrange your blog to make editing as easy as you want it.
I want to release the source code for the server, where all the work in conversion is done. The ability to export an entire WordPress blog in a single file is a new thing for WordPress, as far as I know. It's something I want to share widely, because everyone needs this ability, and I don't want to host the service for everyone in the world.
Update: The server software has been released.
Please report success or failure on the Fargo2 list.
If there are problems, remember to provide all the information someone would need to help you.
A couple of minor changes related to watched outlines.
If the user is hooked into my Fargo Publisher server, pub.fargo.io, and has one or more watched outlines open, we use a new server just for checking for changes instead of using the main server. Just want to lighten the load on the main server, to keep it nicely responsive.
If you aren't actively using Fargo, we don't check watched outlines. The rule is if you haven't typed anything in 5 minutes, we don't check. If you want it resume checking just type something.
Watched outlines are central to using Fargo in a workgroup.
If you're running Fargo in a tab in the background, it would be helpful to me if you would reload the tab to get the newest version running. This will lighten the load on my server if everyone does it, because the new version has an important optimization. Thanks!