Skip to content

Instantly share code, notes, and snippets.

# This code is designed to cleanup Word HTML to a very great extent.
# It is used at Radio NZ to cleanup documents created in Word prior to
# parsing them, line by line, to extract content.
# The Word content is pasted into WYSIWYG which is then HTTP POSTed into
# the app where the string is cleaned by this code.
# We add new lines after block elements because the next stage is a line-based
# parser
@rhulse
rhulse / gist:98245
Created April 19, 2009 21:49
Turn a date string in English into Maori
def convert_date_to_maori(date_string)
tereo_date = date_string.clone
h = {
/January/ => 'Kohi-tātea',
/February/ => 'Hui-tanguru',
/March/ => 'Poutū-te-rangi',
/April/ => 'Paengawhā-whā',
/May/ => 'Haratua',
/June/ => 'Pipiri',
/July/ => 'Hōngongoi',