paul@35 | 1 | #!/usr/bin/env python |
paul@35 | 2 | |
paul@35 | 3 | """ |
paul@35 | 4 | Confluence Wiki XML/XHTML syntax parsing. |
paul@35 | 5 | |
paul@35 | 6 | Copyright (C) 2012, 2013 Paul Boddie <paul@boddie.org.uk> |
paul@35 | 7 | |
paul@35 | 8 | This software is free software; you can redistribute it and/or |
paul@35 | 9 | modify it under the terms of the GNU General Public License as |
paul@35 | 10 | published by the Free Software Foundation; either version 2 of |
paul@35 | 11 | the License, or (at your option) any later version. |
paul@35 | 12 | |
paul@35 | 13 | This software is distributed in the hope that it will be useful, |
paul@35 | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@35 | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@35 | 16 | GNU General Public License for more details. |
paul@35 | 17 | |
paul@35 | 18 | You should have received a copy of the GNU General Public |
paul@35 | 19 | License along with this library; see the file LICENCE.txt |
paul@35 | 20 | If not, write to the Free Software Foundation, Inc., |
paul@35 | 21 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
paul@35 | 22 | """ |
paul@35 | 23 | |
paul@35 | 24 | try: |
paul@35 | 25 | from cStringIO import StringIO |
paul@35 | 26 | except ImportError: |
paul@35 | 27 | from StringIO import StringIO |
paul@35 | 28 | |
paul@51 | 29 | from MoinMoin import wikiutil |
paul@35 | 30 | from common import * |
paul@35 | 31 | from xmlread import Parser |
paul@35 | 32 | import re |
paul@35 | 33 | import sys |
paul@35 | 34 | import operator |
paul@35 | 35 | import htmlentitydefs |
paul@41 | 36 | import codecs |
paul@35 | 37 | |
paul@35 | 38 | # XML dialect syntax parsing. |
paul@35 | 39 | |
paul@35 | 40 | tags = { |
paul@35 | 41 | # XHTML tag MoinMoin syntax |
paul@35 | 42 | "strong" : "'''%s'''", |
paul@35 | 43 | "em" : "''%s''", |
paul@35 | 44 | "u" : "__%s__", |
paul@35 | 45 | "del" : "--(%s)--", |
paul@35 | 46 | "sup" : "^%s^", |
paul@35 | 47 | "sub" : ",,%s,,", |
paul@35 | 48 | "code" : "`%s`", |
paul@41 | 49 | "tbody" : "%s", |
paul@41 | 50 | "tr" : "%s", |
paul@41 | 51 | "th" : "'''%s'''", |
paul@41 | 52 | "td" : "%s", |
paul@35 | 53 | "blockquote" : " %s", |
paul@35 | 54 | "small" : "~-%s-~", |
paul@35 | 55 | "big" : "~+%s+~", |
paul@35 | 56 | "p" : "%s", |
paul@35 | 57 | "ol" : "%s", |
paul@35 | 58 | "ul" : "%s", |
paul@35 | 59 | "ac:link" : "[[%s%s|%s]]", |
paul@42 | 60 | "ac:image" : "{{%s%s|%s}}", |
paul@55 | 61 | "a" : "[[%s|%s]]", |
paul@35 | 62 | } |
paul@35 | 63 | |
paul@35 | 64 | for tag, translation in blocktypes.items(): |
paul@35 | 65 | tags[tag] = translation |
paul@35 | 66 | |
paul@35 | 67 | simple_tags = { |
paul@35 | 68 | # XHTML tag MoinMoin syntax |
paul@35 | 69 | "br" : "<<BR>>", |
paul@35 | 70 | } |
paul@35 | 71 | |
paul@66 | 72 | simple_preformatted_tags = { |
paul@66 | 73 | # XHTML tag MoinMoin syntax |
paul@66 | 74 | "br" : "\n", |
paul@66 | 75 | } |
paul@66 | 76 | |
paul@35 | 77 | list_tags = { |
paul@35 | 78 | # XHTML list tag MoinMoin list item syntax |
paul@35 | 79 | "ol" : "1. %s", |
paul@35 | 80 | "ul" : "* %s", |
paul@35 | 81 | } |
paul@35 | 82 | |
paul@51 | 83 | preformatted_tags = ["pre", "ac:plain-text-body"] |
paul@51 | 84 | single_level_tags = ["strong", "em", "u", "del", "sup", "sub", "code"] |
paul@51 | 85 | formatted_tags = ["ac:rich-text-body", "table"] |
paul@51 | 86 | |
paul@56 | 87 | indented_tags = ["li", "p"] + preformatted_tags + formatted_tags |
paul@56 | 88 | block_tags = indented_tags + blocktypes.keys() + list_tags.keys() |
paul@58 | 89 | span_override_tags = ["ac:link"] |
paul@56 | 90 | |
paul@35 | 91 | link_target_tags = { |
paul@54 | 92 | # Confluence element Attributes providing the target |
paul@54 | 93 | "ri:page" : ("ri:space-key", "ri:content-title"), |
paul@54 | 94 | "ri:attachment" : ("ri:filename",), |
paul@54 | 95 | "ri:user" : ("ri:username",), |
paul@35 | 96 | } |
paul@35 | 97 | |
paul@54 | 98 | link_target_prefixes = { |
paul@54 | 99 | # Attribute with details Prefix ensuring correct relative link |
paul@54 | 100 | "ri:space-key" : "..", |
paul@54 | 101 | "ri:content-title" : "..", |
paul@54 | 102 | } |
paul@54 | 103 | |
paul@54 | 104 | link_label_attributes = "ri:content-title", "ac:link-body" |
paul@54 | 105 | |
paul@51 | 106 | # NOTE: User links should support the intended user namespace prefix. |
paul@51 | 107 | |
paul@51 | 108 | link_target_types = { |
paul@51 | 109 | # Confluence element MoinMoin link prefix |
paul@51 | 110 | "ri:attachment" : "attachment:", |
paul@51 | 111 | "ri:user" : "", |
paul@51 | 112 | "ac:link-body" : "#", |
paul@51 | 113 | } |
paul@51 | 114 | |
paul@35 | 115 | macro_rich_text_styles = { |
paul@35 | 116 | # Confluence style MoinMoin admonition style |
paul@35 | 117 | "note" : "caution", |
paul@35 | 118 | "warning" : "warning", |
paul@35 | 119 | "info" : "important", |
paul@35 | 120 | "tip" : "tip", |
paul@35 | 121 | } |
paul@35 | 122 | |
paul@35 | 123 | normalise_regexp_str = r"\s+" |
paul@35 | 124 | normalise_regexp = re.compile(normalise_regexp_str) |
paul@35 | 125 | |
paul@35 | 126 | class ConfluenceXMLParser(Parser): |
paul@35 | 127 | |
paul@35 | 128 | "Handle content from Confluence 4 page revisions." |
paul@35 | 129 | |
paul@35 | 130 | def __init__(self, out): |
paul@35 | 131 | Parser.__init__(self) |
paul@35 | 132 | self.out = out |
paul@35 | 133 | |
paul@51 | 134 | # Link target and label information. |
paul@35 | 135 | |
paul@35 | 136 | self.target = None |
paul@35 | 137 | self.target_type = None |
paul@51 | 138 | self.label = None |
paul@35 | 139 | |
paul@35 | 140 | # Macro information. |
paul@35 | 141 | |
paul@35 | 142 | self.macro = None |
paul@35 | 143 | self.macro_parameters = {} |
paul@35 | 144 | |
paul@51 | 145 | # Indentation and element nesting states. |
paul@35 | 146 | |
paul@63 | 147 | self.indents = [0] |
paul@35 | 148 | self.states = {} |
paul@51 | 149 | self.max_level = self.level = 0 |
paul@51 | 150 | |
paul@51 | 151 | for name in preformatted_tags + single_level_tags: |
paul@35 | 152 | self.states[name] = 0 |
paul@35 | 153 | |
paul@41 | 154 | # Table states. |
paul@41 | 155 | |
paul@41 | 156 | self.table_rows = 0 |
paul@41 | 157 | self.table_columns = 0 |
paul@41 | 158 | |
paul@56 | 159 | # Block states. |
paul@56 | 160 | |
paul@56 | 161 | self.have_block = False |
paul@56 | 162 | |
paul@35 | 163 | # ContentHandler-related methods. |
paul@35 | 164 | |
paul@35 | 165 | def startElement(self, name, attrs): |
paul@54 | 166 | |
paul@54 | 167 | # Track indentation for lists. |
paul@54 | 168 | |
paul@35 | 169 | if list_tags.has_key(name): |
paul@63 | 170 | self.indents.append(self.indents[-1] + 1) |
paul@54 | 171 | |
paul@54 | 172 | # Track element nesting. |
paul@54 | 173 | |
paul@63 | 174 | if self.states.has_key(name): |
paul@35 | 175 | self.states[name] += 1 |
paul@54 | 176 | |
paul@54 | 177 | # Track cumulative element nesting in order to produce appropriate depth |
paul@54 | 178 | # indicators in the formatted output. |
paul@54 | 179 | |
paul@51 | 180 | if name in preformatted_tags or name in formatted_tags: |
paul@51 | 181 | self.level += 1 |
paul@51 | 182 | self.max_level = max(self.level, self.max_level) |
paul@51 | 183 | |
paul@63 | 184 | # Reset indentation within regions. |
paul@63 | 185 | |
paul@63 | 186 | self.indents.append(0) |
paul@63 | 187 | |
paul@35 | 188 | Parser.startElement(self, name, attrs) |
paul@35 | 189 | |
paul@51 | 190 | # Remember macro information for use within the element. |
paul@51 | 191 | |
paul@51 | 192 | if name == "ac:macro": |
paul@51 | 193 | self.macro = self.attributes[-1].get("ac:name") |
paul@51 | 194 | |
paul@35 | 195 | def endElement(self, name): |
paul@63 | 196 | |
paul@63 | 197 | # Reset the indent for any preformatted/formatted region so that it may |
paul@63 | 198 | # itself be indented. |
paul@63 | 199 | |
paul@63 | 200 | if name in preformatted_tags or name in formatted_tags: |
paul@63 | 201 | self.indents.pop() |
paul@63 | 202 | |
paul@35 | 203 | Parser.endElement(self, name) |
paul@51 | 204 | |
paul@35 | 205 | if list_tags.has_key(name): |
paul@63 | 206 | self.indents.pop() |
paul@63 | 207 | |
paul@63 | 208 | if self.states.has_key(name): |
paul@35 | 209 | self.states[name] -= 1 |
paul@63 | 210 | |
paul@51 | 211 | if name in preformatted_tags or name in formatted_tags: |
paul@51 | 212 | self.level -= 1 |
paul@51 | 213 | if not self.level: |
paul@51 | 214 | self.max_level = 0 |
paul@35 | 215 | |
paul@63 | 216 | # Discard macro state. |
paul@63 | 217 | |
paul@63 | 218 | if name == "ac:macro": |
paul@63 | 219 | self.macro = None |
paul@63 | 220 | self.macro_parameters = {} |
paul@63 | 221 | |
paul@35 | 222 | def characters(self, content): |
paul@35 | 223 | if not self.is_preformatted(): |
paul@35 | 224 | content = self.normalise(content, self.elements[-1]) |
paul@35 | 225 | Parser.characters(self, content) |
paul@35 | 226 | |
paul@35 | 227 | def skippedEntity(self, name): |
paul@35 | 228 | ch = htmlentitydefs.name2codepoint.get(name) |
paul@35 | 229 | if ch: |
paul@35 | 230 | self.text[-1].append(unichr(ch)) |
paul@35 | 231 | |
paul@35 | 232 | # Parser-related methods. |
paul@35 | 233 | |
paul@35 | 234 | def handleElement(self, name): |
paul@51 | 235 | |
paul@51 | 236 | """ |
paul@51 | 237 | Handle the completion of the element with the given 'name'. Any content |
paul@51 | 238 | will either be recorded for later use (by an enclosing element, for |
paul@51 | 239 | example) or emitted in some form. |
paul@51 | 240 | """ |
paul@51 | 241 | |
paul@59 | 242 | text = u"".join(self.text[-1]) |
paul@41 | 243 | |
paul@41 | 244 | # Handle state. |
paul@41 | 245 | |
paul@41 | 246 | if name == "table": |
paul@41 | 247 | self.table_rows = 0 |
paul@41 | 248 | elif name == "tr": |
paul@41 | 249 | self.table_columns = 0 |
paul@41 | 250 | |
paul@41 | 251 | # Find conversions. |
paul@41 | 252 | |
paul@35 | 253 | conversion = None |
paul@35 | 254 | |
paul@35 | 255 | # Handle list elements. |
paul@35 | 256 | |
paul@35 | 257 | if name == "li" and len(self.elements) > 1: |
paul@35 | 258 | list_tag = self.elements[-2] |
paul@35 | 259 | conversion = list_tags.get(list_tag) |
paul@35 | 260 | |
paul@35 | 261 | # Remember link target information. |
paul@35 | 262 | |
paul@35 | 263 | elif link_target_tags.has_key(name): |
paul@54 | 264 | target_details = [] |
paul@54 | 265 | |
paul@54 | 266 | # Get target details from the element's attributes. |
paul@54 | 267 | |
paul@54 | 268 | for attrname in link_target_tags[name]: |
paul@54 | 269 | attrvalue = self.attributes[-1].get(attrname) |
paul@54 | 270 | if attrvalue: |
paul@54 | 271 | target_details.append(attrvalue) |
paul@54 | 272 | prefix = link_target_prefixes.get(attrname) |
paul@54 | 273 | if prefix: |
paul@54 | 274 | target_details.insert(0, prefix) |
paul@54 | 275 | if attrname in link_label_attributes and not self.label: |
paul@54 | 276 | self.label = attrvalue |
paul@54 | 277 | |
paul@54 | 278 | # Make a link based on the details. |
paul@54 | 279 | |
paul@59 | 280 | self.target = u"/".join(target_details) |
paul@35 | 281 | self.target_type = name |
paul@35 | 282 | text = "" |
paul@35 | 283 | |
paul@51 | 284 | # For anchor links, just use the raw text and let Moin do the formatting. |
paul@51 | 285 | |
paul@51 | 286 | elif name == "ac:link-body": |
paul@54 | 287 | if not self.target_type: |
paul@54 | 288 | self.target_type = name |
paul@59 | 289 | self.label = text.strip() |
paul@51 | 290 | text = "" |
paul@51 | 291 | |
paul@55 | 292 | # For conventional links, remember the href attribute as the target. |
paul@55 | 293 | |
paul@55 | 294 | elif name == "a": |
paul@55 | 295 | self.target = self.attributes[-1].get("href") |
paul@59 | 296 | self.label = text.strip() |
paul@55 | 297 | text = "" |
paul@55 | 298 | |
paul@35 | 299 | # Remember macro information. |
paul@35 | 300 | |
paul@63 | 301 | elif name == "ac:parameter": |
paul@35 | 302 | self.macro_parameters[self.attributes[-1].get("ac:name")] = text |
paul@35 | 303 | text = "" |
paul@35 | 304 | |
paul@63 | 305 | elif name == "ac:default-parameter": |
paul@63 | 306 | self.macro_parameters[self.attributes[-2].get("ac:name")] = text |
paul@63 | 307 | text = "" |
paul@63 | 308 | |
paul@51 | 309 | # Handle single-level tags. |
paul@51 | 310 | |
paul@51 | 311 | elif name in single_level_tags and self.states[name] > 1: |
paul@51 | 312 | conversion = "%s" |
paul@51 | 313 | |
paul@51 | 314 | # Handle preformatted sections. |
paul@51 | 315 | |
paul@51 | 316 | elif name in preformatted_tags or name in formatted_tags: |
paul@51 | 317 | |
paul@51 | 318 | # Nest the section appropriately. |
paul@51 | 319 | |
paul@51 | 320 | level = 3 + self.max_level - self.level |
paul@51 | 321 | opening = "{" * level |
paul@51 | 322 | closing = "}" * level |
paul@51 | 323 | |
paul@51 | 324 | # Macro name information is used to style rich text body regions. |
paul@51 | 325 | |
paul@51 | 326 | if name != "table" and self.macro and macro_rich_text_styles.has_key(self.macro): |
paul@51 | 327 | details = macro_rich_text_styles[self.macro] |
paul@51 | 328 | title = self.macro_parameters.get("title") |
paul@51 | 329 | if title: |
paul@51 | 330 | details = "%s\n\n%s" % (details, title) |
paul@51 | 331 | |
paul@51 | 332 | conversion = "%s#!wiki %s\n\n%%s\n%s" % (opening, details, closing) |
paul@51 | 333 | |
paul@51 | 334 | elif name == "table": |
paul@51 | 335 | conversion = "%s#!table\n%%s\n%s" % (opening, closing) |
paul@51 | 336 | |
paul@51 | 337 | else: |
paul@60 | 338 | # Preformatted sections containing newlines must contain an initial |
paul@60 | 339 | # newline. |
paul@60 | 340 | |
paul@60 | 341 | if text.find("\n") != -1 and not text.startswith("\n"): |
paul@60 | 342 | opening += "\n" |
paul@60 | 343 | |
paul@51 | 344 | conversion = "%s%%s%s" % (opening, closing) |
paul@35 | 345 | |
paul@55 | 346 | # Handle the common case and simpler special cases. |
paul@35 | 347 | |
paul@55 | 348 | if not conversion: |
paul@35 | 349 | conversion = tags.get(name) |
paul@35 | 350 | |
paul@56 | 351 | |
paul@56 | 352 | |
paul@35 | 353 | # Attempt to convert the text. |
paul@35 | 354 | |
paul@35 | 355 | # Links require target information. |
paul@35 | 356 | |
paul@42 | 357 | if name in ("ac:link", "ac:image"): |
paul@54 | 358 | prefix = link_target_types.get(self.target_type, "") |
paul@51 | 359 | anchor = self.attributes[-1].get("ac:anchor") |
paul@58 | 360 | text = conversion % (prefix, anchor or self.target, self.label or text.strip() or self.target) |
paul@51 | 361 | self.target = self.target_type = self.label = None |
paul@35 | 362 | |
paul@55 | 363 | elif name == "a": |
paul@59 | 364 | text = conversion % (self.target, self.label or self.target) |
paul@55 | 365 | self.target = self.target_type = self.label = None |
paul@55 | 366 | |
paul@63 | 367 | # Macros require various kinds of information. |
paul@63 | 368 | |
paul@63 | 369 | elif name == "ac:macro": |
paul@63 | 370 | macro_name = self.attributes[-1]["ac:name"] |
paul@63 | 371 | |
paul@63 | 372 | # Handle the common cases for parameterised and unparameterised |
paul@63 | 373 | # substitutions. |
paul@35 | 374 | |
paul@35 | 375 | elif text and conversion: |
paul@35 | 376 | text = conversion % text |
paul@66 | 377 | elif simple_tags.has_key(name) and not self.is_preformatted(): |
paul@35 | 378 | text = simple_tags[name] |
paul@66 | 379 | elif simple_preformatted_tags.has_key(name) and self.is_preformatted(): |
paul@66 | 380 | text = simple_preformatted_tags[name] |
paul@35 | 381 | |
paul@63 | 382 | |
paul@63 | 383 | |
paul@41 | 384 | # Postprocess table columns and rows. |
paul@41 | 385 | |
paul@41 | 386 | if name in ("th", "td"): |
paul@41 | 387 | if self.table_columns: |
paul@41 | 388 | text = "\n|| %s" % text |
paul@41 | 389 | self.table_columns += 1 |
paul@41 | 390 | elif name == "tr": |
paul@41 | 391 | if self.table_rows: |
paul@41 | 392 | text = "\n==\n%s" % text |
paul@41 | 393 | self.table_rows += 1 |
paul@41 | 394 | |
paul@63 | 395 | |
paul@63 | 396 | |
paul@35 | 397 | # Normalise leading whitespace and indent the text if appropriate. |
paul@35 | 398 | |
paul@35 | 399 | if name in indented_tags: |
paul@63 | 400 | text = " " * self.indents[-1] + text.lstrip() |
paul@35 | 401 | |
paul@35 | 402 | # Add the converted text to the end of the parent element's text nodes. |
paul@35 | 403 | |
paul@35 | 404 | if len(self.text) > 1: |
paul@35 | 405 | nodes = self.text[-2] |
paul@58 | 406 | parent = self.elements[-2] |
paul@56 | 407 | |
paul@56 | 408 | # Where preceding text exists, add any blank line separators. |
paul@56 | 409 | |
paul@59 | 410 | if u"".join(nodes): |
paul@56 | 411 | |
paul@56 | 412 | # All top-level elements are separated with blank lines. |
paul@56 | 413 | |
paul@35 | 414 | if parent == "body": |
paul@56 | 415 | nodes.append("\n") |
paul@56 | 416 | |
paul@56 | 417 | # Block elements always cause a new line to be started. |
paul@56 | 418 | |
paul@58 | 419 | if name in block_tags or self.have_block and name not in span_override_tags: |
paul@35 | 420 | nodes.append("\n") |
paul@56 | 421 | |
paul@56 | 422 | self.have_block = False |
paul@56 | 423 | |
paul@58 | 424 | # Lists inside lists require separation. |
paul@58 | 425 | |
paul@58 | 426 | elif list_tags.has_key(name) and parent == "li": |
paul@58 | 427 | nodes.append("\n") |
paul@56 | 428 | |
paul@58 | 429 | # Without preceding text, save any block node state for non-block |
paul@60 | 430 | # elements so that newline separators can be added at another |
paul@58 | 431 | # level. |
paul@58 | 432 | |
paul@58 | 433 | elif name in block_tags and parent not in block_tags: |
paul@58 | 434 | self.have_block = True |
paul@58 | 435 | |
paul@58 | 436 | elif name not in block_tags and self.have_block and name not in span_override_tags: |
paul@56 | 437 | self.have_block = True |
paul@56 | 438 | |
paul@56 | 439 | else: |
paul@56 | 440 | self.have_block = False |
paul@56 | 441 | |
paul@35 | 442 | nodes.append(text) |
paul@35 | 443 | |
paul@56 | 444 | # Otherwise, emit the text (at the top level of the document). |
paul@35 | 445 | |
paul@35 | 446 | else: |
paul@35 | 447 | self.out.write(text) |
paul@35 | 448 | |
paul@35 | 449 | def is_preformatted(self): |
paul@51 | 450 | return reduce(operator.or_, [self.states[tag] for tag in preformatted_tags], False) |
paul@35 | 451 | |
paul@35 | 452 | # Whitespace normalisation. |
paul@35 | 453 | |
paul@35 | 454 | def get_replacement(self, name): |
paul@42 | 455 | if name in ("html", "body", "table", "tbody", "tr") or list_tags.has_key(name): |
paul@35 | 456 | return "" |
paul@35 | 457 | else: |
paul@35 | 458 | return " " |
paul@35 | 459 | |
paul@35 | 460 | def normalise(self, text, name): |
paul@35 | 461 | return normalise_regexp.sub(self.get_replacement(name), text) |
paul@35 | 462 | |
paul@35 | 463 | def parse(s, out): |
paul@35 | 464 | |
paul@35 | 465 | "Parse the content in the string 's', writing a translation to 'out'." |
paul@35 | 466 | |
paul@35 | 467 | # NOTE: CDATA sections appear to have erroneous endings. |
paul@35 | 468 | |
paul@35 | 469 | s = u"""\ |
paul@35 | 470 | <?xml version="1.0"?> |
paul@35 | 471 | <!DOCTYPE html |
paul@35 | 472 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
paul@35 | 473 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
paul@35 | 474 | <html xmlns="http://www.w3.org/1999/xhtml"> |
paul@35 | 475 | <body> |
paul@35 | 476 | %s |
paul@35 | 477 | </body> |
paul@35 | 478 | </html>""" % s.replace("]] >", "]]>") |
paul@35 | 479 | |
paul@35 | 480 | f = StringIO(s.encode("utf-8")) |
paul@35 | 481 | try: |
paul@35 | 482 | parser = ConfluenceXMLParser(out) |
paul@35 | 483 | parser.parse(f) |
paul@35 | 484 | finally: |
paul@35 | 485 | f.close() |
paul@35 | 486 | |
paul@35 | 487 | if __name__ == "__main__": |
paul@63 | 488 | s = codecs.getreader("utf-8")(sys.stdin).read() |
paul@41 | 489 | out = codecs.getwriter("utf-8")(sys.stdout) |
paul@41 | 490 | parse(s, out) |
paul@35 | 491 | |
paul@35 | 492 | # vim: tabstop=4 expandtab shiftwidth=4 |