How-to generate PDF from Markdown

Pandoc

The first tool you can use to convert a Markdown file to PDF is Pandoc.

To install Pandoc and all its dependencies on my Ubuntu 11.04, I used the following command:

$ aptitude install pandoc nbibtex texlive-latex-base texlive-latex-recommended texlive-latex-extra preview-latex-style dvipng texlive-fonts-recommended

Then I applied the PDF transformation on the README.md file from my openerp.buildout GitHub project:

$ wget https://raw.github.com/kdeldycke/openerp.buildout/master/README.md
$ markdown2pdf README.md -o readme-pandoc.pdf

The result is good, but not perfect. For example code blocks with long lines don’t break at the end of the page:

While trying to solve this issue, I stumble upon another tool…

Gimli

Gimli is an utility that was explicitly written with GitHub in mind.

Gimli is written in Ruby, so let’s install it the Ruby way:

$ aptitude install rubygems wkhtmltopdf
$ gem install gimli

Then we can convert our Markdown file to a PDF. The following will generate a README.pdf file in the current folder:

$ /var/lib/gems/1.8/bin/gimli -f ./README.md

The resulting PDF is really close to how GitHub renders Markdown content on its website. And it solve the bad code block style of Pandoc:

Burlesque Burglary music video released

Featured

I’ve just released my last video project: a music video for Burlesque Burglary by Cool Cavemen. Here is the official announcement on the band website, and here is the video:

It’s also the first time I produce subtitles, since I found out about Subtitle Composer last week, which is a great and simple subtitling software for KDE. This software was so good that I basically added subtitles to all Cool Cavemen’s video on YouTube over the week-end. BTW, if you want to contribute to this effort and offer us translation of lyrics and subtitles, send me an email and I’ll help you.

I’ll try to produce detailed production notes in an upcoming article. So don’t forget to subscribe to the RSS feed of that blog to not miss it ! :)

And finally, here are some stills from the video:

Reusing vintage footage for Cool Cavemen’s concert intro

Featured

The goal of that project was to illustrate a pre-recorded soundtrack. The latter being to Cool Cavemen what The Ecstasy of Gold is to Metallica: a piece that is played before each show and serve as concert intro.

It’s an original mockup of a radio broadcast, and a tribute to Classic 21 (ex “Radio 21″), the (best) Belgian radio station we used to listen to as teenagers, and still do.

Footage used to produce this video is public domain material found at archive.org. If you’re curious, the detailed list of all sources is available in the credits, at the end of the video.

As for my previous project, I have to warn you that it may not look as funny as for French-speaking audience. That being said, here is the final result:

The challenge of this project was to have video of people speaking in sync with the audio. I suffered a lot trying to make it as convincing as possible. If the final result is far from perfect, I find it to be believable enough for the amount of time I invested in.

As for the tools used to produce this video, I edited it in November with a development version of Kdenlive, under an Ubuntu 11.10. As usual, here is a screenshot of my timeline for reference:

The project is using Kdenlive’s “NTSC 29.97 fps” profile, which produce a 720×486 pixels stream with a pixel aspect ratio of 8/9 and a display aspect ratio of 4/3. I choose this profile as it was the closest to the original videos I downloaded from archive.org.

I composed the credits and title card in Gimp, and tried to mimic the style of that period. This mean approximative composition and abuse of typography:

To enhance the effect, I blurred everything and separated the text blocks in several layers. I then applied to each of them some random movements to add a parallax effect, thus getting closer to the look and feel produced by the imprecise optical process used in the early days of movie making.

Windows glitches

Using the holidays to tidy up my archives, I stumble upon old screenshots of Windows glitches I encountered when I was a student. Yes, the base platform at school was Windows, but it was 10 years ago (if this can constitute a valid excuse to not use Linux). Wait. What ? 10 years ago ? How time flies !

Anyway. Without further ado, let’s start this moment of pure nostalgia with a 1.74 Gb floppy disk:

This one was produced by repeatedly screenshoting the current screen in a Word document. I found it interesting because of the decaying pink color. I think this degradation was the result of cumulative color dithering or any other image compression artifact:

The last ones are not glitches per se but major UI issues. Here automated system upgrades triggered a modal window you weren’t able to close or dismiss, leaving you with no choice but reboot the machine and lose any unsaved work:

Auto-advance WordPress’ TwentyEleven showcase slides

WordPress default theme, TwentyEleven, has a built-in showcase mode that is displaying a set a slides (composed of sticky posts) at the top of a page. This mode can be activated by creating a static page and set its Template page attribute to Showcase Template.

The problem with this mode to me was the lack of an auto-advance feature that will cycle through the slides every X seconds. Luckily I found a way to automate implement this with some lines of JavaScript:

<script type="text/javascript" charset="utf-8">
    // Auto-advance the showcase slider
    // Source: http://pastebin.com/s6JEthVi
    jQuery(document).ready(function(){
        var change_every = 5; // The number of seconds that the slider will auto-advance in
        var current = 1;
        function auto_advance(){
            if(current == -1) return false;
            jQuery('.feature-slider a').eq(current % jQuery('.feature-slider a').length).trigger('click', [true]);
            current++;
        };
        setInterval(function(){auto_advance()}, change_every * 1000);
    });
</script>

All you have to do is to embed this snippet of code within your home page. It could either be in the static page you use as a showcase template or in a showcase widget. The latter is the exact same method I used earlier that year to customize CSS in WordPress without messing with the original code.

And of course this code is currently live at the front page of that very blog.

Increase Dropbox free capacity with Google AdWords

I started to use Dropbox 6 months ago at work, but I only use it for personal files since November. Now that I seamlessly integrated it on my Kubuntu thanks to Kfilebox, it quickly became clear that Dropbox will potentially be part of my everyday computer life. But before definitely integrate an external dependency to my workflow, I had to test Dropbox further, which requires me to go beyond the default 2Go account.

To maximize the free storage capacity of my account, I completed all the basic installation steps (earned me 250 Mb), then I connected my Dropbox account with Twitter to get 500 Mb. I could have got more free space if I had a Facebook account or was a student.

What’s left to enlarge your capacity is referrals. To speed up this process, and following the steps of others, I setup an AdWords campaign (all of this triggered by a post on Hacker News).

I only targeted the French audience because I feared the HN post would have temporarily inflated the cost of English keywords. Here are the daily stats of my campaign:

And here are the ads I created:

The paused ads above are those which didn’t invited the user to install the Dropbox desktop client. And the latter action is absolutely required to unlock the bonus capacity.

And if your interested in all the details involved, here is a keyword report.

At the end it costs me 31.77€ to get 8Go of additional Dropbox capacity trough referrals:

That’s not cheap, but was a fun hack and a great excuse to learn how to use Google AdWords. And next time I know what I’ll do with those AdWords coupons I regularly give away;)