GFX::Monk Home

Posts tagged application:

Pagefeed Android App

After getting an android phone about a month ago, I finally got around to writing a workable pagefeed sync app. This app can handle share intents from any app (I use NewsRob mostly), and save that link to pagefeed on next sync.

It also downloads the links (not the content, this is a lightweight app) so you can delete links from the app and have them deleted from the webapp as well.

You can download the apk here (I haven’t signed up for the market yet). The source is also up on github.

Android as a platform

Overall, I found android frustrating to learn when dealing with some of the newer and less-documented parts (like SyncAdapters and how they interact with ContentProviders, for example), but overall I'm finding it to be a very well-designed system that is easy to write for.

For comparison (because I've written an iPhone app or two), this app could not exist on the iPhone because interaction with other apps (via intents) is crucial, as is background operation (which has only just arrived in OS4). It would also be a royal pain in the ass to obtain, store and validate user credentials – all of which android makes general and reusable (I am happily reusing the google-provided authenticators).

Oh yeah, and it’s written in scala! I seem to have an aversion to platform-specified languages, having used python for my biggest iPhone app. Of course, that meant that I had to void my warranty and only run on jailbroken iPhones. Android doesn’t care how you write your app, and that’s the way it should be.

Save My Text

savemytext is a tiny app engine webapp I wrote last night.

When you write text in it, it will save your text. When you come back, your text will still be there. You can have multiple text boxes. Since it’s an appengine app, you’ll need a google account to use it.

A trivial app, to be sure. But all too often I find myself writing gmail drafts just in order to get a persistent text box between computers. I figured, why not do it properly?

(I was going to just call it “textarea”, but someone already stole that name (and tens of similar ones, without actually having an app to put up. How rude))

Introducing: PageFeed

pagefeed logo PageFeed is a simple web service to help you organise the pages you'd like to read, but just don’t have the time (or desire) to read through right now.

If you've ever used Instapaper, or the newer Read It Later, Pagefeed will feel pretty familiar. The idea is that when you come across an interesting page that you don’t have time to read right now, you just save it to PageFeed via a handy bookmarklet. You can close the page, and PageFeed will remember all the pages you've saved for reading later.

Instapaper and Read It Later both have their own iPhone apps for reading stuff offline. Which is great, but it seems a little unnecessary – and it makes for yet another app you have to remember to open and sync every day. And you know what? There’s already a super robust way to subscribe to a stream of HTML items – it’s called RSS. PageFeed puts the HTML contents of your saved pages into your own private RSS feed. You can then use your favourite online / offline feed reader – you can take the content wherever you like and use it on whatever platform you fancy. You can also use the PageFeed home page for managing your list of saved pages away from your RSS reader.

PageFeed isn’t perfect; it can’t put HTML contents in a feed if it can’t parse the HTML page properly. And if there’s one thing the internet is good at, it’s malformed HTML. But it does pretty well, and if it can’t save the page contents then it will still keep the URL around for you to visit later.

PageFeed runs on AppEngine and uses google accounts, so chances are you already have an account.

The newest version (0.8) of GRiS (the RSS reader I wrote for the iPhone) has support for PageFeed – when you click a link in an article’s contents, you can opt for it to be saved to PageFeed instead of opened in MobileSafari. If you'd like to offer similar functionality in your RSS (or other) application, get in touch!

Autonose: continuous test runner for python's nosetests

Today I've put up the first “releaseable” version of autonose. Basically, it analyses your code’s imports, and determines exactly which tests rely on which code. So whenever you change a file, it’ll automatically run the tests that depend on the changed file (be it directly or transitively). Give it a go, and please let me know your feedback.

All you need do is:

$ easy_install autonose
$ cd [project_with_some_tests_in_it]
$ autonose

See the github project page for further information (and a screenshot).

A better snap-open (for gedit)

snap-open is handy. Unfortunately, it’s terribly crippled if you have a lot of files, since:

  • it uses the linux find command, instead of an index-based file list
  • it doesn’t run in a separate thread, so it locks up your entire GUI while it goes off to trawl your file heirarchy every time you change a letter in the find box

So I fixed it a bit. It is now threaded, and uses the linux locate command. This is still not ideal, it would be much better to use beagle. But I couldn’t figure out how to do that real quick, so locate it is (for now).

google-reader-iphone-sync

A small, cobbled-together tool which allows you to read your Google Reader feed items offline on your iPhone or iPod Touch.

[i made this!]

(view link)

HTML to PDF converter

Given the integration of PDF into Mac OS X, I was surprised to find that there didn’t seem to be any tool to convert HTML files into PDFs. So, like any frustrated coder I wrote my own little script to do it: html2pdf.py

Requires python and OSX 10.5 (Leopard). It uses a WebKit view for the rendering, so in theory it should work with any URL that safari can handle – but I haven’t exactly tested it thoroughly…

Trashy.app

In any OSX “document window”, there is a little icon representing the current document. If you click and hold this icon, it becomes a draggable alias for the file. You can then use that alias much as you would the file itself (as if you had dragged it from the finder) – but one thing you can’t do is delete the file by dropping it in the trash.

Trashy is a simple program to fix that. Put it in your dock, and it will send anything you drag onto it into the trash. Click here to download Trashy.

Here’s the entire source code applescript, if you’re curious (or just naturally suspicious of running random programs you found on internet, as you ought to be):

on open fileList
    tell application "Finder"
        repeat with f in fileList
            set n to 0
            repeat while class of f is alias file
                if n is less than 5 then
                    set n to n + 1
                    set f to original item of f
                end if
            end repeat
            move f to the trash
        end repeat
    end tell
end open

on run
    tell application "Finder" to open the trash
end run

MetaMonkey.app

[I made this]

A Lightweight Metadata manager for OSX, allowing you to easily tag and rate any type of file (which is then indexed by spotlight). This is basically my iPhoto replacement now, after spending a week trying to fix its broken database, orphan files, duplicates and all that rubbish. This is much simpler, and it can be used to tag any type of file I want.

This is the result of 2 days work, and just 400 lines of code. That’s pretty decent in my book, the combination of python and cocoa is a pretty powerful beast. Once you get past all the runtime errors and pyobjc bridge troubles, that is…

(view link)