Skip to content

Instantly share code, notes, and snippets.

@jasonbaker
Created October 5, 2011 21:23
Show Gist options
  • Save jasonbaker/1265778 to your computer and use it in GitHub Desktop.
Save jasonbaker/1265778 to your computer and use it in GitHub Desktop.
class WikipediaArticle(wiki.MediaWikiArticle):
sectionType = WikipediaSection
classNameProp = 'sub'
lang = 'en'
refSectionHeader = "References"
extLinkSectionHeader = "External link"
title = item.StoredField(setHook=wiki.encodeUTF8, key=True)
# XXX: This is a performance hit!
unicodeTitle = property(fget=lambda s: s.title.decode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment