Simon 2.6 sneak peek update: Format, Number & Override filters

Time for another Simon 2.6 progress report!

We're getting very close to being ready for a beta release. I just need to update the User Guide, which may be moving into a help book (but will remain online too), and tidy up a few areas. If you want to try the latest alpha release, and help me test these new features, please contact me for the download URL (sorry, only available to licensed users for now).

Since the last update, I've added three new filter plugins: Format, Number and Override. These will all be very useful in analyzing the output of services and other filters.

Here are the release notes on these new features:

  • Added a Format filter plug-in. This enables the combination of values from the service and filters, via an insert variable menu, along with your own text. Handy to append the output of multiple filters, wrap something in quote marks, and other uses.
  • Added a Number filter plug-in. This expects the input text to be a valid number, so is typically used after a Find or Block filter to narrow down the text. It converts the text to a number, optionally ignoring specified characters, and with a customizable decimal separator so you can match the format of the text. Then it compares that number against either a fixed number, or the number from the previous check, plus or minus some delta. It can compare using "is", "is not", "is greater than", "is less than", "is in range" or "is not in range". It then results in either a change or failure, as desired. So you can use this to detect if a disk is getting full, a price has changed by a specified threshold, a file count has changed, or many other uses.
  • Added an Override filter plug-in. You can use this to alter the status of a test from Unchanged, Changed, Failure, or from a success status (the first two), or any status, into a different status, including automatically detecting if a change occurred. You can also alter the output text or error message, including using variables (similar to the Format plug-in).

Here's a screenshot of the filter portion of the Edit Test window, showing a Find filter using a regular expression to output the RSS feed URL of a web page — which you may recognize from a previous update. Here, I've added a Format filter after the find, which outputs the test name before the output of the Find filter, and wraps that in quotes:

Here's one of the built-in Number-based filters, showing its Edit Filter window. This will result in a failure with a custom error message if the input number is more than 95 — useful when looking at a percentage, e.g. disk usage. You can of course add additional filters (or customize this one in the Edit Test window) to handle other cases:

Another Edit Filter screenshot, this time showing a built-in Override filter. This can be used to change a failure into a success. The output text will be the error message, so it'll result in a change status if the error changes:

Lastly, here are three filters in the Edit Test window, based on the Block, Number and Override plugins. This test looks at Apple's store page for a specific product, and uses the Block filter to extract the price, the Number filter to result in a change if the price is different than the previous check by at least $5 (plus or minus), and the Override (if a failure occurred) to alter the failure to unchanged status, and alter the output to indicate that the price couldn't be determined:

I hope that gives a hint at the power and flexibility of the new filters features — and remember that they also support scripts, so you can create new filters to do pretty much anything.

The latest alpha release also includes another big change, which I'll discuss in a few days.

Want to try it yourself? Just ask!