Render icon goes away

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.

Date bug in stream style sites

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.

04/29/14; 03:12:13 PM

New in this release is the ability to write your own request handlers in JavaScript.

I added this feature because I wanted to try writing my own handlers without having to update Fargo Publisher.

How it works

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.

Error handling

If we don't find it, we return 404. If there's a script error we return a 503.

Example

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.

A picture named script.gif

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.

Read the source

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.

Blog post

I wrote a bit about this on Scripting News.

04/23/14; 02:19:16 PM

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.

04/20/14; 10:10:12 AM

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.

04/18/14; 09:59:51 AM

There's one new feature in this release, the ability to download an entire WordPress site into a Fargo outline.

Caveats

  1. There's no user interface for the feature.

  2. There are limits to what it can do.

  3. I don't know how well it will perform on WordPress sites other than the ones I tested with.

How to

  1. 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).

  2. In any outline, type this: getMyWordPressOpml () on a line by itself. Press Cmd-/ to run it.

  3. 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.

  4. In the file system, move or copy the file into your Fargo folder.

  5. Choose Open in the File menu.

  6. Choose the outline you just moved. With any luck the outline will open.

What you can do with this outline

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.

What's next

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.

The server is written in JavaScript and runs in node.js.

Update: The server software has been released.

Report on the Fargo2 list

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.

04/17/14; 10:05:18 AM

A couple of minor changes related to watched outlines.

  1. 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.

  2. 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.

How to update

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!

04/04/14; 01:23:45 PM

Last built: Thu, Jun 5, 2014 at 6:11 PM

By Dave Winer, Friday, April 4, 2014 at 1:23 PM.