How to customize the look of your Blork

Have you been using Blork, but found yourself wanting to change its look and feel? Well, you can!

If you look the Prefs area, you’ll see a “Look & Feel” section that has a link to “Custom CSS.” Clicking that link will take you to a prefs page where you can extensively customize the look and feel of your Blork pages using CSS.

If you’re comfortable with CSS and you’re ready to get customizing, this is what you do.

  1. Click on the “Prefs” link in the Blork menu. Then click on the “Custom CSS” link in the “Look & Feel” section.
  2. On the “Custom CSS” page, you’ll see a text box containing the default CSS for Blork. You can make any changes you want in this box, then click the “Submit” button at the bottom of the page.
  3. Reload the page or click on one of the links in the Blork menu, and you’ll see your changes. Voilà!
  4. If you completely break everything, or you just want to get back the default CSS, you can simply go back to the “Custom CSS” page, clear the text box containing your custom CSS, then click the “Submit” button. Reload the page or click on one of the links in the Blork menu, and the default CSS will be reloaded.

For example, one small yet dramatic tweak you could try would be to add the following to the bottom of the default CSS:

body {
  font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  font-size: 120%;
  }

See? Now, show us what you’ve got! 🙂

worldOutline.root, a simple shell

Way back in 2002, at UserLand we did something smart by extracting the core of the OPML directory browser and putting it into the core set of verbs. The code survives to this day, and it works!

It took a couple of hours to put together a simple website shell, in a Tool, worldOutline.root.

I had to make one small change in the core code to get it to work properly in the new context. So you need to update opml.root for this to work. There may be other fixes needed later.

This tool is for people with experience running an OPML Editor server.

How to install

1. You need to be running the OPML Editor.

2. From the Tools Catalog page click the Install link next to worldOutline.root.

3. Reserve a sub-domain for the outline, and add an item to config.mainresponder.domains pointing that domain to @worldOutlineWebsite.

4. Navigate to config.worldOutline.prefs.rootOutlineUrl. Change it to point to the outline you want to serve as your root. Recommend using the Dropbox public folder for this outline.

There’s still some more work to do, so stay tuned.

You can browse around my website at http://worldoutline.scripting.com/.

Setting up beaut.root

Beaut.root sits on top of radio2.root and river2.root providing an integrated user interface, one which supports reading and writing of news. So to do this installation, you must already have radio2 and river2 installed and running on your server.

How to set up

1. On the server, choose Tools Catalog from the Misc menu. Click on the Install link next to beaut.root. Click OK to all confirmation prompts.

2. Think about what domain you want to map to the Beaut website. At your registrar, point that domain at your server. Then choose Set Domain from the Beaut sub-menu of the Tools menu. A dialog appears. Enter the domain and click OK. It will set also set the cookie domain in members.root. (An aside: If you’ve been running Radio2, you might just want to map that domain to Beaut, to keep it simple for your users. This user interface is a superset of the Radio2 interface.)

Unless I’m missing something, that’s it. 🙂

BTW, it’s called beaut.root because it was built around what we call the “beautiful” river interface. I didn’t want to type beautiful for every routine I needed to call, and variable I wanted to access, so I shortened it to beaut.

Setting up radioReallySimple.root

Last weekend I decided it was time to throw in the towel on my vow to not write any more Twitter apps, and wrote a simple app that does what TwitterFeed does. It creates a connection between feeds and Twitter accounts. Why? TwitterFeed is great, but it can take up to 1/2 hour for it to push an item from a feed to Twitter. In a real-time world, that’s too slow for some applications.

So I wrote what I thought of as a Fractional horsepower TwitterFeed. It could never carry the load that TwitterFeed does, it wasn’t designed to. But it can follow a couple hundred feeds with an average of five minutes between the time it was posted to the feed and the time it appears on Twitter. Further if the feed supports rssCloud, there is almost no wait. At most a few seconds.

How it works

1. Install a copy of radioReallySimple.root on your server, and then configure your copy of Radio2 to link to it. There will be a little blue Twitter icon under the edit box. When you click on it, it will connect to your radioReallySimple.root server.

2. A page loads on your radioReallySimple.root server, but almost immediately it redirects to Twitter’s OAuth page. If the user grants permission to write to his or her Twitter account, the connection is then set up on your radioReallySimple.root server.

3. When the feed updates, radioReallySimple.root detects it, and posts the new items to Twitter. Just leave it running.

To the user it appears as if Radio2 is talking directly to Twitter, even though there’s an intermediary.

How to set up

1. From the Tools Catalog page click on the Install link next to radioReallySimple.root. Click on OK to all confirmation dialogs.

2. Log on to your Twitter account. Choose Settings, then Connections. Screen shot.

3. In the right margin you’ll see a section for Developers, click the link to visit the Apps page.

4. At the bottom of the page is a link to Register A New Application. Now you have to come up with a name and a description. You can change this alter, but your users will see this, so try not to scare them. For the application website, you might want to write a blog post and link to it there. Your Application Type is “Browser.” The Callback URL is http://yourdomain.com/callbackFromTwitter where “yourdomain.com” is the domain you’re going to map to the website (in step 7 below). Your Default Access Type is Read & Write. You are not using Twitter for login.

5. After you register your application you’ll see a page with several strings on it. You’re going to copy those strings into the config.root. They identify your app to Twitter. In this screen shot I’ve hidden the strings for my app.

6. In the OPML Editor, navigate to config.radioReallySimple.prefs.oAuth. I’ve set up the URLs for you, but over time they might change, so read the page on twitter.com carefully to be sure. Then copy the fields from the twitter.com page into the prefs table, carefully. This information is essential for communicating with Twitter.

7. Again in the OPML Editor, navigate to config.mainResponder.domains, and enter the domain name for your radioReallySimple.root app in the first column and @radioReallySimpleWebsite in the second. Test the domain in a browser to be sure you can get there.

8. Finally on the machine that’s hosting Radio2, navigate to config.radio2.prefs.domainRadioReallySImpleApp and change it to point to your server.

With any luck you’re now in business. 🙂

Setting up rssToBlog.root

This is a faceless app that routes text from RSS feeds to WordPress blogs. In the future, I hope to get it working with other brands of blogs. There are differences in their APIs.

How to set up

1. Bring the OPML app to the front and choose Tool Catalog from the Misc menu. Click on the Install link next to rssToBlog.root.

2. Choose Add blog from the rssToBlog sub-menu of the Tools menu.

3. A dialog appears, asking for the URL of the feed. Enter it. Click OK.

4. A table window opens with info about the feed. Open the prefs table, then open the params table contained within it. Fill in each of the entries, describing the WordPress blog that you want to synch with the feed. A screen shot of the table that connects my linkblog with its WordPress version. (Password omitted.)

5. When you’re ready, set the enabled boolean to true.

6. There’s another enabled boolean you must set true. Bring config.root to the front, navigate to config.rssToBlog.prefs. There it is. Once you set this true, at the top of the minute, rssToBlog will read the feed, and start shoveling content over to your WordPress blog.

Other prefs

There’s a template in the blog prefs table, that determines what the text looks like as it flows to the blog. The default is appropriate for a linkblog. However, if you have a blog like Scripting News, with titles and essays, it makes more sense to just set the template to <%description%>. Here’s the test WP blog I’ve set up to test this kind of connection.

In the top-level prefs table there’s a value called ctMinutesBetwReads. It defaults to 10. If you want less latency, lower the number. If you want to minimize bandwidth and don’t care about a lag betw feed and blog, increase it.

Is it only RSS?

No, it should work with Atom 1.0 as well as all versions of RSS, going back to 1.0. Hey it might even work with 0.91 or 0.92. but you don’t see too many of those around these days. 🙂

Setting up a Scripting2 server

Scripting2 is a full-strength outliner-based blogging tool. It’s what I use to edit Scripting News.

A few people in the EC2-for-Poets community have hacked their way to getting it to run on their systems. It wasn’t fair what they had to go through. I wanted to make it so this software could be installed as easily as Radio2. Now it’s pretty close, so I wanted to get the instructions up so people could test them.

1. If you haven’t already done so, set up OPML to be able to store files in your S3 space.

2. Bring the OPML app to the front and choose Tool Catalog from the Misc menu. Click on the Install link next to scripting2.root.

3. The web browser will come to the front and ask for a username and password. Before doing that, we have to set up a test account for you to work with.

4. Bring the OPML app to the front. Choose scripting2.root from the Window menu. Navigate to scripting2suite.utilities.afterInstall. Open it. Click the Run button at the top of the script. A dialog appears asking for the S3 path for your blogs. Suppose you want to put them in a folder called blogs in static.myhome.com. The path you would enter is /static.myhome.com/blogs/ — it’s important that you get the slashes right.

5. When the script completes, bring the browser to the front and enter the test/password where it asks for the username and password. If it worked, OPML will come to the front, with a workspace window open saying it’s time to write your Hello World post.

6. Write. When you’re ready click Save. Then View. You should see your first post in the browser.

Nicer URLs

The URLs that Scripting2 will generate for your site are the long ones that Amazon returns to us. But if you set up your bucket so that you’re using your own domain name, you can have shorter addresses. You just have to configure Scripting2.

Choose scripting2data.root from the Window menu, and navigate to scripting2data.prefs.statictext.s3.prefs.url. Here’s a screen shot. You’ll see a long URL, edit it to replace it with the short equivalent.

Your blog’s name, your name, etc

These bits are used in rendering your site, and without them being set, the site will work, but it will look strange in places.

To set them, you can either navigate to your prefs table under scripting2data.server.users, or use the web form. (Note that URL will only work on the server machine.)

New users

The test account was just to get your started. Now you should start a new account with your real username, and a real password. To do so, choose the New user command from the Scripting2 sub-menu of the Tools menu. It will ask for a username and password. After you’re done, you should re-login with that info and start again with your “real” blog.

Scripting2 mail list

If you’re going to run this server for real you should probably sign up for the list.

How to use the new host-a-website feature on S3

You can find all the links about the new feature on Werner Vogel’s blog. I share his enthusiasm for the new host-a-website feature. I was asking for it for a long time. I guess, from reading the tea leaves, he was too. 🙂

Anyway, I had to do a bunch of trial and error to get my first S3-hosted static site configured. I wanted to leave a howto behind me so next time I won’t have to do the head-scratching again. Maybe it will help you too.

Suppose the domain you want to host on S3 is r2.reallysimple.org. And the index file for that domain will be index.html. This is what you do.

1. Go to the S3 panel on the AWS website and create a new bucket called r2.reallysimple.org in the US-Standard region.

2. Upload a file called index.html to the new bucket. Say something simple like Hello World. You can copy the HTML from my test file if you want.

3. Click on Properties at the top of the right panel, then click on Website in the lower-right panel. Click the Enabled checkbox, and enter index.html as the Index Document. Click Save.

4. Click Permissions in the lower-right panel. Then click on Edit bucket policy. Paste in the template text you grab from this file. Edit it to replace YOUR-BUCKET-NAME-GOES-HERE with the name of your bucket (in the example r2.reallysimple.org). Click Save.

5. Now go to your domain registrar, and map r2.reallysimple.org as a CNAME to r2.reallysimple.org.s3-website-us-east-1.amazonaws.com.

Now you should be able to go r2.reallysimple.org and see the text of your index file. 🙂