How to split a multi-person vCard into individual vCards

Decembro 4, 2014

It seems that Microsoft Outlook still struggles to import multi-person vCard files. It can, though, import a batch of smaller files with one contact in each file. <sigh>

(Apparently you can import such a file into Windows Contact Manager, and then export your contacts from there to Outlook, so that might work for you. Let me know how you get on.)

If you want to help your users to avoid jumping through so many hoops though, you might want to split your multi-person vCard into individual files yourself, so here’s an AWK script to do it.

tl;dr:

~$ awk ‘BEGIN {x=”F0.vcf”} /BEGIN:VCARD/ {close(x);x=”F”++i”.vcf”} {print > x;}’ multi_person_vCard.vcf

…where multi_person_vCard.vcf is the name of the file you want to split up. The script will create a series of files called F1.vcf, F2.vcf, F3.vcf, etc., with one contact in each file. These can be imported directly into Outlook.

NB The script is a “quick and dirty” solution, and will overwrite any existing files named F1.vcf, F2.vcf, etc., so be careful of this if you use it regularly.

Kartoj Kontraŭ Esperantujo

Februaro 5, 2014

REDAKTO: vi povas nun kontribui viajn ideojn por novaj kartoj, aŭ eĉ komisii al mi kreon de nove presita ekzemplero por vi kontraŭ harstarige alta monsumo.

Mi ĵus kreis esperantlingvan version de la iom furora kartludo Cards Against Humanity, kiun mi nomis Kartoj Kontraŭ Esperantujo. La origina ludo aĉeteblas, sed estas ankaŭ disponebla sub permesilo de Creative Commons. Tio signifas, ke iu ajn rajtas mem adapti, presi kaj reeldoni la ludon. Do jen tutsimple la elŝuteblaj dosieroj, por ke vi povu represi mian laboron. Ĝuu!

REDAKTO 2016-05-18: ĝis nun ekzistas kvar kartaroj, laŭ mia scio — tri produktitaj de mi, kaj unu elŝutita kaj presita de amiko. Ĝi ŝajne estas tre populara ludo en diversaj (ĉefe eŭropaj) aranĝoj.

HISTORIO: 2014-02-17: versio 1.01; korektis tajperarojn, aldonis forgesitan karton 2014-03-02: versio 1.02; korektis tajperarojn 2014-04-02: versio 1.03; korektis tajperarojn, aldonis kelkajn kartojn

Kartoj Kontraŭ Esperantujo — demandoj

Kartoj Kontraŭ Esperantujo — demandoj

Kartoj Kontraŭ Esperantujo — respondoj

Kartoj Kontraŭ Esperantujo — respondoj

Por plibeligi la presitajn kartojn, vi povus presi ankaŭ la dorsan flankon:

Se vi ŝatus ankaŭ adapti la ludon antaŭ la presado, vi bezonos la ĉi-subajn dosierojn:

Vi povas ankaŭ legi la regulojn de la ludo. Se vi volas ankaŭ fabriki skatolon, vi povas sekvi la instrukciojn kaj elŝuti la du presaĵojn por la ekstero (la A3-folion kaj la A4-folion).

la ludo en sia skatolo

la ludo en sia skatolo

Cards Against Humanity — make your own

Februaro 5, 2014

Cards Against Humanity is a game that describes itself as being “as despicable and awkward as you and your friends”. It’s rather wonderful for several reasons: first up, it appeals greatly to my sense of humour. But the creators chose to release the game under a Creative Commons licence — yay for them! — which means that other people are allowed to take the source material of the game, adapt it, translate it, and produce their own version.

And so I did — an Esperanto version of Cards Against Humanity. Enjoy!

This blog post, though, is aimed at others who want to produce their own variants of the game. It’s blowing the trumpet for the non-technical method that I used, which should be accessible to pretty much anyone with an internet connection and LibreOffice (which you can download and install for free).

Cards Against Humanity — make your own

Click the Google Spreadsheet above to get started.

Wishlists for presents (Christmas or otherwise)

Decembro 6, 2013

It’s that time of year again, and I wanted to share this fine idea for keeping a wish list. I can’t be the only person to think of it, but I’m pleased with the way it works, so here goes.

A wish list works best when it’s:

  • always accessible, for adding stuff and for present buying; it’s not just something you do in the fortnight before Christmas
  • visible to people who might be interested in buying you a present, but not necessarily public to the whole world
  • not tied to any particular retailer

To this end, I’ve come up with the following steps, which ticks all of those boxes:

  • create a Google Form* called “Tim’s wishlist” with questions like “What item would you like?” / “Roughly how much is it?” / “Got a URL?” / “Any other details needed?”
  • make the submissions from the form to do a Google Spreadsheet, and share that spreadsheet with your family members, then remove yourself from the share, so you can’t consult your own wish list, you can only add to it via the form
  • repeat from the top for your other family members — create a form for them, then share the submissions spreadsheet, excluding the concerned party from the viewing rights.
  • bookmark the submission forms on the relevant people’s browsers

Now, at any point during the year, you can think, “Ooh, I fancy one of them!” and add it to your wish list. And come your birthday, Christmas, or whatever occasion, people have a list to go at, and you get pleasantly surprised with things that you’d forgotten all about**.

*Search for “google docs” if you’re not sure what Google Forms are. They’re dead easy to set up from your Google account.

**If your memory is as atrocious as mine.

Banana xylophone!

Decembro 2, 2012

Today, the question “How did you do that?” came up quite a few times (often preceded by, “Er, what is that?”) The answer to the latter question was, “It’s a banana xylophone”, and the answer to the other is set out below.

If you’ve got ideas or suggestions for making it work even better, that’s what the comment section below is for.  🙂  There are links for downloading the software, sheet music, and booklet, all of which you’re welcome to adopt, adapt and improve.

So, this week I built a banana xylophone.

Tim, playing a banana xylophone

 

Its key ingredients are, in no particular order:

I also used/made:

Add all ingredients, stir vigorously, et voilà.

My talk at TEDxGranta

Aprilo 22, 2012

A couple of months ago, I happened to read that the lineup of speakers for TEDxGranta was “almost complete”. From that I learnt (a) that there was going to be a TEDx event in Cambridge, and (b) they were still looking for people to speak.  🙂  I punted them a CV and a proposed title, and no doubt after hours of weighing me up against a huge raft of unsuccessful candidates*, they accepted the proposal. Yay!
*Possibly.

It’s about the Springboard to Languages programme. It’s the best thing I know of for getting primary school kids actually using a foreign language, and it deserves more recognition and take-up than it gets.

So, without further ado, here’s what I did. Enjoy!

Rather poor closed-mindedness at English Forum Switzerland

Oktobro 9, 2011

A question was posted on EnglishForum.ch about Esperanto: “I am wondering if I can use Esperanto in Switzerland? Is the number of people who speak Esperanto growing?”

There were about 20 responses from 12 users when I came across the thread — a mixture of useful information and dismissive comments.

I created an account and replied; the text of my post is copied below in full, in the first comment. It appeared on the site for about 20 minutes, but when I refreshed the page to see if there were any replies, I was told that my account had been blocked for spamming, and would never be unblocked. Charming.

Going back to the thread again now, I see that the post from “Michjo” (which I refer to in my post) has also been removed, and I’ve been told that Brian Barker suffered a similar fate (both posts were polite and informative about Esperanto in Switzerland).

I’ve written to the web admin to see if there’s some technical explanation and posted on their Facebook wall asking about it, but it certainly appears that dissenting voices are simply rejected from EnglishForum.ch.

I’ll update this post if I hear back from them.

UPDATE: an informative comment by “Enrique” was also pulled from the thread, although I’ve just noticed that a comment by “nicolee” about attending an Esperanto poetry seminar has been up there for over 36 hours now. Meanwhile, the author of “You’ll find just as many people speak Klingon as Esperanto. It’s a hobby, not a language” has been “thanked” by six other users so far.

UPDATE (2011-10-09 18:08 UTC): currently there’s a comment by Lu Wunsch-Rolshoven that simply says “Maybe some of the Esperanto groups in Switzerland would be able to help you.” Let’s see how long that lasts. Incidentally, my post on the Facebook wall is still there.

UPDATE (23:12 UTC): Lu Wunsch-Rolshoven actually posted three or four messages to the thread which stayed live for a few hours. In the last hour or so though, the whole thread has been made private, i.e. viewable only to forum members. Google still has the posts cached, if you want to read. PS My Facebook post is still there!

UPDATE (2011-10-10 09:30 UTC): Lu Wunsch-Rolshoven’s posts have, predictably, been deleted, as has the one by “nicolee” about attending an Esperanto poetry seminar. The thread has also been moved from http://www.englishforum.ch/language-corner/127522-esperanto.html to http://www.englishforum.ch/trash-duplicate-questions/127522-esperanto.html, effectively hiding it even from members. How spectactularly rude and closed-minded.

If any administrators from EnglishForum.ch would care to comment below, I’ll be happy to post their comments in full, verbatim, and permanently.

UPDATE (15:22 UTC): I’ve had a reply from the moderators to my query about why my account was banned. Here it is in full:

You were banned under the our general ban of Spam and/or unwanted content because your location and subject matter does not fit our forum’s topic matter.

To make things perfectly clear The English Forum is NOT a language forum. It’s a support group for English speaking expats who reside in Switzerland. IE; work permits, housing, social events, schooling and just fitting in to name a few.

True, we do have a language area but if you take a moment to look at the description you would see why Esperanto is out of place within our forum as it is not one of Switzerland’s official national languages.

Language Corner:
Questions and answers for learners of German, French and Italian, translation help

If you are searching for Esperanto forums I’m sure you’ll find many online but as I’ve already stated, The English Forum is not one of them.

thank you for your understanding.

I’m pleased that they have at least responded, but find the response rather inadequate. My post answered a question posted by another forum member. If they’re so concerned that everybody must talk only about French, German and Italian, why was the original post not removed first? Why were the snarky, unhelpful answers not removed first? (before the whole thread was taken down, obviously).

It certainly looks like the informative posts about Esperanto rubbed up some moderator’s prejudices the wrong way, and a rule was found, and inconsistently applied, to back that up.

Anonciĝis filmkonkurso por junaj dulingvaj eŭropanoj

Septembro 11, 2010

Anonĉigis en Finnlando filmkonkurso nomita “POLYGLOT: on the way to Turku” (“Poligloto: survoje al Turku”).

Ĝi celas junajn, dulingvajn eŭropanojn, kaj la premio estas partopreno en venontjara vagada filmprojekto apud la urbo Turku en Finnlando. Konkursantoj alŝutu mallongan memfaritan filmon (maksimume 5-minutan) en unu el du kategorioj:

  • Video-portretoj (dokumentariaj) pri “Mia multlingveco”
  • Video-poemoj (fikciaj) pri “La lingvo en kiu mi sonĝas”

La limdato por sendi vian filmon estas la 15-a de decembro 2010 — Zamenhof-tago! — kaj la premia vojaĝo okazos inter la 3-a kaj 19-a de junio 2011.

La ironie entute unulingva retejo pri la konkurso estas www.polyglot-turku.eu. La lingvo uzata ne estas la finna.

Se vi havas inter 18 kaj 35 jarojn, loĝas en Eŭropo, kaj posedas kameraon kaj la emon uzi ĝin, jen spektontaro kiu atendas malkovri vian esperantistecon. Montru ĝin al ili!

Workflow for multi-lingual subtitles in DVD Studio Pro

Majo 9, 2010

Despite reading manuals, a good deal of googling, and even attending Apple’s One to One tutoring for a year, I still haven’t read of a good solution for easily creating multi-lingual subtitles in DVD Studio Pro.

So I made one myself, and that’s what I’m presenting here. Feel free to use it, and let me know how you get on with a comment below. (Note that it uses AWK, so it’ll work straightaway on Linux and Mac, but you’ll need to install AWK or GAWK on Windows — google for it). Please do suggest possible improvements where you see them.

What I want to do:

  1. create start and stop points for subtitles using keystrokes while a video is playing
  2. import subtitle text from a separate file where it has been created/translated externally
  3. be able to easily add a new language to an existing subtitled project

And this is how I go about it. (I’ll do another post about other things I tried and why they didn’t work out, but here’s what I’ve found to work after numerous dead ends).

(1) Use Jubler to create the timings, either by using the method described in the first part of this article, or by following “How can I create new subtitles while the movie is played?” in the Jubler documentation.

You don’t need to type the text of the subtitles if you’ve already got it in another file, although I’ve found it useful to put in one or two key words that you can later match up to the spoken dialogue. The important thing at this stage is to get the start and end point of each subtitle in the right place. Save the result as a .stl file. For the purpose of these instructions, I’ll assume it’s called blank.stl — note that it MUST be in STL format for the AWK script below to work.

(2) Copy and paste the following AWK script into a new text file, and save it with the filename translateSTL.

#!/usr/bin/awk -f
# by Tim Morley, 2010
# distributed under Creative Commons Attribution-Share Alike license
# http://creativecommons.org/licenses/by-sa/2.0/uk/
#
# =====================================================================
#
# Syntax:
# ~$ translateSTL lang=XX start=ROW translations.csv file.stl
#
# where:
# - XX is a language code (e.g. EN, HU, DE, etc.) which must match
# a code in the top row of one column in translations.csv
# - ROW is the line number in translations.csv of the first subtitle
# which is to be imported
# - translations.csv is a TAB-separated (NOT comma-separated) file
# containing set(s) of translated subtitles (one subtitle per cell,
# one language per column). This file should contain at least as
# many subtitles as are contained in file.stl
# - file.stl is a subtitle file in STL format
#
# The function will send a copy of file.stl to STDOUT which retains the
# timecodes from file.stl but next to the subtitles from the relevant
# column of translations.csv
#
# =====================================================================

BEGIN { FS = "\t" } # separator in translations.csv is tab (not comma, to avoid problems with commas in subtitle text)

# var lang = language code set by user parameter
# var start = number of row where first translation to be used is found in translations.csv

((NR == FNR) && (NR == 1)) { # for first file ("translations.csv"), for first line
for (i=1; i<=NF; i++) {
if ($i == lang) langColumn = i; # find the column that matches the given language code
}
rowIndex = start; # set this once; can't put it in BEGIN {...}, because $start not yet instantiated there
}

((NR == FNR) && (NR >= start)) {
translation[NR] = $langColumn; # build array of translations using row numbers as indices
}

(NR != FNR) { # for second file ("file.stl")
FS = "[ \t]*,[ \t]*"; # setting FS here means first line of file.stl gets mangled if it starts with a timecode
if (FNR==1) printf "\xef\xbb\xbf" # add byte order mark, because DVD Studio Pro inexplicably needs it... grumble... you might be better to remove this line if you're not using DVD-SP
if ($1 ~ /^..:..:..:../) { # for each line that starts with a timecode...
printf "%s,%s, %s\n", $1, $2, translation[rowIndex]; # output its two timecodes followed by a translated subtitle
rowIndex++;
} else {
print $0; # otherwise just output the line as is
}
}


(3) Make the file you’ve just saved executable by opening a terminal window and typing:

chmod +x translateSTL

(4) Your translations need to be in a spreadsheet — Google Docs is a good option if you’re colaborating with other translators (although see comment below for one small problem, and how to get round it).

Sample spreadsheet showing translations in three languages

Each column should contain your subtitles in a different language, with one subtitle per spreadsheet cell. The top cell of each column (in Row 1) should contain the language code of that column (e.g. EO for Esperanto, EN for English, HU for Hungarian, etc.) And the file needs to be saved as a .csv file USING TABS, NOT COMMAS, TO SEPARATE THE FIELDS, and with NO QUOTATION MARKS AROUND THE TEXT, unless you want them to appear in your subtitles. The script above will not work if you do not use tabs as field separators.

For the purposes of these instructions, I’ll suppose that this file is called translations.csv

(5) To make things easy, put all the relevant files into the same folder: translateSTL, blank.stl and translations.csv. Now, if you want to merge the text from the English column of your translations.csv spreadsheet, starting from Row 2, into blank.stl to form a new file called EN.stl then back in the terminal window, cd to the folder where all these files are, and type the following incantation:

./translateSTL lang=EN start=2 translations.csv blank.stl > EN.stl

[The above should be all on one line; don’t press return until you’ve typed it all. Alternatively, you can copy and paste what’s above into your terminal, and then press return.]

If all has gone well, you should now have a new file called EN.stl containing the timestamps you created in Jubler together with the text from the column headed “EN” from your spreadsheet. (See comment below for potential problem with the first line of your new file, and how to fix it).

To create the German version, assuming you have a column headed DE in your spreadsheet, type this:

./translateSTL lang=DE start=2 translations.csv blank.stl > DE.stl

If you’re working on just one scene from the middle of a longer project, you can start to merge the text from a particular row of translations.csv. If your current scene starts at row 190 of translations.csv, type the following to create the French subtitles (from the column with FR in its first row) for this scene:

./translateSTL lang=FR start=190 translations.csv blank.stl > FR.stl

Hope that helps!

Very simple message below

Januaro 14, 2010

Please click it and do it:

Support Doctors Without Borders in Haiti