Part of the scripting.com web server. San Francisco CA USA. 7/29/96.

Site Tools Suite

A collection of site management tools for BBEdit-based websites. The first tool creates an outline of a website from a folder on your LAN.

By Dave Winer, dwiner@well.com

The first site tool is the Site Outliner. It actually works with any website generated by any content tool, even tools that run on Windows or Unix or whatever. If you can make the site appear as a series of nested folders on your LAN, you can outline it with the Site Outliner.

Download and Install

You can download the Site Tools suite from:

ftp://ftp.scripting.com/userland/siteTools.sit.hqx

Be sure Frontier 4.0.1 or greater is running. You can download Frontier if you need to. Double-click on suites.siteTools and click on OK for the confirmation prompt.

Double-click on Site Outliner SubMenuBar to install a new submenu called Site Outliner in the Net menu in Frontier.

Check it out

Choose the Outline Website command from the Site Outliner submenu of the Net menu in Frontier. Choose a folder that contains a website you want to outline.

A dialog will appear, asking for the base URL for the website. The outliner will insert this string in front of all URLs it generates. For example, on www.scripting.com, a folder that appears in 8100:Apps:Webstar:xxx will have a base URL of http://www.scripting.com/xxx/.

Now the outliner runs. It creates a Frontier outline, each line contains either the name of a folder, or a link to a file in the folder. When the outline is build, it uses Frontier's outline renderer to create the HTML code for the page. It writes the page into a file called siteoutline.html, inside the folder its outlining. When the whole process is complete, it launches your HTML editor and sends it an Apple Event to open the file. The editor is BBEdit, by default, the next section shows how you can change all the defaults for the site outliner, including your choice of an editor.

Scheduling outline builds

See the docs for the Scheduler Suite for background information. You can use this suite to schedule a build of the site outline every night at 2AM. Here's how you do it.

In Frontier, choose Scheduler from the Suites menu. A new menu will appear in Frontier's menu bar, called Scheduler. Choose the Add an Overnight Task command from the Scheduler menu. Enter:

siteTools.buildSiteOutline (user.sitetools.lastfolder)

into the dialog. When you leave for the day, be sure you leave Frontier running. When you come back in the morning, the site outline will be current.

Customizing the Site Outliner

Choose the Options Table command from the Site Outliner submenu of the Net menu in Frontier. A Frontier table opens that contains all the defaults:

Name Value Kind
alink800080string [6]
bgcolorFFFFFFstring [6]
closeoutlinewindowfalseboolean
editorappsystem.verbs.apps.BBEditaddress
indentpixels20number
lastfolder8100:Apps:WebStar:frontier:filespec
link0000FFstring [6]
maxchars5120number
outlinefnamesiteoutline.htmlstring [16]
siteOutline67 linesoutline
skipUntitledPagestrueboolean
text000000string [6]
topurlhttp://www.scripting.com/frontier/string [34]
vlinkFF0000string [6]

alink, bgcolor, link, text, vlink: are the colors for the page that's generated by the outliner.

closeoutlinewindow: set this false if you want the outline window to stay open after the outline is built.

editorapp: points to a glue scripts table for a compatible editor. Even a minimally scriptable editor can be compatible. All it must support are the four required Apple Events.

indentpixels: is the number of pixels that will be indented for each level of the outline. We use an empty table cell with a fixed width to do the indentation.

outlinefname: the name of the HTML file we generate.

skipUntitledPages: if true, we don't generate outline entries for pages that don't contain a <title> tag.

topurl: the top URL for the website. It's the value that the menu command prompts for. If you're building an outline from a script, be sure to set this value before calling siteTools.buildSiteOutline.

maxchars: as we build the site outline, we read each file and look for a <title> tag. This can be a problem for non-HTML files that are huge, like WebStar's log file. maxchars determines the maximum number of chars we'll read looking for the <title> tage. It defaults to 5K. This is probably totally adequate, but in case it isn't, you can change this value.

Mon, Jul 29, 1996 at 9:11:43 AM by DW

  1. deverman@pilot.msu.edu points out that the Site Outliner tool will read enormously large files like the WebStar log file, and not do well with them. I added the maxchars field to the user.sitetools table, see the description above. [Note: the outline builder runs much faster. Yeah!]

  2. We now uppercase the name of the website on the outline page. It makes it more readable. This change was in suites.siteTools.bsoTemplate.

Pointers


This page was last built with Frontier on a Macintosh on Mon, Jul 29, 1996 at 11:41:09 AM. Thanks for checking it out! Dave