paul@48 | 1 | #!/usr/bin/env python |
paul@48 | 2 | |
paul@48 | 3 | """ |
paul@48 | 4 | Interpretation and preparation of iMIP content, together with a content handling |
paul@48 | 5 | mechanism employed by specific recipients. |
paul@48 | 6 | """ |
paul@48 | 7 | |
paul@75 | 8 | from datetime import date, datetime, timedelta |
paul@48 | 9 | from email.mime.text import MIMEText |
paul@76 | 10 | from imiptools.period import have_conflict, insert_period, remove_period |
paul@48 | 11 | from pytz import timezone, UnknownTimeZoneError |
paul@48 | 12 | from vCalendar import parse, ParseError, to_dict |
paul@75 | 13 | from vRecurrence import get_parameters, get_rule |
paul@48 | 14 | import imip_store |
paul@48 | 15 | import re |
paul@48 | 16 | |
paul@48 | 17 | try: |
paul@48 | 18 | from cStringIO import StringIO |
paul@48 | 19 | except ImportError: |
paul@48 | 20 | from StringIO import StringIO |
paul@48 | 21 | |
paul@48 | 22 | # iCalendar date and datetime parsing (from DateSupport in MoinSupport). |
paul@48 | 23 | |
paul@48 | 24 | date_icalendar_regexp_str = ur'(?P<year>[0-9]{4})(?P<month>[0-9]{2})(?P<day>[0-9]{2})' |
paul@48 | 25 | datetime_icalendar_regexp_str = date_icalendar_regexp_str + \ |
paul@48 | 26 | ur'(?:' \ |
paul@48 | 27 | ur'T(?P<hour>[0-2][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-6][0-9])' \ |
paul@48 | 28 | ur'(?P<utc>Z)?' \ |
paul@48 | 29 | ur')?' |
paul@48 | 30 | |
paul@48 | 31 | match_date_icalendar = re.compile(date_icalendar_regexp_str, re.UNICODE).match |
paul@48 | 32 | match_datetime_icalendar = re.compile(datetime_icalendar_regexp_str, re.UNICODE).match |
paul@48 | 33 | |
paul@48 | 34 | # Content interpretation. |
paul@48 | 35 | |
paul@48 | 36 | def get_items(d, name, all=True): |
paul@48 | 37 | |
paul@48 | 38 | """ |
paul@48 | 39 | Get all items from 'd' with the given 'name', returning single items if |
paul@48 | 40 | 'all' is specified and set to a false value and if only one value is |
paul@48 | 41 | present for the name. Return None if no items are found for the name. |
paul@48 | 42 | """ |
paul@48 | 43 | |
paul@48 | 44 | if d.has_key(name): |
paul@48 | 45 | values = d[name] |
paul@48 | 46 | if not all and len(values) == 1: |
paul@48 | 47 | return values[0] |
paul@48 | 48 | else: |
paul@48 | 49 | return values |
paul@48 | 50 | else: |
paul@48 | 51 | return None |
paul@48 | 52 | |
paul@48 | 53 | def get_item(d, name): |
paul@48 | 54 | return get_items(d, name, False) |
paul@48 | 55 | |
paul@48 | 56 | def get_value_map(d, name): |
paul@48 | 57 | |
paul@48 | 58 | """ |
paul@48 | 59 | Return a dictionary for all items in 'd' having the given 'name'. The |
paul@48 | 60 | dictionary will map values for the name to any attributes or qualifiers |
paul@48 | 61 | that may have been present. |
paul@48 | 62 | """ |
paul@48 | 63 | |
paul@48 | 64 | items = get_items(d, name) |
paul@48 | 65 | if items: |
paul@48 | 66 | return dict(items) |
paul@48 | 67 | else: |
paul@48 | 68 | return {} |
paul@48 | 69 | |
paul@48 | 70 | def get_values(d, name, all=True): |
paul@48 | 71 | if d.has_key(name): |
paul@48 | 72 | values = d[name] |
paul@48 | 73 | if not all and len(values) == 1: |
paul@48 | 74 | return values[0][0] |
paul@48 | 75 | else: |
paul@48 | 76 | return map(lambda x: x[0], values) |
paul@48 | 77 | else: |
paul@48 | 78 | return None |
paul@48 | 79 | |
paul@48 | 80 | def get_value(d, name): |
paul@48 | 81 | return get_values(d, name, False) |
paul@48 | 82 | |
paul@48 | 83 | def get_utc_datetime(d, name): |
paul@48 | 84 | value, attr = get_item(d, name) |
paul@48 | 85 | dt = get_datetime(value, attr) |
paul@48 | 86 | return to_utc_datetime(dt) |
paul@48 | 87 | |
paul@48 | 88 | def to_utc_datetime(dt): |
paul@48 | 89 | if not dt: |
paul@48 | 90 | return None |
paul@48 | 91 | elif isinstance(dt, datetime): |
paul@48 | 92 | return dt.astimezone(timezone("UTC")) |
paul@48 | 93 | else: |
paul@48 | 94 | return dt |
paul@48 | 95 | |
paul@71 | 96 | def to_timezone(dt, name): |
paul@71 | 97 | try: |
paul@71 | 98 | tz = name and timezone(name) or None |
paul@71 | 99 | except UnknownTimeZoneError: |
paul@71 | 100 | tz = None |
paul@71 | 101 | if tz is not None: |
paul@71 | 102 | if not dt.tzinfo: |
paul@71 | 103 | return tz.localize(dt) |
paul@71 | 104 | else: |
paul@71 | 105 | return dt.astimezone(tz) |
paul@71 | 106 | else: |
paul@71 | 107 | return dt |
paul@71 | 108 | |
paul@48 | 109 | def format_datetime(dt): |
paul@48 | 110 | if not dt: |
paul@48 | 111 | return None |
paul@48 | 112 | elif isinstance(dt, datetime): |
paul@71 | 113 | if dt.tzname() == "UTC": |
paul@71 | 114 | return dt.strftime("%Y%m%dT%H%M%SZ") |
paul@71 | 115 | else: |
paul@71 | 116 | return dt.strftime("%Y%m%dT%H%M%S") |
paul@48 | 117 | else: |
paul@48 | 118 | return dt.strftime("%Y%m%d") |
paul@48 | 119 | |
paul@48 | 120 | def get_address(value): |
paul@48 | 121 | return value.startswith("mailto:") and value[7:] or value |
paul@48 | 122 | |
paul@48 | 123 | def get_uri(value): |
paul@48 | 124 | return value.startswith("mailto:") and value or "mailto:%s" % value |
paul@48 | 125 | |
paul@71 | 126 | def get_datetime(value, attr=None): |
paul@48 | 127 | |
paul@71 | 128 | """ |
paul@71 | 129 | Return a datetime object from the given 'value' in iCalendar format, using |
paul@71 | 130 | the 'attr' mapping (if specified) to control the conversion. |
paul@71 | 131 | """ |
paul@71 | 132 | |
paul@71 | 133 | if not attr or attr.get("VALUE") in (None, "DATE-TIME"): |
paul@48 | 134 | m = match_datetime_icalendar(value) |
paul@48 | 135 | if m: |
paul@48 | 136 | dt = datetime( |
paul@48 | 137 | int(m.group("year")), int(m.group("month")), int(m.group("day")), |
paul@48 | 138 | int(m.group("hour")), int(m.group("minute")), int(m.group("second")) |
paul@48 | 139 | ) |
paul@48 | 140 | |
paul@48 | 141 | # Impose the indicated timezone. |
paul@48 | 142 | # NOTE: This needs an ambiguity policy for DST changes. |
paul@48 | 143 | |
paul@71 | 144 | return to_timezone(dt, m.group("utc") and "UTC" or attr and attr.get("TZID") or None) |
paul@48 | 145 | |
paul@71 | 146 | if not attr or attr.get("VALUE") == "DATE": |
paul@48 | 147 | m = match_date_icalendar(value) |
paul@48 | 148 | if m: |
paul@48 | 149 | return date( |
paul@48 | 150 | int(m.group("year")), int(m.group("month")), int(m.group("day")) |
paul@48 | 151 | ) |
paul@48 | 152 | return None |
paul@48 | 153 | |
paul@75 | 154 | # NOTE: Need to expose the 100 day window for recurring events in the |
paul@75 | 155 | # NOTE: configuration. |
paul@75 | 156 | |
paul@75 | 157 | def get_periods(obj, window_size=100): |
paul@75 | 158 | |
paul@76 | 159 | """ |
paul@76 | 160 | Return periods for the given object 'obj', confining materialised periods |
paul@76 | 161 | to the given 'window_size' in days starting from the present moment. |
paul@76 | 162 | """ |
paul@76 | 163 | |
paul@75 | 164 | dtstart = get_utc_datetime(obj, "DTSTART") |
paul@75 | 165 | dtend = get_utc_datetime(obj, "DTEND") |
paul@75 | 166 | |
paul@75 | 167 | # NOTE: Need also DURATION support. |
paul@75 | 168 | |
paul@75 | 169 | duration = dtend - dtstart |
paul@75 | 170 | |
paul@75 | 171 | # Recurrence rules create multiple instances to be checked. |
paul@75 | 172 | # Conflicts may only be assessed within a period defined by policy |
paul@75 | 173 | # for the agent, with instances outside that period being considered |
paul@75 | 174 | # unchecked. |
paul@75 | 175 | |
paul@75 | 176 | window_end = datetime.now() + timedelta(window_size) |
paul@75 | 177 | |
paul@75 | 178 | # NOTE: Need also RDATE and EXDATE support. |
paul@75 | 179 | |
paul@75 | 180 | rrule = get_value(obj, "RRULE") |
paul@75 | 181 | |
paul@75 | 182 | if rrule: |
paul@75 | 183 | selector = get_rule(dtstart, rrule) |
paul@75 | 184 | parameters = get_parameters(rrule) |
paul@75 | 185 | periods = [] |
paul@75 | 186 | for start in selector.materialise(dtstart, window_end, parameters.get("COUNT"), parameters.get("BYSETPOS")): |
paul@75 | 187 | start = datetime(*start, tzinfo=timezone("UTC")) |
paul@75 | 188 | end = start + duration |
paul@75 | 189 | periods.append((format_datetime(start), format_datetime(end))) |
paul@75 | 190 | else: |
paul@75 | 191 | periods = [(format_datetime(dtstart), format_datetime(dtend))] |
paul@75 | 192 | |
paul@75 | 193 | return periods |
paul@75 | 194 | |
paul@77 | 195 | def update_freebusy(freebusy, attendee, periods, transp, uid, store): |
paul@76 | 196 | |
paul@76 | 197 | """ |
paul@76 | 198 | For the given 'attendee', update the free/busy details with the given |
paul@77 | 199 | 'periods', 'transp' setting and 'uid' in the 'store'. |
paul@76 | 200 | """ |
paul@76 | 201 | |
paul@77 | 202 | remove_period(freebusy, uid) |
paul@77 | 203 | |
paul@77 | 204 | for start, end in periods: |
paul@112 | 205 | insert_period(freebusy, (start, end, uid, transp)) |
paul@76 | 206 | |
paul@112 | 207 | store.set_freebusy(attendee, freebusy) |
paul@76 | 208 | |
paul@77 | 209 | def can_schedule(freebusy, periods, uid): |
paul@76 | 210 | |
paul@77 | 211 | """ |
paul@77 | 212 | Return whether the 'freebusy' list can accommodate the given 'periods' |
paul@77 | 213 | employing the specified 'uid'. |
paul@77 | 214 | """ |
paul@76 | 215 | |
paul@77 | 216 | for conflict in have_conflict(freebusy, periods, True): |
paul@112 | 217 | start, end, found_uid, found_transp = conflict |
paul@77 | 218 | if found_uid != uid: |
paul@77 | 219 | return False |
paul@76 | 220 | |
paul@77 | 221 | return True |
paul@76 | 222 | |
paul@48 | 223 | # Handler mechanism objects. |
paul@48 | 224 | |
paul@89 | 225 | def handle_itip_part(part, senders, recipients, handlers, messenger): |
paul@48 | 226 | |
paul@48 | 227 | """ |
paul@89 | 228 | Handle the given iTIP 'part' from the given 'senders' for the given |
paul@89 | 229 | 'recipients' using the given 'handlers' and information provided by the |
paul@89 | 230 | given 'messenger'. Return a list of responses, each response being a tuple |
paul@89 | 231 | of the form (is-outgoing, message-part). |
paul@48 | 232 | """ |
paul@48 | 233 | |
paul@48 | 234 | method = part.get_param("method") |
paul@48 | 235 | |
paul@48 | 236 | # Decode the data and parse it. |
paul@48 | 237 | |
paul@48 | 238 | f = StringIO(part.get_payload(decode=True)) |
paul@48 | 239 | |
paul@48 | 240 | itip = parse_object(f, part.get_content_charset(), "VCALENDAR") |
paul@48 | 241 | |
paul@48 | 242 | # Ignore the part if not a calendar object. |
paul@48 | 243 | |
paul@48 | 244 | if not itip: |
paul@48 | 245 | return [] |
paul@48 | 246 | |
paul@48 | 247 | # Require consistency between declared and employed methods. |
paul@48 | 248 | |
paul@48 | 249 | if get_value(itip, "METHOD") == method: |
paul@48 | 250 | |
paul@48 | 251 | # Look for different kinds of sections. |
paul@48 | 252 | |
paul@60 | 253 | all_results = [] |
paul@48 | 254 | |
paul@48 | 255 | for name, cls in handlers: |
paul@48 | 256 | for details in get_values(itip, name) or []: |
paul@48 | 257 | |
paul@48 | 258 | # Dispatch to a handler and obtain any response. |
paul@48 | 259 | |
paul@89 | 260 | handler = cls(details, senders, recipients, messenger) |
paul@60 | 261 | result = methods[method](handler)() |
paul@48 | 262 | |
paul@89 | 263 | # Aggregate responses for a single message. |
paul@48 | 264 | |
paul@60 | 265 | if result: |
paul@60 | 266 | response_method, part = result |
paul@60 | 267 | outgoing = method != response_method |
paul@60 | 268 | all_results.append((outgoing, part)) |
paul@48 | 269 | |
paul@60 | 270 | return all_results |
paul@48 | 271 | |
paul@60 | 272 | return [] |
paul@48 | 273 | |
paul@70 | 274 | def parse_object(f, encoding, objtype=None): |
paul@48 | 275 | |
paul@48 | 276 | """ |
paul@70 | 277 | Parse the iTIP content from 'f' having the given 'encoding'. If 'objtype' is |
paul@78 | 278 | given, only objects of that type will be returned. Otherwise, the root of |
paul@78 | 279 | the content will be returned as a dictionary with a single key indicating |
paul@78 | 280 | the object type. |
paul@70 | 281 | |
paul@70 | 282 | Return None if the content was not readable or suitable. |
paul@48 | 283 | """ |
paul@48 | 284 | |
paul@48 | 285 | try: |
paul@48 | 286 | try: |
paul@48 | 287 | doctype, attrs, elements = obj = parse(f, encoding=encoding) |
paul@70 | 288 | if objtype and doctype == objtype: |
paul@48 | 289 | return to_dict(obj)[objtype][0] |
paul@70 | 290 | elif not objtype: |
paul@78 | 291 | return to_dict(obj) |
paul@48 | 292 | finally: |
paul@48 | 293 | f.close() |
paul@108 | 294 | |
paul@108 | 295 | # NOTE: Handle parse errors properly. |
paul@108 | 296 | |
paul@48 | 297 | except (ParseError, ValueError): |
paul@48 | 298 | pass |
paul@48 | 299 | |
paul@48 | 300 | return None |
paul@48 | 301 | |
paul@48 | 302 | def to_part(method, calendar): |
paul@48 | 303 | |
paul@48 | 304 | """ |
paul@48 | 305 | Write using the given 'method', the 'calendar' details to a MIME |
paul@48 | 306 | text/calendar part. |
paul@48 | 307 | """ |
paul@48 | 308 | |
paul@48 | 309 | encoding = "utf-8" |
paul@48 | 310 | out = StringIO() |
paul@48 | 311 | try: |
paul@48 | 312 | imip_store.to_stream(out, imip_store.make_calendar(calendar, method), encoding) |
paul@48 | 313 | part = MIMEText(out.getvalue(), "calendar", encoding) |
paul@48 | 314 | part.set_param("method", method) |
paul@48 | 315 | return part |
paul@48 | 316 | |
paul@48 | 317 | finally: |
paul@48 | 318 | out.close() |
paul@48 | 319 | |
paul@48 | 320 | class Handler: |
paul@48 | 321 | |
paul@48 | 322 | "General handler support." |
paul@48 | 323 | |
paul@89 | 324 | def __init__(self, details, senders=None, recipients=None, messenger=None): |
paul@48 | 325 | |
paul@48 | 326 | """ |
paul@48 | 327 | Initialise the handler with the 'details' of a calendar object and the |
paul@89 | 328 | 'senders' and 'recipients' of the object (if specifically indicated). |
paul@48 | 329 | """ |
paul@48 | 330 | |
paul@48 | 331 | self.details = details |
paul@89 | 332 | self.senders = senders and set(senders) |
paul@79 | 333 | self.recipients = recipients and set(recipients) |
paul@89 | 334 | self.messenger = messenger |
paul@48 | 335 | |
paul@48 | 336 | self.uid = get_value(details, "UID") |
paul@48 | 337 | self.sequence = get_value(details, "SEQUENCE") |
paul@48 | 338 | self.dtstamp = get_value(details, "DTSTAMP") |
paul@48 | 339 | |
paul@48 | 340 | self.store = imip_store.FileStore() |
paul@48 | 341 | |
paul@48 | 342 | try: |
paul@48 | 343 | self.publisher = imip_store.FilePublisher() |
paul@48 | 344 | except OSError: |
paul@48 | 345 | self.publisher = None |
paul@48 | 346 | |
paul@70 | 347 | # Access to calendar structures and other data. |
paul@70 | 348 | |
paul@48 | 349 | def get_items(self, name, all=True): |
paul@48 | 350 | return get_items(self.details, name, all) |
paul@48 | 351 | |
paul@48 | 352 | def get_item(self, name): |
paul@48 | 353 | return get_item(self.details, name) |
paul@48 | 354 | |
paul@48 | 355 | def get_value_map(self, name): |
paul@48 | 356 | return get_value_map(self.details, name) |
paul@48 | 357 | |
paul@48 | 358 | def get_values(self, name, all=True): |
paul@48 | 359 | return get_values(self.details, name, all) |
paul@48 | 360 | |
paul@48 | 361 | def get_value(self, name): |
paul@48 | 362 | return get_value(self.details, name) |
paul@48 | 363 | |
paul@48 | 364 | def get_utc_datetime(self, name): |
paul@48 | 365 | return get_utc_datetime(self.details, name) |
paul@48 | 366 | |
paul@75 | 367 | def get_periods(self): |
paul@75 | 368 | return get_periods(self.details) |
paul@75 | 369 | |
paul@77 | 370 | def update_freebusy(self, freebusy, attendee, periods): |
paul@77 | 371 | return update_freebusy(freebusy, attendee, periods, self.get_value("TRANSP"), self.uid, self.store) |
paul@77 | 372 | |
paul@77 | 373 | def can_schedule(self, freebusy, periods): |
paul@77 | 374 | return can_schedule(freebusy, periods, self.uid) |
paul@76 | 375 | |
paul@89 | 376 | def filter_by_senders(self, values): |
paul@89 | 377 | addresses = map(get_address, values) |
paul@89 | 378 | if self.senders: |
paul@89 | 379 | return self.senders.intersection(addresses) |
paul@89 | 380 | else: |
paul@89 | 381 | return addresses |
paul@89 | 382 | |
paul@48 | 383 | def filter_by_recipients(self, values): |
paul@79 | 384 | addresses = map(get_address, values) |
paul@89 | 385 | if self.recipients: |
paul@89 | 386 | return self.recipients.intersection(addresses) |
paul@89 | 387 | else: |
paul@89 | 388 | return addresses |
paul@48 | 389 | |
paul@100 | 390 | def require_organiser_and_attendees(self, from_organiser=True): |
paul@51 | 391 | |
paul@51 | 392 | """ |
paul@51 | 393 | Return the organiser and attendees for the current object, filtered by |
paul@51 | 394 | the recipients of interest. Return None if no identities are eligible. |
paul@51 | 395 | """ |
paul@51 | 396 | |
paul@48 | 397 | attendee_map = self.get_value_map("ATTENDEE") |
paul@48 | 398 | organiser = self.get_item("ORGANIZER") |
paul@48 | 399 | |
paul@48 | 400 | # Only provide details for recipients who are also attendees. |
paul@48 | 401 | |
paul@100 | 402 | filter_fn = from_organiser and self.filter_by_recipients or self.filter_by_senders |
paul@100 | 403 | |
paul@48 | 404 | attendees = {} |
paul@100 | 405 | for attendee in map(get_uri, filter_fn(attendee_map)): |
paul@48 | 406 | attendees[attendee] = attendee_map[attendee] |
paul@48 | 407 | |
paul@89 | 408 | if not attendees or not organiser: |
paul@89 | 409 | return None |
paul@89 | 410 | |
paul@94 | 411 | return organiser, attendees |
paul@94 | 412 | |
paul@94 | 413 | def validate_identities(self, items): |
paul@94 | 414 | |
paul@94 | 415 | """ |
paul@94 | 416 | Validate the 'items' against the known senders, obtaining sent-by |
paul@94 | 417 | addresses from attributes provided by the items. |
paul@94 | 418 | """ |
paul@94 | 419 | |
paul@89 | 420 | # Reject organisers that do not match any senders. |
paul@89 | 421 | |
paul@94 | 422 | identities = [] |
paul@89 | 423 | |
paul@94 | 424 | for value, attr in items: |
paul@94 | 425 | identities.append(value) |
paul@94 | 426 | sent_by = attr.get("SENT-BY") |
paul@94 | 427 | if sent_by: |
paul@94 | 428 | identities.append(sent_by) |
paul@48 | 429 | |
paul@94 | 430 | return self.filter_by_senders(identities) |
paul@48 | 431 | |
paul@100 | 432 | def get_object(self, user, objtype): |
paul@100 | 433 | |
paul@100 | 434 | """ |
paul@100 | 435 | Return the stored object to which the current object refers for the |
paul@100 | 436 | given 'user' and for the given 'objtype'. |
paul@100 | 437 | """ |
paul@100 | 438 | |
paul@100 | 439 | f = self.store.get_event(user, self.uid) |
paul@100 | 440 | obj = f and parse_object(f, "utf-8", objtype) |
paul@100 | 441 | return obj |
paul@100 | 442 | |
paul@100 | 443 | def have_new_object(self, attendee, objtype, obj=None): |
paul@51 | 444 | |
paul@51 | 445 | """ |
paul@51 | 446 | Return whether the current object is new to the 'attendee' for the |
paul@51 | 447 | given 'objtype'. |
paul@51 | 448 | """ |
paul@51 | 449 | |
paul@100 | 450 | obj = obj or self.get_object(attendee, objtype) |
paul@51 | 451 | |
paul@51 | 452 | # If found, compare SEQUENCE and potentially DTSTAMP. |
paul@51 | 453 | |
paul@100 | 454 | if obj: |
paul@100 | 455 | sequence = get_value(obj, "SEQUENCE") |
paul@100 | 456 | dtstamp = get_value(obj, "DTSTAMP") |
paul@51 | 457 | |
paul@100 | 458 | # If the request refers to an older version of the object, ignore |
paul@51 | 459 | # it. |
paul@51 | 460 | |
paul@51 | 461 | old_dtstamp = self.dtstamp < dtstamp |
paul@51 | 462 | |
paul@51 | 463 | if sequence is not None and ( |
paul@51 | 464 | int(self.sequence) < int(sequence) or |
paul@51 | 465 | int(self.sequence) == int(sequence) and old_dtstamp |
paul@51 | 466 | ) or old_dtstamp: |
paul@51 | 467 | |
paul@51 | 468 | return False |
paul@51 | 469 | |
paul@51 | 470 | return True |
paul@51 | 471 | |
paul@48 | 472 | # Handler registry. |
paul@48 | 473 | |
paul@48 | 474 | methods = { |
paul@48 | 475 | "ADD" : lambda handler: handler.add, |
paul@48 | 476 | "CANCEL" : lambda handler: handler.cancel, |
paul@48 | 477 | "COUNTER" : lambda handler: handler.counter, |
paul@48 | 478 | "DECLINECOUNTER" : lambda handler: handler.declinecounter, |
paul@48 | 479 | "PUBLISH" : lambda handler: handler.publish, |
paul@48 | 480 | "REFRESH" : lambda handler: handler.refresh, |
paul@48 | 481 | "REPLY" : lambda handler: handler.reply, |
paul@48 | 482 | "REQUEST" : lambda handler: handler.request, |
paul@48 | 483 | } |
paul@48 | 484 | |
paul@48 | 485 | # vim: tabstop=4 expandtab shiftwidth=4 |