02707: Add markup notes to html output

part 1: remove template from html output


svn: r12631
This commit is contained in:
Benny Malengier
2009-06-06 09:49:40 +00:00
parent aa499dfec7
commit 542b1e404d
18 changed files with 402 additions and 589 deletions

View File

@ -84,7 +84,7 @@ from gen.plug.menu import PersonOption, NumberOption, StringOption, \
BooleanOption, EnumeratedListOption, FilterOption, \
NoteOption, MediaOption, DestinationOption
from ReportBase import (Report, ReportUtils, MenuReportOptions, CATEGORY_WEB,
Bibliography)
Bibliography, CSS_FILES )
import Utils
import ThumbNails
import ImgManip
@ -96,6 +96,7 @@ from DateHandler import displayer as _dd
from DateHandler import parser as _dp
from gen.proxy import PrivateProxyDb, LivingProxyDb
from gen.lib.eventroletype import EventRoleType
from libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS
#------------------------------------------------------------------------
#
@ -125,88 +126,6 @@ _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.
_CSS_FILES = [
# First is used as default selection.
[_("Basic-Ash"), 'Web_Basic-Ash.css'],
[_("Basic-Cypress"), 'Web_Basic-Cypress.css'],
[_("Basic-Lilac"), 'Web_Basic-Lilac.css'],
[_("Basic-Peach"), 'Web_Basic-Peach.css'],
[_("Basic-Spruce"), 'Web_Basic-Spruce.css'],
[_("Mainz"), 'Web_Mainz.css'],
[_("Nebraska"), 'Web_Nebraska.css'],
[_("Visually Impaired"), 'Web_Visually.css'],
[_("No style sheet"), ''],
]
_CHARACTER_SETS = [
# First is used as default selection.
# As you see these on the internet, they are in full capital letters.
# UTF-8 is specifically identified instead of the entire unicode set.
[_('Unicode UTF-8 (recommended)'), 'UTF-8'],
['ISO-8859-1', 'ISO-8859-1' ],
['ISO-8859-2', 'ISO-8859-2' ],
['ISO-8859-3', 'ISO-8859-3' ],
['ISO-8859-4', 'ISO-8859-4' ],
['ISO-8859-5', 'ISO-8859-5' ],
['ISO-8859-6', 'ISO-8859-6' ],
['ISO-8859-7', 'ISO-8859-7' ],
['ISO-8859-8', 'ISO-8859-8' ],
['ISO-8859-9', 'ISO-8859-9' ],
['ISO-8859-10', 'ISO-8859-10' ],
['ISO-8859-13', 'ISO-8859-13' ],
['ISO-8859-14', 'ISO-8859-14' ],
['ISO-8859-15', 'ISO-8859-15' ],
['koi8_r', 'koi8_r', ],
]
_CC = [
'',
'<a rel="license" href="http://creativecommons.org/licenses/by/2.5/">'
'<img alt="Creative Commons License - By attribution" '
'title="Creative Commons License - By attribution" '
'src="%(gif_fname)s" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nd/2.5/">'
'<img alt="Creative Commons License - By attribution, No derivations" '
'title="Creative Commons License - By attribution, No derivations" '
'src="%(gif_fname)s" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">'
'<img alt="Creative Commons License - By attribution, Share-alike" '
'title="Creative Commons License - By attribution, Share-alike" '
'src="%(gif_fname)s" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/">'
'<img alt="Creative Commons License - By attribution, Non-commercial" '
'title="Creative Commons License - By attribution, Non-commercial" '
'src="%(gif_fname)s" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.5/">'
'<img alt="Creative Commons License - By attribution, Non-commercial, No derivations" '
'title="Creative Commons License - By attribution, Non-commercial, No derivations" '
'src="%(gif_fname)s" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/">'
'<img alt="Creative Commons License - By attribution, Non-commerical, Share-alike" '
'title="Creative Commons License - By attribution, Non-commerical, Share-alike" '
'src="%(gif_fname)s" /></a>'
]
_COPY_OPTIONS = [
_('Standard copyright'),
_('Creative Commons - By attribution'),
_('Creative Commons - By attribution, No derivations'),
_('Creative Commons - By attribution, Share-alike'),
_('Creative Commons - By attribution, Non-commercial'),
_('Creative Commons - By attribution, Non-commercial, No derivations'),
_('Creative Commons - By attribution, Non-commercial, Share-alike'),
_('No copyright notice'),
]
wrapper = TextWrapper()
wrapper.break_log_words = True
wrapper.width = 20
@ -3571,8 +3490,8 @@ class NavWebOptions(MenuReportOptions):
cright.set_help( _("The copyright to be used for the web files"))
menu.add_option(category_name, "cright", cright)
css = EnumeratedListOption(_('StyleSheet'), _CSS_FILES[0][1])
for style in _CSS_FILES:
css = EnumeratedListOption(_('StyleSheet'), CSS_FILES[0][1])
for style in CSS_FILES:
css.add_item(style[1], style[0])
css.set_help( _('The stylesheet to be used for the web page'))
menu.add_option(category_name, "css", css)