Compiling the Summaries

The original set of Episode Summaries were compiled on a spreadsheet, mainly because it's a relatively easy input format. However, the spreadsheet design was rather clunky, and being hosted on Google Docs, wasn't that easy to access.

This Wiki uses a combination of templates to produce the signficantly more visually appealing multi-coloured table. However, even though the process of converting spreadsheet data to wiki data is semi-automated, it still requires additional steps. So here's the process I'm going through to convert them: For reference, here's the relevant perl script:
 * 1) The original spreadsheet has been rearranged and exported to LibreOffice Calc - it's easier to work with an offline document.
 * 2) As the Wiki uses batches of 100, the spreadsheet I use has three sheets: Pending (episodes which haven't been processed), Done (episodes which have been processed), and Doing (the current batch of 100).
 * 3) Part descriptions, titles and subtitles are added if missing from the headers of the original episodes. Some also have a short quote at top which can be used in the 'Quote' section. However, due to the quirks of LibreOffice, the copied quote has to be sent via a text editor to remove line breaks and temporarily replace quote marks (Find ", Replace with #). Once pasted into the spreadsheet, the substituted quote marks are replaced.
 * 4) Once a batch of 100 have been completed, I export to csv - however, as quotes / summaries can contain commas, these have to be globally substituted first to avoid confusing the processing script.
 * 5) The csv is then run through a short perl script to convert it into wiki format.
 * 6) A shell script is then run to add the header and footer.
 * 7) The resulting text file is opened up in a text editor and several global find / replace operations are done to remove the quotation marks around text fields (while keeping the quotation marks surrounding quotes), replace the commas, and add spaces to long runs of text in short fields (e.g. part descriptions) to allow wrapping.
 * 8) A new wiki page is created, and the text pasted in.
 * 9) Once published, the page may require further tweaking (in source view) if any text is causing the table to expand horizontally.
 * 10) The final Wiki step is to add the Category "Episodes" to indicate completion.
 * 11) Back in the spreadsheet, the block of 100 episodes is moved to the bottom of the Done tab, and another batch of 100 moved from Pending to Doing.

open IN, "<", "bike2wiki.csv"; open OUT, ">", "b2w.txt"; while (defined(my $line = )) { chomp ($line); my ($episode, $part, $date, $title, $subtitle, $significant, $quotes, $events) = split /,/, $line; print OUT "\n"; }          close IN; close OUT; The header is stored in a file called top.txt and the footer in a file called tail.txt; the shell script merely joins the three together:
 * 1) !/usr/bin/perl

cat top.txt b2w.txt tail.txt > wikified.txt
 * 1) !/bin/bash