Aberdeen Culture Hack

The July Aberdeen Culture hack saw a rare gathering of Aberdeens tech and creative folk to hack together for a weekend.

Kevin and Bruce - plotting!

I would normally tell a lengthy story about the weekend myself, but Kevin did such a good job that I’ll simply point you at that, and this article to get the scoop. There is also some video on youtube which gives a good feel for the day.

All I’ll add is that it’s great to see the council encouraging this kind of event, and supporting it with time and resources.

We’re thinking of running a follow up event, to further build on the app. If you’re interested in taking part drop me a line or jump onto the refresh aberdeen mailing list to make sure you hear about it.

Spreading the word

A number of people have told me that they didn’t hear about the hack until it was too late. At Refresh Aberdeen we’re looking at how we can help solve that problem – and use channels other than twitter to get the message out. If you have any thoughts / ideas – drop me a line.

As ever, if you have any questions you can find me on @stevenmilne and steve@refreshaberdeen.com.

Constraints Cards

So I just pushed Constraints Cards live on Kickstarter. This is my first kickstarter project, and it’s been great fun pulling it together. Head over and back it!

I thought I’d share a little of what I learned over the past 6 months pulling this together while it’s fresh in my mind.

1 – It’s been inherently good fun

I loved doing this.

I had a minor obsession towards the end of last year with figuring out how I think about problems. During one of the talks at Build 2012 I had an idea and quickly jotted out a few thoughts. Over the next week or so the idea formed more fully, I ordered some blank playing cards, and started prototyping.

Like most web folk I always have a handful of side projects on the go, some live, some die. I think this one was different because it involved atoms – not just bits.

I enjoyed the process of bringing Constraints to life. Designing layouts for a physical card, getting test decks printed, explaining how they work to folk, using them while I hack, it was all good hands on stuff.

As things got really busy at work, or as an event or other committment took priority the cards would be on pause for a week or two at a time, but it was always great fun to get back to them.

Kickstarter

Without the existence of kickstarter I don’t think I’d have progressed these at all. The financial risk of committing to a decent print run would be prohibitive. I’ve backed a number of projects on Kickstarter and generally been really happy with the results.

Working through creating a project in Kickstarter is a great way to help fully formulate your ideas. In some ways I wish I’d hit that ‘start your project’ button sooner.

2 – Video is impossible

The most challenging part of the kickstarter side of this project was the video. The one that went live at kickstarter was my eighth or ninth attempt. Not that you can tell, it’s still very much an “iPhone and iMovie” affair. Earlier versions were more ambitious. Ambitious but rubbish.

I don’t have a particularly ‘high energy’ voice, which I found really hard to get to grips with when doing the voice part. For some reason, although I give presentations all the time, I found the act of recording really difficult. I’m guessing this isn’t an uncommon experience.

Music was a huge time drain for me. I’m no muso, and I spent an age on the open music sites looking for a simple backing track. Eventually I just had to accept that I’m terrible at picking music. Having accepted this I chose no music. If I do another kickstarter project I’m getting in a music director! Seriously.

I’d have had this project live easily two months earlier if I had skipped the video. But I saw it as a big part of the whole kickstarter “thing”, and would have seen that as a bit of a fail. So – there’s a video, it’s not a great video, but it’s an honest video and it’s not as bad as the other seven or eight were.

3 – Finding the time is surprisingly easy

Between work, dad stuff, Refresh and other events, my week fills up pretty quick, but I’ve managed to get Constraints to this stage without taking away too much ‘quality’ time at weekends. The work has been mainly in the evening, or on the train, or getting feedback during lunch with guinea pigs. I should mention I hardly watch tv. Maybe a couple of hours a month.

A lot of that time has been obsessive tweaking of relatively minor issues. A lot of it was spent making bad videos, and re-recording voiceovers thinking I’ll magically start sounding less Eddie the Eagle and more Eddie Mair.

a pile of cards

4 – Physical stuff is really nice

Working in digital, and largely playing in digital since leaving Uni, I’ve never really produced a physical ‘thing’ like this. Playing with arduino and paper mache and cardboard ‘maker’ stuff with the boys is one thing, actually creating a new ‘thing’ is something else.

This was never about money – I worked hard on the quotes / shipping / other sums to make sure the kickstarter pretty much breaks even at the funded minimum.

This was about taking an idea from a sketch in my notebook through to something a reasonable number of people might use. It was also about avoiding too much compromise, and learning new things outside my usual comfort zone.

A web app could deliver the constraints principles efficiently without the need for a deck of cards and all the work that entails, but I genuinely believe the physical presence of the card, the act of shuffling and selecting a card, and of placing it in the stand all play into the point of the exercise. It all switches up your brain, makes it “do” something, hopefully freeing it somewhat from the regularity of the day.

Also, I just like shuffling cards. They feel nice.

5 – Feedback is invaluable

I owe thanks to a number of people, but in particular to Kevin, Ian, and Sean for taking the time to let me bounce the idea off them over the past few months – it’s really helped.

6 – Start smaller?

One last thought. I might have rather that I’d have tackled a smaller project before this one to try out the kickstarter approach. I likely would have, if I’d planned this more thoroughly.

The problem with that logic though, is that you have to run where your interest takes you. Would I have been willing to put everything into a smaller ‘B’ project? I don’t know.

If the kickstarter gets funded I get to make my thing. If it doesn’t then I get a blast of self doubt and failure.

Win – win!

You can see how the kickstarter campign is going over on the Constraints Cards page, you can follow constraints on twitter at @constraintscard.

As ever, if you have any questions you can find me on @stevenmilne and steve@refreshaberdeen.com.

Refresh Poll Results

Just over a week ago we put up a poll about possible events that Refresh Aberdeen could run in the coming season. Refresh hadn’t been as active or as social as usual for about 6 months, so it was time to get moving again.

The vote was really interesting, and we had four clear ‘winners’ with a majority of votes, and a number of also rans.

The results

We posted 10 ideas, this is the order they finished up in. You can see the pretty pseudobarchart at Refresh Aberdeen.

  • Talks Nights at PVA
  • Creative Code for Designers
  • After Work Meetup
  • Workshop Workshop
  • Web Retreat
  • JS Workshop
  • (unofficial) Kickstarter Jam
  • Pecha Kucha
  • 36 hour startup
  • Print for Web Designers

The highlighted ones got a markedly stronger response than the others. But it’s worth saying that most options got a big enough vote that if everyone who voted actually turned out, they’d be considered a success if we ran them.

What’s next

The plan from here is simple. Get on and organise this stuff as quickly as we can.

I’m particularly enthusiastic about the Workshop Workshop. In a ‘buy a man a fish’ sense I think this has the potential to really kickstart a whole programme of workshops in Aberdeen, largely led and delivered by locals. Hopefully it will act as a spur and a confidence giver to the community to start sharing knowledge.

I’m keen to talk to anyone who has experience in delivering workshops – be it coding, crafting, knitting or axe restoration. Especially if you’d be willing to share some of your knowledge with the Refresh crowd.

If you are interested in taking part please get in touch as well, particularly if there are topics you are thinking you’d like to deliver a workshop on. This will help me figure out the best shape for the Workshop Workshop. @stevenmilne and steve@refreshaberdeen.com are the best options.

Sponsorship

I’ll also be out looking for event sponsors. Sponsorship levels will be modest, but really help us put on this programme. If your company has a soul, put in a word for us and send them our way (or send me their way) to join the fine roster of sponsors we thank over on the Refresh site.

Aswell as updates here, Refresh also hs a presence on most networks. So follow / +1 / like / etc… to get our updates right in your feeds:

Refresh Aberdeen Democracy

We’ve had a slow start to the Refresh Aberdeen year, so to focus efforts on upcoming events I pushed out a poll last night asking for feedback on our ideas for the coming season. The results so far have been pretty interesting.

With one thing and another the start of the year has flown past and I’ve not been on top of organising as many events for Refresh Aberdeen as I’d like. Partly this has been down to pressures of work commitments, and partly to my work on constraints. Whatever the reason – this weekend is reboot weekend.

One of my favourite things about Refresh is that it has a really open brief. We’ve done code retreats, movie nights, talks at a gallery, pub meetups, javascript competitions, and even sparked a project or two.

I’m keen to keep this diversity alive, but want to avoid putting large chunks of time into organising events that there isn’t a demand for. So I thought I’d throw the ideas out to the community to see what goes down well.

Options options options

Options options option

So I knocked up a quick replacement homepage for refreshaberdeen.com, with a simple anon poll system. It’s tempting to ask people for their email / twitter etc… to litter the page in smiley avatars, but we’re interested in broad numbers, rather than profiling the group. I also think an anonymous poll is more likely to be genuine, as people don’t feel the need to be seen to ‘eat their vegetables’ by marking the more worthy events. We shall see.

Night Owls

I pushed out the first messages about the poll late on a Saturday evening, and saw a nice flow of votes through the rest of the night. The top runners were all new events we haven’t run before. Creative code, Kickstarter Jam and 36 Hour Startup did notably well.

Does that suggest that those voting on a Saturday night are the workaholic entrepreneurs still at their keyboards, but with a secret hankering to learn Processing?

Early Birds

The vote switched around quite a bit on Sunday morning. As I write this the PVA Talks Nights, and the After Work Meetups are string favourites among this mornings voters – although the creative code is also doing really well.

Presumably these more socially focussed folk were too busy to vote last night, preoccupied with being all sociable.

Meetup

Once we have a good number of votes the plan is to have an after work informal meetup in town in late May or early June. This will be an opportunity to discuss the ideas, gather teams to organise each of the top ones, and start planning the calendar in some more detail. Mainly though, it’ll be a chance to catch up with folk, so everyone is welcome. You won’t get strong armed into volunteering!

As ever, I’d appreciate it if you spread the word about the poll. Anyone in the creative / digital / web space should find something to love in the Refresh Aberdeen calendar, so send them over to RefreshAberdeen.com.

We also have a presence on most of those social network things. So follow / +1 / like / etc… to get our updates in your feeds:

Global Service Jam Aberdeen

This past weekend was exhausting but incredibly good fun. A weekend of problem solving, research, prototyping, video making, and working with new people.

The Global Service Jam is a global event applying product design principles to service design (please don’t shoot me for that description service design fundies! ;).

To get the best feel for what went on head over to the archive site where a stream of progress reports from the teams gives you a genuine feel for the amount of effort everyone put in.

Here are a few thoughts and observations from the weekend though:

Setting up

Getting ready for the service jam was good fun. As one of the organisers I had to ensure that the participants had a good weekend, knew what was going on at all times, had something to eat / drink etc…

Beer and Jam

The Basecamp set up by the GSJ team globally made this pretty easy (if reading dozens of messages a day for weeks in the runup sounds easy). The one thing I’m ashamed we forgot was simple A4 paper. We had lashings of worksheets and posters and post its, a mountain of stattys. We even had branded JAM! But no A4 paper.

Experts corner

For ‘experts corner’ we had a number of tools, books, worksheets and lego for participants to use. You could turn up with nothing and take part fully. The event was free thanks to our sponsors, I think it’s important that events like these should be as non exclusive as possible.

Kick off

Once the theme is announced on the Friday evening all participants start throwing post its around. Issues, problems, areas, anything that springs to mind based on the theme.

Post It Wall

Once we had the massive window nicely covered in scrawled sticky notes we had to form some more concrete ideas around these concepts. This was a fun, interesting session where the most unrelated post-its imaginable seemed to lead directly to what looked like good ideas.

Feedback

One of the most powerful aspects of the GSJ format is the inclusion of regular feedback and validation points. At these points you are incouraged (and if it comes to it, forced!) out onto the street to ask the public what they think of your ideas, your assumptions, and your approach.

Now, it has to be said, Aberdeen isn’t the easiest place to do this. Approachability, friendliness and generosity with time are not the first bullet points on the wikipedia page for our city. That said, all teams managed to get some genuine feedback from the street – and social media proved fruitful in seeking wider opinion.

Cook a cow

The value of validation feedback cannot be overstated. By the end of Saturday morning more than one idea had been disproven, discarded, and the team returned to the drawing board. The process and guidance of the GSJ format ensured that ‘negative’ feedback was turned into ‘positive’ evidence that the team needed to rethink.

Prototyping

Another key concept of the service jam is that a prototype is worth a thousand words. Get building. More making, less talking.

On the first day we had lego models, example marketing campaigns, food containers, wearable devices all helping to bring the service some shape and make it more real to everyone. This is much more than a gimmick. As soon as you have a model, you have photography of the model, as soon as you have photography you can describe the concept more easily. You can video the model / prototype while explaining the function.

Cook club model

The speed with which Youtube Channels and Facebook Pages can be created really helped to bring the projects to life. An idea which hits the wall on a post-it note at 10am can have photography and video content by noon, and have survey responses coming in while you lunch. The feedback loop really can be that quick – all the teams made use of these channels to some extent.

Tools

Among the other tools available to the teams were more ‘traditional’ service design tools like the business model canvas, stakeholder analysis, user profiling etc… These were well used, even though most participants hadn’t used them before.

Tatties

We had pre-printed sheets for many of these, which really helped. When a team got stuck you could just say ‘here – complete this’ and talk them through the tool. The value often came in the first 2 minutes of thinking about the problem from a new viewpoint.

Production Values

We had a number of iPhones and an HD camcorder available throughout the weekend so something in the region of 50 videos were shot. Most of these were simple status updates which I forced the teams to make at set times through the weekend. This made sure that the teams slowly got used to having a camera pointed at them, which meant that over time they started making their own videos. Some of the creativity in the videos was remarkable.

Another side effect of the quick, single take, ‘just tell us where you are’ style of the videos was to make poeople think about content, not production values. Grab prototype, find a quiet space, point the camera, have a 2 minute discussion about what needs to be said, 3, 2, 1, shoot.

Cook Club Demo

If we’d started making second attempts at updates I’m sure we would have ended up with a third as many videos, and I’m sure we wouldn’t have got across the ideas nearly so well.

Saying that – some teams took the videos pretty seriously.

Team Dirty Tatties

Again?

The measure of success of an event like this, for me, is whether I feel that the investment in time was repaid to the extent that I’d do it again. Before the weekend was out we were discussing things we could do to make next year better – and I’m still enthused. I fully intend to make sure that GSJAberdeen 2014 is bigger and better.

Some ideas for things to do next time:

  • Have participants warn their friends and family that they might need some feedback over the weekend, and that they might need their wider networks feedback. I think this may have helped us to spread some of the polls more quickly.
  • Pre-create a shared facebook page where all participants can share validation questions – so other Jam cities could give feedback.
  • Work harder to explain the event before hand – quite a number of people have told me they would have loved the day but they thought it was something else (entirely my fault!).
  • Live blog. I wish I’d been more prepared to live blog the event.
  • Bring A4 paper.

Webretreat

This weekend sees the first webretreat, something I’ve been working on for about 6 months on and off. I thought I’d share some thoughts on how webretreat came about, and what it is.

Web development is a baby when compared to almost any other profession. Most of us won’t have a formal qualification in ‘web’, and we come from diverse backgrounds. Last month, surrounded by 5 web designer/developers I counted 2 arts grads, a chemist, a neuroscientist, a lawyer (dropped out in 3rd year) and a ‘not telling’. Diverse.

We are all designers

From here on in I’ll refer to all of us as web designers. The whole front end / back end / designer / developer distinction is distracting and not particularly useful. We all need to work in pixels, we all need javascript, html and css. We also all need planning skills, the ability to interpret a brief, the ability to respond to changing requirements. We need to design. To design solutions to problems.

I’ve been involved in running a couple of coderetreats, and although coderetreat would prove valuable to any webdesigner, I found that many were reluctant to attend. This was mainly ascribed to a feeling that it ‘wasn’t for web folk’, that it was ‘too hardcore’, or that it just wasn’t ‘relevent’.

So I started working on a ‘webretreat’ format to give the benefits of coderetreat to web designers. With help from Kevin and Ian I think we’ve come up with a format that works really well.

We can all be better designers

Webretreat aims to give a framework for web designers to practice their craft. We all need to practice. Depending on your background and your working environment you may never get time to refactor, to consider reusability, to pair program or to consider (let alone write) tests.

You may use source control, you may have a standard development environment, but equally you may not. In either case there is room for improvement. There always is. It’s no coincidence that the best in any endeavour practice the most.

Front end focus

The focus of webretreat is on the front end, browser side technologies. Some of the challenges are simplified or made more interesting if you choose to use some server side code – but all can be successfully completed using only browser side code. I feel that the front end is increasingly at the heart of web design, and it’s easy to dismiss as ‘just’ the front end.

Webretreat also focusses on core techniques. Some of these are integral and likely universally well established – like well structured CSS, validating HTML, semantic markup. Some see really mixed adoption in real world front end work – source control, versioning, refactoring, reuse, deployments, test driven development, style guides, automated testing, rwd techniques… So at webretreat you may be improving something you do every day, or find yourself thinking about a new aspect of the job.

Structure

A webretreat follows a structure that will be familiar to anyone who has attended a coderetreat:

  • All day event, usually on a weekend
  • Free, supported by sponsors
  • 45-minute programming sessions
  • pair programming
  • after each iteration you throw away your code and switch partners
  • after each iteration each pair shares something about what they thought, what they learned
  • lunch is delicious
  • at the end of the day everyone gathers together in a circle, and shares something about the day
  • to the pub

Share, Learn

A core aspect of this which will be new to many web designers will be pair programming.

In pair programming two designers share a single computer for the 45 minute session. One drives, taking the keyboard. The other observes, making observations and suggestions but not actually typing.

The perspective gained from being the driver or observer can be surprising and rewarding. It also gives you ‘quality time’ with a wide selection of web designers.

Experiment

Webretreat is an experiment, and we really need your feedback.

If you are attending on Saturday please look out for the survey I’ll issue after the event. Also, please grab me on the day and let me know what you think. The objective is to create a useful format, not to convince you that we got it right first time, and feedback is critical towards that goal.

If you’re not coming on Saturday please still get in touch, I’m keen to take as many soundings as I can to help get this right. I’m already planning the second run out in the new year.

I’ll post a follow up once the event is out of the way. Wish us luck, and keep up on twitter and on the webretreat website.

Refresh Aberdeen one year on

I’ve been thinking a lot about community recently. About a year ago I returned from Build ‘11 with an urge to reboot the web community in Aberdeen. Bringing Refresh to Aberdeen seemed like a worthy goal for 2012. A few conversations and a bit of web design later we had a small team and a plan in place.

We announced Refresh in January, and have held a number of great events through the year. We’ve got a second Code Retreat coming up in December, and some exciting work in progress on the 2013 version of Refresh. Currently I’m knee deep in the new website build.

90-9-1

At the Northern Lights conf I was reminded of the 90-9-1 rule. In essence this states that 1% of a community make things happen, 9% contribute to those things occasionally, and 90% observe / consume.

To improve the activity of a community the 1% should focus on bringing some of the 9% into the 1% fold. This increases the amount of energy being spent making things happen – with clear benefits to the community as a whole.

One of the challenges with Refresh has been in quantifying the extent of the community. Judging by the number of people who turn up for our events the community likely numbers around 150. Judging by the numbers following Refresh on Twitter / Facebook the number is closer to 300. I suspect the real number is higher.

So how am I defining ‘the community’?. Who is Refresh for?

Refresh Manifesto

The Refreshing Cities movement has a very clear set of objectives. From the Refreshing Cities website:

Refresh is a community of designers and developers working to refresh the creative, technical, and professional culture of New Media endeavors in their areas. Promoting design, technology, usability, and standards.

The Refresh Manifesto

  • Let’s gather great minds
  • Let’s share all of our knowledge
  • Let’s all grow and learn
  • Let’s promote local talent
  • Let’s be more than we think can be
  • Let’s make our cities better

So, it’s people working in or interested in digital, creative, web. It’s ambitious, aiming to elevate the individual and the community. It’s opinionated, aiming to promote growth, learning and standards.

It feels like more than 300 people in the city probably care about this stuff.

Increase participation?

Firstly, should we be trying to increase participation? I think we should. There is an argument that you shouldn’t persuade people to take part – that if the passion is there then they will come forward.

I don’t buy this.

Exclusivity has a price, and the price is exclusion. Events like Refresh should offer a low barrier to entry to avoid exclusion. A very low barrier to entry. Our events are free, they are usually central, and usually unticketed. The only exception so far has been the coderetreat – because these have been oversubscribed and it would be impractical to try and accomodate unknown numbers. But you can’t force people to take part. You can only present the material.

Increase activities

Rather than focus on increasing the numbers in the broad community – we should focus on enabling the 9% to join the 1%. Anyone in the 9% with an idea should have an easy route to propose the idea, and get the wider community behind them to make it happen.

This route is available today, and it’s simple. Talk to me. Talk to me, or to Ian, or to Kevin. Post something on the Facebook. Tweet @refreshaberdeen. Let us know and we’ll help. Seriously. We love this stuff. Even stupid ideas – especially stupid ideas.

So that’s my focus for the year ahead with Refresh – help folk do stuff – to broaden and improve the Refresh Aberdeen calendar. Forget about numbers, focus on activities. If the activities and content are strong, people will join the 90, the 9 and the 1 percent.

Instagram to Statamic

One of the things I’ve been interested in for the past while is ownership over the content I create as I go around the internets.

The most obvious content is blog posts like this one. Which is why I moved from posterous to Statamic. My content now resides in my dropbox as flat text files. Lovely.

My name is Steven and I am an Instagram user

Instagram

The next focus for me was my photos. Instagram is fun. It’s a guilty pleasure.

I don’t like all those photos existing only on Instagram. I can’t easily give you a link to ‘my instagram stuff’. It’s a weird experience. I want to own that stuff and do what I want with it.

Enter IFTTT.com

Instagram

IFTTT makes it super easy to grab an instagram shot. IFTTT stands for ‘if this then that’. So If I post an instagram shot then grab a copy and put it in my dropbox. Easy.

So I have the file, but how to pull that into my blog? Step one – repoint my ifttt.com recipe to drop them into my Assets folder in my Statamic filespace. I now have the image in the right place.

But Statamic uses markdown files to control the presentation of content. Having the image is fine – but I now need an .md file with some meta in the header, and ideally an image tag, the caption and a link to the original on Instagram.

The recipes

So let’s look at the recipes at IFTTT. We need two recipes. One for the image, and one for the statamic markdown file.

Photo ( ifttt recipe )

The first step was to make sure that the filename that was saved to my dropbox was unique. I might take ten photos a day titled “coffee” or “clouds” so the caption was no use. The created date includes a timestamp – so that’s likely unique. “CreatedAt” in IFTTT language.

Statamic markdown ( ifttt recipe )

The second step is to create our markdown file. This uses the ‘create text file in dropbox’ option in IFTTT. We’ll make sure again that our filenames are unique – but this time we’d like them to also be human readable – so I use CreatedAt-Caption to have the unique date and the simple name. We can’t set the extension, as unfortunately IFTTT only creates .txt files – we’ll come back to that later.

So the content field should contain something like this:

---< br >
title: '{ {Caption} }'< br >
categories:< br >
  - instagram< br >
---< br >
![{ {Caption} }](/assets/ifttt/instagram/own/{ {CreatedAt} }.jpg)< br >
Taken at { {CreatedAt} } < br >
[view on instagram]({ {Url} }) 

The title just takes the caption that you gave your photo. If you don’t give your photo a title this will be empty so make sure your templates have a default / other handler.

I’ve added an instagram category – as I’m repeating this process across other sites, so it’s nice to categorise.

The markdown image markup is simple – and uses the CreatedAt again for the URL. Now – this comes through with spaces in this instance, which is different from the URL created for the image. We’ll come to handling that later.

Finally on the IFTTT side of things, the < br > tags are converted into linebreaks in the text file. Without the < br > you’d get a single line text file – which Statamic would choke on as whitespace / newlines are important to the parser.

Version One

So with these two recipes running we end up with these two files:

/_content/stream/october 16, 2012 at 10:31pm batman test.txt
/assets/ifttt/instagram/own/October 16, 2012 at 10:31PM.jpg

So we have an obvious annoyances there. Filenames with spaces, commas and colons are not filenames I can make friends with, and Statamic won’t like targetting them.

I chose to clean this up using a couple of simple bash scripts that I can run as part of my deploy step (I publish by pushing to the server using git, so I can easily just run a couple of bash scripts before I commit).

This script is pretty long hand while I figure out the best way to shape the IFTTT process – there are neater ways to do this in less lines – but this makes it clear what’s going on.

# simple script to rename files created by ifttt.com and
# sent to dropbox. Need to clean spaces commas and colons
# from auto jpg names

# remove spaces and replace with -
for file in *.jpg
do
  mv "$file" "${file// /}"
done

# remove commas and replace with -
for file in *.jpg
do
  mv "$file" "${file//,/-}"
done

# remove colons and replace with -
for file in *.jpg
do
  mv "$file" "${file//:/-}"
done

This script above reformats the filenames nicely just by stripping out stuff we don’t need. This is run in the images directory.

# simple script to rename files created by ifttt.com and
# sent to dropbox. Need to change .txt to .md and replace
# spaces with dashes to get them ready for statamic use

# remove spaces and replace with -
for file in *.txt
do
  mv "$file" "${file// /-}"
done

# change extension from txt to md
for file in *.txt
do
 mv "$file" "$(date +%F)-${file/txt/}md"
done

This one is a bit simpler and runs on the content directory. I’m not overly worried about the , and : in the markdown filenames. I replace the spaces with a – to maintain some legibility. I prepend a YYYY-MM-DD formatted datestamp to the filename, and replace the .txt extension with the .md extension that Statamic demands. (Note – this assumes you are running your updates on a schedule at least once a day – otherwise you’d need to base the YYY-MM-DD stamp on the date of the file.)

Version Two

So with these two shell scripts fixing things up we get there new filenames:

/_content/stream/2012-10-16-october-16,-2012-at-10:31pm-batman-test.md
/assets/ifttt/instagram/own/October16-2012at10-31PM.jpg

This gives us a working entry in the blog. But the image link is broken, and the categories don’t work, but the entry appears in the right place. Let’s look at part of that .md file:

---
title: 'Batman test'
categories:
- instagram
---
![Batman test](/assets/ifttt/instagram/own/October 16, 2012 at 10:31.jpg) 

So there are two problems here.

IFTTT ignores our request for whitespace ahead of the “- instagram”. Without that indentation this isn’t recognised by Statamic. Quite rightly not recognised – the whitespace is important. We’ll need to slot that back in somehow.

The second thing is the spaces in the image filename. These are a pain. There are no fields we can use in IFTTT that give the same string for a filename and in the content of the text file. An option to allow that would save SO much time as we wouldn’t have to do any work to fix our image URLs. Even a numeric timestamp / uid would suffice.

Version Three

A wee bit of text manipulation within the file is all that’s needed. That’s for another post though…

Moving this site to statamic

My blog has been hosted on Posterous for quite some time. I decided to move it when Twitter bought Posterous. I finally have. I thought it worth documenting my reasoning and motivations for future reference.

Why move from Posterous?

The acquihire by Twitter meant, should twitter chatter be believed, that further work on Posterous was pretty much cancelled. The team were ‘excited to be working on Twitter’, rather than ‘excited about making Posterous even better as part of the Twitter empire’. Bye bye Posterous.

Painful escape

Moving your blog away from Posterous is pretty painful. Posterous doesn’t offer ANY export options. So the accepted mechanism is to write something yourself using their API, use the pretty decent WordPress importer, or use a paid service like export my posts.

I chose the WP route. A quick install of WP, run the Posterous importer, then run the exporter. I now have a nice directory of assets and a big wp.xml file. If I was planning to host on WordPress I had now moved – apart from some minor nasties with formatting, and file paths.

There is one more step to getting your code into Statamic – see below.

Why not WordPress?

Some of the content on my Posterous had been imported from a previous WP blog. I moved from WordPress for a few reasons. I grew frustrated by the knitting in boxing gloves feeling you get working with WP themes. The updates were a pain with the way I had my hosting setup. And Posterous was ‘the new hotness’. Who could resist.

I had some pretty specific requirements on my wish list:

  • ExpressionEngine level template / channel flexibility
  • Deploy through git
  • Content in files
  • Portability
  • Lamp

No DB wasn’t on the list, but demanding content to be in file format pretty much dictated this. Open source wasn’t on the list either. As long as I have my content in files, including assets and meta data, I can port them to a new system. It’s half of the fun.

This was the main driver in moving, and the over-riding reason I didn’t opt for ExpressionEngine, a system I know pretty much inside out by now. Ownership over the content, postability, and the control over all aspects of the site were absolute requirements.

Statamic

Statamic

There are quite a few options on a Ruby stack that satisfy my needs – but on Lamp things are pretty restricted. Statamic is a great fit for me though. It has a control panel that I don’t really use, but other than that everything is driven from the content files.

Here is an example of a VERY simple content file:

---
listing_image:
title: Move to statamic
categories:
  - code
  - stream

featured: no
author: Admin
 
---

##title

This is a tweet length blog post. Adorable. 

As you can see, categories are set up right there. If that was the first use of the category ‘example’ it will add it to the navigation. No ‘categories’ section to set up. Just fire it in there. The post body can mix markdown and html – so my old posts from Posterous are all still stored as HTML. I can change that if I want – but for now it works just fine.

Templates

Templates use a combination of layouts, templates and partials to pull together your pages. The syntax is simple:

{ { entries:listing folder=”blog” limit=”10” } }

 
{ { if no_results } }

{ { no_results_text } }

{ { else } }

{ { title } }

{ { content } } { { endif } } </div> { { /entries:listing } }

Routing is based on the content filenames. Everything just works as you would expect, and you have flexibility to split content into channels, streams etc… easily.

Statamic import

There isn’t an ‘import’ as such, but the PHP file in this gist does a great job of tearing that wordpress.xml file into individual markdown files with a basic meta header. It missed a few meta things for me, but nothing I didn’t want to re-address in any case. Your mileage may vary.

Backup and Deployments

This is the best bit. With Posterous if the service disappeared then so did my blog. Nae luck.

Now I deploy through git to my server, so I have full change history for rolling back changes, checking when I updated stuff, and can switch branches to try out new themes etc…

I also keep my local copy running on MAMP for a local fully working copy of the site. I also keep it in dropbox, so it’s on a bunch of machines at any one time.

So I now have a small directory with a bunch of text files which I can punt around as I see fit. If Statamic goes evil, and I’ve no reason to believe that it will, I can write a wee script to tear through those text files and reformat my meta data to suit another engine pretty quickly.

Next

So I’m pretty happy with the new setup. I really haven’t found anything that Statamic doesn’t let me do. I’ll update this if I do. It only took a couple of evenings to get this far – half of that was building a theme and learning the principles. A lot of the rest of the time was just hand tidying the exported files.

It’s worth mentioning that Statamic is paid software. As this is a personal site I get away with the $19 licence.

The next job is to get my other ‘stuff’ into this repo. So when I tweet / app.net / instagram etc… I either originate it here and syndicate out, or syndicate it back into here to keep an archive copy that I own.

Wish me luck…