all \ code

Pertelian Console

Download Pertelian Console and source

What it?

Outputs text to a Pertelian display from a file, program, command line or the web.

I wrote it because I was frustrated with the way the device rendered weather data by default:

There was lots of horrible horizontal scrolling and almost impossible to get useful weather information at a glance: one would have to wait and watch it for a minute for the right information to scroll into view.

Using PertelianConsole and a web-based PHP script which utilises Yr.no’s weather data, it now shows concise, useful weather information:

Current temperature is always shown on the top-right and otherwise shows temperature and forecast for morning, noon and night. The page alternates between today, tomorrow and the day after.

Getting started

PertelianConsole (PeCo) is a command line tool designed to be run from batch scripts or the Windows’ Scheduled Tasks service. Thus, you have to pass in options for anything to happen. The program assumes the Pertelian is connected and drivers are installed. If your display works with the bundled Pertelian app, it should work with PertelianConsole.

Example 1. XML Content

Display content from a web-based XML source, runs for three hours before automatically exiting. Content is looped every 10 seconds and the console window is hidden so it runs in the background.

PertelianConsole.exe --xml=http://thestaticvoid.net/toy/weather/weather.php?render=pertelian --runFor=3h --loopInterval=10s --fastHide

Example 2. Piped output

Shows the contents of the current directory scrolling on the display. The ‘stream’ flag is require to tell PeCo to read from the standard input. Note that input is not wrapped to fit screen width.

dir | PertelianConsole.exe --stream

Example 3. Display text from the command line

Displays “line one” on the first line, and “line two” on the second. Note the use of \n to control output. PeCo will letter-wrap text.

PertelianConsole.exe --text="line one\nline two"

Example 4. File input

Reads a text file and displays it for five minutes, showing each screenful of content for one second.

PertelianConsole.exe --file=test.txt --stayRunning=5m --scrollInterval=1s

Tips

  • To get an overview of PeCo’s options, just run it without arguments and you’ll get some help text.
  • Display is cleared and turned off when the program exits. Consider using the ‘runFor’ parameter to keep the program running.
  • See the Url in Example 1 for an example of the XML format. Alternatively refer to src/Reader.cs
  • The ‘loop’ flag continues to show the text (looping for multi-page input) for as long as the program is running

Download Pertelian Console and source

31 October 2009

 

Del.icio.us private bookmarks feed

This ugly little duckling will output a feed of your del.icio.us bookmarks, including those that aren’t shared. As far as I can gather, there’s not a way of get such a feed from del.icio.us itself without logging in first.

13 February 2008

 

Ligerator

I’ve put the Ligerator online. It’s a simple web-based tool which lets you easily generate a Microsoft Word macro to do a bunch of text replacements.

My main reason for developing it was to maintain scripts for typographic ligature replacement, for example to transform:

into:

Once you’ve set it up, you can bookmark a magic URL which allows you to return to the preset, make some changes and re-generate a new macro, or share it with someone else.

The code generated should be portable across Word versions and platforms, however I’ve only tested on Word 2007 running on Windows.

p.s., if you don’t see the difference in the two samples above, Ligerator is clearly not for you.

28 December 2007

 

DateCalc

It’s a simple little program that will tell you the time period between two dates.

Download bare executable (147KB)
No installation required, just save and run or open directly.
Doesn’t run? DateCalc requires .NET Framework 2.0 (or x64).

Usage
Just select the two dates, or paste in dates into below the calendars. Select a unit from the drop-down menu.

7 June 2007

 

CWM 2.2

This minor update to Clint’s Wallpaper Master has one new feature, ‘crop to fit’ aka pan’n’scan. This came about because my SLR camera produces photographs with a slightly different aspect ratio to my monitor. When I was viewing images fitted to screen, there’d always be a band of empty space above and below the image – kind of like when you view a widescreen film on a non-widescreen screen. The bug which caused the image info window to not display near the notification icon (say, if you had your task bar at the top of the screen) has been fixed too.

Get it here

Crop to fit

When enabled, CWM will crop images slightly if doing so will mean the monitor can be completely filled. You can also set a threshold so images that are wildly different from your monitor (like an ultra-wide panorama) aren’t cropped at all – otherwise a large part of the image will be cropped in an effort to make it fill your screen.

Note that CWM will only do this for images that are being displayed with the ‘fitted’ orientation. For best results with displaying digital photos as backgrounds, put CWM on automatic orientation, and turn cropped on.

For an overview of the difference it makes, here’s an image shown using CWM’s fitted mode. This means the image aspect ratio is maintained and it is scaled to fit the screen. Because of the ratio difference with the monitor, bands appear at the top and bottom.

Now, if cropping is turned on, the image will completely fill the desktop, at the expense of losing some of the picture on the left and right. In most cases you’ll never miss it, but it makes your wallpaper look oh-so better:

Another way of filling the screen completely is to use ‘natural size’ mode with images larger than the size of the screen. But this will tend to look bad because you’ll only see the top left hand corner of an image:

So there you have it. Turn on cropping to get images filling the screen, yet still looking great.

17 February 2007

Comment

 

 

XML

Crest
The Static Void.
Est. 2000