Sunday 25 November 2012

A friend of mine found himself in the position of needing to write a CV and not having a text editor installed on the laptop they were using. Normally I would suggest that he use Google Docs Drive but another friend suggested that he use LaTeX to produce something professional looking.

This first friend is not a technical man so my initial reaction was that he would be rather averse to learning even the basic amount of LaTeX required to generate a CV using moderncv for example. But, I thought, he might not be so averse to learning the basics of Markdown necessary to write a CV in it; though I sincerely doubt he'd be willing to figure out the mess of pandoc, Makefiles, and LaTeX templates I use to generate my CV (purloined from http://mwhite.github.com/resume/).

To solve this I produced a simple web application that takes an uploaded Markdown file (in the correct format) and produces a rather nice looking CV out of it.

try it here

Monday 16 April 2012

Foxit iPad uploader

Get it here

I just found myself in the position of wanting to upload about twenty PDFs to an iPad via Foxit's http interface utility. As amazingly useful as this feature is it still only allows for one upload at a time.
Being a lazy bastard I thought I would automate this process.

The result is a tiny bash script that uses curl to submit files. It takes the URL (including port) of the iPad Foxit server and a list of pdfs to send.

I used it like so:
foxitUploader http://192.168.0.5:8888 nat??.pdf


The source is on Bitbucket as usual.

Saturday 14 April 2012

Nicer Forms for web.py

Get it here

So web.py has a form module. That form module produces forms that:

  1. Are in tables
  2. Have no form tags
To combat a I subclassed the Form object and wrote it a new render function.
As b had sensible reasons for not adding form tags (one might wish to use multiple form objects in a single form) I didn't add form tags to the render output, instead I created a new class that stores a list of forms and a dictionary of attributes, its render method then renders all of the forms in order and surrounds them with a form tag with the supplied attributes.

The code is available on Bitbucket as usual and could do with perhaps putting the forms in id'd divs so people can move them around with CSS.

Ideaspad

Source here - Use it here

I found myself putting all of my ideas (primarily for these itches) into a growing thread of emails to myself. To combat this I decided it would be prudent to create a quick web app to perform this task with a little more focus. The result was the (currently hideous) ideaspad (name subject to change). Ideaspad allows you to login with Google, add ideas, add extra information to ideas, track the state of an idea, and delete ideas (yeah it's pretty basic).

It's currently hosted at ideas.ninjalith.com and the source code is on Bitbucket (of course). Next steps are to clean up the interface and improve the forms etc.

Tuesday 10 April 2012

Messypaste

Source here - Use it here

A thingy I wrote whilst procrastinating. Currently hosted at mess.ninjalith.com.

From the readme:

MessyPaste is primarily a thing I threw together to get to grips with Google App Engine and web.py.
It's a write-once (like pastebin type sites) interlinkable (like wikis) url-keyed ... thingy.
It accepts markdown input and uses pygments to add syntax highlighting to code and MathJax to turn LaTeX formulae into display formulae.
Everything on mess.ninjalith.com is a mess except /source and /code which both display the currently running source code via python's inspect module.
As usual, the source is on Bitbucket. The next steps for this project would be adding a code editor rather than a simple textarea.

Update:
The edit page is now using Codemirror rather than a simple textarea and is generating previews when the user stops typing for a short time. Preview generation is done server-side to ensure they are exactly the same as what will be created.

My future intentions are now:

  • Rewrite the stylesheet to make use of responsive design
  • Use progressive enhancement to provide a minimal version to people without Javascript
I've also started using messypaste to write up my revision notes.
You can find the computer security ones here and yes: it's starting to look very much like a wiki.

Edinburgh University exam timetable scraper

Get it here

I wanted to quickly get all of my exams from the Uni's stupid timetable system into Google Calendar so I wrote this script which will scrape them and convert them to iCal format which can be read by any sensible calendar software.

The source is available at Bitbucket and could do with modularising so one could potentially extend it to scrape other unis' exams.

DownEm*

Get it here

I frequently found myself wanting to get all files matching a particular Regular Expression that were linked to from a particular page (such as all linked PDFs). Rather than doing the sensible thing and trying to find something that would do this for me I threw together a Python script and started using it.

If you find that this is a particular itch of yours and/or wish to contribute to the rather simple codebase: it can be found at Bitbucket and I'd rather like to stop using beautifulsoup and start getting links just with regex (so as to remove the library requirement)