A British Court Bans a TV Broadcast

BBC lawyers consider formal appeal over court ban on riots drama | Media | guardian.co.uk.

The most chilling thing about this is not so much banning the broadcast; there could conceivably be a legitimate reason for that, though it’s hard to imagine a good one. Rather it is this:

For legal reasons, the Guardian cannot name the judge who made the ruling, the court in which he is sitting or the case he is presiding over.

This meta-blocking smacks of the "superinjunctions" that we heard a lot about a few years back (but which strangely seem to have dropped out of sight recently).

Tip: using Pandoc to create truly standalone HTML files

If you’re using the excellent Pandoc to convert between different document formats, and you:

  • want your final output to be in HTML;
  • want the HTML to be styled with CSS;
  • and want the HTML document to be truly standalone;

then read on.

The most common approach with Pandoc is, I think, to write in Markdown, and then convert the output to RTF, PDF or HTML. There are all sorts of more advanced options too; but here we are only concerned with HTML.

The pandoc command has an option which allows you to style the resulting HTML with CSS. Example 3 in the User’s Guide shows how you do this, with the -c option. The example also uses the -s option, which means that we are creating a standalone HTML document, as distinct from a fragment that is to be embedded in another document. The full command is:

pandoc -s -S --toc -c pandoc.css -A footer.html README -o example3.html

If you inspect the generated HTML file after running this, you will see it contains a line like this:

<link rel="stylesheet" href="pandoc.css" type="text/css">

That links to the CSS stylesheet, keeping the formatting information separate from the content. Very good practice if you’re publishing a document on the web.

But what about that “standalone” idea that you expressed with the -s option? What that does is make sure that the HTML is a complete document, beginning with a DOCTYPE tag, an <html> tag, and so on. But if, for example, you have to email the document you just created, or upload it to your company’s document store, then things fall apart. When your reader opens it, they’ll see what you wrote, all right; but it won’t be styled the way you wanted it. Because that pandoc.css file with the styling is back on your machine, in the same directory as the original Markdown file.

What you really want is to use embedded CSS; you want the content of pandoc.css to be included along with the prose you wrote in your HTML file.

Luckily HTML supports that, and Pandoc provides a way to make it all happen: the -H option, or using its long form, –include-in-header=FILE

First you’ll have to make sure that your pandoc.css file1 starts and ends with HTML <style> tags, so it should look something like this:

<style type="text/css">
body {
    margin: auto;
    padding-right: 1em;
    padding-left: 1em;
    max-width: 44em; 
    border-left: 1px solid black;
    border-right: 1px solid black;
    color: black;
    font-family: Verdana, sans-serif;
    font-size: 100%;
    line-height: 140%;
    color: #333; 
}
</style>

Then run the pandoc command like this:

pandoc -s -S --toc -H pandoc.css -A footer.html README -o example3.html

and you’re done. A fully standalone HTML document.


  1. It doesn’t have to be called that, by the way.

Bash - how to recursively find the latest modified file in a directory

Recursively finding the latest modified file in a directory.

From the mighty Stack Overflow, some useful tips on using find with dates.

Weekend Warblers

Hackney Weekend: the main stage

The Radio 1 Hackney Weekend festival was fabulously well organised, loads of fun, and passed off with only three arrests.1 Booking the tickets a month or two ago had turned out to be easy (we sat with multiple browsers and phones as the SeeTickets site crumpled, but in fact it was no trouble at all after we left it for a while). Being local residents helped, as half the tickets were for Hackney households.

It was a free show, so there were restrictions; most notably that you could only book for one of the two days, and only two tickets per person. We were doing it for the kids; and the kids in this family (to say nothing of most of their friends) favoured the Sunday lineup; so that’s the one we went for.

The lineup leaned heavily to the various dance subgenres: (modern) R&B, dubstep, and so on. Not forgetting hip-hop, of course; not only did Jay-Z headline the first night, he guested with Rihanna on the second.

Hackney Weekend: Jessie J on the main stage

For me the highlight of the day was Jessie J; though I was mildly disappointed that she censored herself in my favourite of her songs, ‘Do it Like a Dude’.2

Tinie Tempah was also good, though since I’ve subsequently been listening to Enter Shikari, I’m slightly disappointed to have missed them as they clashed with Tinie.

There was great secrecy and much speculation over who the “Special Guest” was to be. They managed to keep it hidden until the day, which, while impressive in its way, had me worried. I thought that, depending on who it was, there could be a disaster. In particular, if it had been Justin Bieber, as some kids were speculating, there would have been a vast, simultaneous, two-way flow, from and to the stage (my kids would have been running away from the stage; there are no Beliebers at Devilgate Towers).

Not long before the guest’s time I heard on good authority that it was going to be Beyoncé. Believable, as her hubbie was there, and she was said to be “in the house”. But I doubted it: isn’t she a bigger name than Rihanna? And anyway, I get the sense that she’d be too much of a diva to go on second on the bill.

Anyway, in the end it was Dizzee Rascal, which with hindsight made total sense, what with him being a local boy and all.

Hackney Weekend: colourful flags

As we wandered through the stages and the day, we heard snatches of Rihanna’s ‘We Found Love’ seven times (I started keeping count at the third) from various between-act DJs and stalls. So by the time it closed the night, I was thoroughly ready to hear it properly. And a damn fine ending it was, too (though the fireworks were a tad tame).

I was hugely impressed with the organisation of the thing. We got there nice and early, and there was hardly any queueing, despite the airport-style security. The staff were all lovely and friendly, and – get this – there was hardly ever a queue for the toilets!

I would strongly support any moves to make it a regular thing. Radio 1’s event moves around the country, so it couldn’t stay free, but I could easily see it working as a commercial festival in the future.


  1. I have it on the authority of a Hackney police officer. ↩︎

  2. Hint: “Dirty dirty dirty dirty dirty dirty sucker” doesn’t rhyme with “D’you think I can get hurt by you, you [puts finger on lips]”. ↩︎

Cud at The Garage

Surely Cud approaching…

Echotape supporting Cud at The Garage.

The stage awaits Echotape. At The Garage.

Sheen supporting Cud at The Garage

Moving desks today