diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index ddf0ecd7c..044cc2187 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -96,9 +96,11 @@ _HGAP = 30 _SHADOW = 5 _XOFFSET = 5 -#This information defines the list of styles in the Narrative Web options dialog as well as the location of the corresponding SCREEN stylesheets. +# This information defines the list of styles in the Narrative Web +# options dialog as well as the location of the corresponding SCREEN +# stylesheets. _CSS_FILES = [ - + # First is used as default selection. [_("Basic - Ash"), 'NWeb-Screen_Basic-Ash.css'], [_("Basic - Cypress"), 'NWeb-Screen_Basic-Cypress.css'], [_("Basic - Lilac"), 'NWeb-Screen_Basic-Lilac.css'], @@ -110,6 +112,7 @@ _CSS_FILES = [ ] _CHARACTER_SETS = [ + # First is used as default selection. [_('Unicode (recommended)'), 'utf-8'], ['ISO-8859-1', 'iso-8859-1' ], ['ISO-8859-2', 'iso-8859-2' ], @@ -221,6 +224,11 @@ class BasePage: self.warn_dir = True self.cur_name = None # Internal use. The name of the output file, to be used for the tar archive. + self.author = get_researcher().get_name() + if self.author: + self.author = self.author.replace(',,,', '') + self.up = False + # TODO. All of these attributes are not necessary, because we have # als the options in self.options. Besides, we need to check which # are still required. @@ -290,8 +298,8 @@ class BasePage: self.cur_name = name + self.ext if self.archive: self.string_io = StringIO() - of = codecs.EncodedFile(self.string_io, 'utf-8', self.encoding, - 'xmlcharrefreplace') + of = codecs.EncodedFile(self.string_io, 'utf-8', + self.encoding, 'xmlcharrefreplace') else: page_name = os.path.join(self.html_dir, self.cur_name) of = codecs.EncodedFile(open(page_name, "w"), 'utf-8', @@ -371,7 +379,6 @@ class BasePage: of.write('\t
') if self.author: - self.author = self.author.replace(',,,', '') year = time.localtime(time.time())[0] cright = _('© %(year)d %(person)s') % { 'person' : self.author, @@ -379,7 +386,7 @@ class BasePage: of.write('%s' % cright) of.write('
\n') of.write('\t