wiredfool

Archive for November, 1999

Keep It Up

Overview

This is a little perl script for Windows machines that monitors the state of Frontier on the local machine. If Frontier does not respond to an http or Ole query, It assumes that Frontier has crashed and needs to be restarted.

While this crashing thing never happens with release software, it is useful for trying out beta versions or debugging corrupted DLLs.

What it Does.

Every minute or so (configured in the script), the script does a http query of a provided URL. It also does an OLE/COM query of a provided function. It currently doesn’t use the returned value of either the function or the http request, but that could be done rather easily.

If the http request and a second OLE request fail, then Frontier is restarted using the Win32 Process object.

How To Use It

Yon need a recent build of ActiveState Perl, http://www.activeState.com (free) Download the script and customize the OLE function name and the request url. The script should be in the filesystem and not contained within a frontier ODB. Typicall, perl scripts have a .pl extension assotiated with them. Run the script by double clicking on it. If frontier wasn’t running before, it should be now.

The OLE function that I use for this is simply return(“I’m alive”), entered in user.com.heartbeat.

What it shows

How to start processes in perl.

How to call com/ole functions hosted in frontier from perl.

How to do a simple URL call from perl.

All very useful things for a frontier developer to know. “;->”

No comments

DrawCalendar

*** What it is

This is a drop in replacement for the main responder calendar script, using the same parameters, although some of them are ignored. It produces a calendar that looks like:


[ Last Year ] [ Last Month ] [ Last Week ] 8 9 10 11 12 13 14 15 16 17 18 19 20 [ Next Week ] [ Next Month ] [ Next Year ]

This sort of calendar is advantageous for lynx users, as the default tabeled calendar is about three pages long. This is also a more useful calendar just around the end of the month, as it shows a relative rather than an absolute time. It’s also useful when you want a low, sleek, and slightly less ordinary look.

*** How to call it.

Download it and put it in the macros table of a website.

The function header:
on drawCalendar(adrcalendar=nil, urlprefix=””, colwidth=32, rowheight=22, tableborder=0, bgcolor=nil, monthYearTemplate=” [ *** ] “, dayNameTemplate=” [ *** ] “, dayTemplate=”***”, curdate=clock.now ())

Of these parameters; colwidth, rowheight, tableborder and bgcolor are ignored, as they are specific to the table rendered version that the code evolved from. Day template adjusts the display of the individual days. The DayName template is used for the Last Week/Next Week links. The monthYearTemplate is used for the Next Month and Next Year links.

One typical function call snagged from my mailserver html:

{drawCalendar(mailserver.storage(folder,”[\”#indicies\”].date”), urlprefix:prefix+”bydate$”+folder+”.”)}

2 comments

Quick Scripts

Note: this stuff is old.

A collection of scripts and other interesting things that could be useful for people making frontier websites. The mailserver is on hiatus for a while, till I get a releasable version again.

  • “Frontier-TOC”: Merged into the Userland Frontier codebase.
  • “PicsPicker”: Some image management stuff for Manila.
  • “Esoteric Settings”: Mainresponder settings, exposed for Manila
  • “Patch Tool”: the basis for being able to stick Frontier odb items into source control. Probably superceeded by cvs integration (see frontierkernel.sourceforge.org).
  • “JSP Proxy Responder” A Frontier responder to proxy incoming requests to another server.
  • Radio Userland Remote Player Xml-rpc interfaces on the a linux box and the drivers in RU to Store, Stream and Play mp3s.
  • “Imagemagick Thumbnail Script.” A perl script to run imagemagick on the command line to produce thumbnails and meduim sized images. You need perl, imagemagick and a machine with a command line. (i.e., NT, linux, or probably Mac OsX)
  • “XML-RPC via SMTP” / pop. This is a minor extension of xml-rpc to work over an email connection.
  • “EmailThisPage” script to email a copy of the page to someone who may be interested. Note that Userland now includes similar functionality in Manila.
  • “Notify me” script to notify me when someone replies to a posting of mine in the discussion group.
  • Version of “prefsSuite.drawNavigator” that allows for templates for the links.
  • Perl/NT “Keep it Up” script. Queries frontier every minute to make sure that it’s answering queries
  • “Thread View” for the discussion group. – From any message in a thread, I want to be able to see the relation to all of the other messages in the thread.
  • “DrawCalendar” This is a drop in replacement for the main responder calendar script. It provides a single non-table calendar that shows one week back and ahead in individual days, And links to Next/Last week, month, and year. I like it better than the original calendar for cases where I just want to see relative dates and when I might be accessing the page through lynx, a textmode browser. That and it’s just different.
No comments

Filtered News Feeds

***What It Is

Filtered News Feeds are an idea that I had when I realized that it’s impossible for me to keep up with all of the updates to the linux software that I use. It turns out that freshmeat.net is a channel on my.userland.com, and it also just so happens that Userland will push the syndication feed to my home machine.

So I have a basic “filters” prefs page for setting up the things I want to search for: what channels to search, what notification methods, and what keywords to search for. This is intended to be a synthetic feed that notifies me to information that I may miss if I rely on wetware filtering. (Wetware == grey matter)

***Status

Ths incoming news feeds are being searched, but the results aren’t being recorded at this point. I’m still figuring out the appropriate channel architecture. Watch this space…

No comments

Projects

I’ve got some background projects that I’d like to see happen. I’d like to see them as Open Source projects where people can take and use the code for their purposes and return their changes to the general community. It is also meant as a place for beginners to download some code to see what’s happening.

I’d like to see 10 projects going here, so I’m open to more ideas.

  1. Basic Database – Define a set of fields using the prefs.root xml format, Add entries, search entries, and browse entries.
  2. NNTP interface to discussion groups – There’s so many DG’s starting up, I’d like to have a good interface to them. (No disrespect Dave, Think 20 “Something Betters” from Roxanne.)
  3. Network Bookmark list – For people who have too many browsers and bookmark lists.
  4. “Filtered News Feeds” – was working on this, sort of abandoned.
  5. “Web Based Backup” – If you’ve seen the Qube, then you know what direction I’m aiming for.
  6. “Gnu diff”/patch for frontier
  7. “Thread View” for the discussion group. – From any message in a thread, I want to be able to see the relation to all of the other messages in the thread.
  8. Better integration of email and the discussion group/manila sites
  9. Radio Userland Remote Player Xml-rpc interfaces on the a linux box and the drivers in RU to Store, Stream and Play mp3s.
No comments

« Previous Page