By convention, values constant in this program carry names
all in capital letters, with underbar (_) as
the word separator.
#================================================================ # Manifest constants #----------------------------------------------------------------
Internally we carry month numbers such as '03'. This dictionary translates month numbers
to month names.
MONTH_NAME_MAP = {
'01': 'Jan', '02': 'Feb', '03': 'Mar',
'04': 'Apr', '05': 'May', '06': 'Jun',
'07': 'Jul', '08': 'Aug', '09': 'Sep',
'10': 'Oct', '11': 'Nov', '12': 'Dec' }
The Audubon Field Notes
reporting seasons are tied to months of the year. This
dictionary translates month numbers into season names,
which in turn connect the rendering of the index table to
the seasonal column color codes defined in Section 5.4, “Seasonal column markup rules: th.winter, etc.”.
MONTH_SEASON_MAP = {
'01': 'winter', '02': 'winter', '03': 'spring',
'04': 'spring', '05': 'spring', '06': 'summer',
'07': 'summer', '08': 'fall', '09': 'fall',
'10': 'fall', '11': 'fall', '12': 'winter' }
This pattern matches year numbers in the range 1000-2999.
The '$' character is the end-of-line
anchor, and matches only at the end of a string.
YEAR_PAT = re.compile (
r'[12]' # First digit must be 1 or 2
r'\d{3}' # Followed by three more digits
r'$' ) # Insure that the entire string was matched
This pattern matches the name of a monthly file such as
'2005-09.xml'. Note that it will match
invalid month names such as '1999-00.xml'
and '2008-19.xml', but that is hardly
a world-shattering defect.
YYYY_MM_XML_PAT = re.compile (
r'[12]\d{3}' # Matches 1000-2999
r'\-' # Matches '-'
r'[01]\d' # Matches 00-19
r'\.' # Matches '.'
r'xml' # Matches 'xml'
r'$' ) # End-of line anchor: insure a complete match
This string is appended to “yyyy-mm” month names to form the name of each generated monthly report page.
HTML_EXT = '.html'
This string, with HTML_EXT appended, is
the name of the page to be generated containing the index
table.
INDEX_PAGE_NAME = 'field'
Title of the index page.
INDEX_PAGE_TITLE = "John W. Shipman's Field Notes"
This is the URL of the page explaining the conventions used in the field notes display.
CONVENTIONS_URL = '/~shipman/aba/'
This class name is used to link the index table to the
rule given in Section 5.3, “table.seasons”.
SEASONS_CLASS = 'seasons'
This constant determines how often a year's row in the table has a thicker lower border. For example, if the value is 5, this groups years visually into groups of five, so the reader's eye can more easily track across the row.
YEAR_GROUP_FREQUENCY = 5
See Section 10.11, “YEAR_GROUP_FREQUENCY” for an
explanation of year groups. This value is the CSS
stylesheet class to be applied to year rows that are a
multiple of YEAR_GROUP_FREQUENCY. This
class name is tied to the CSS rule in Section 5.5, “CSS rules for rows of the index table”.
YEAR_GROUP_CLASS = 'year-group'
CSS link for rows in the index table for normal years.
YEAR_ROW_CLASS = 'year-row'
This constant defines the CSS class name for the row labels in the index table. See Section 5.5, “CSS rules for rows of the index table”.
ROW_LABEL_CLASS = 'row-label'
The entity has the Unicode
position  .
NBSP = u'\u00a0'
Greek lowercase phi, used to denote an age class of
“female or immature.” Symbolically this
entity is “&phiv”.
PHI = u'\u03d5'
This is the URL of the stylesheet for the generated pages.
CSS_URL = 'http://www.nmt.edu/~shipman/aba/doc/noteweb/birdnotes.css'
Escape from the weight of your corporate logo. | ||
| --Frank Zappa | ||
ZDP_LOGO = 'http://www.nmt.edu/~shipman/zdplogo.png'
The homepage for navigational links.
ZDP_URL = 'http://www.nmt.edu/~shipman/z'
Used to link to the CSS rule in Section 5.7, “div.loc-child: Indented child
block”.
LOC_CHILD_CLASS = 'loc-child'
Used to link a span element to highlight
notable records; see Section 5.2, “Inline markup rules”.
NOTABLE_CLASS = 'notable'
CSS class for daily summary blocks; see Section 5.8, “div.day-summary: Daily summary
block”.
DAY_SUMMARY_CLASS = 'day-summary'
CSS class for locality definitions; see Section 5.9, “div.loc-def: Location definition”.
LOC_DEF_CLASS = 'loc-def'
CSS class for narrative about a locality; see Section 5.10, “div.loc-narrative: Locality narrative”.
LOC_NARRATIVE_CLASS = 'loc-narrative'
CSS class for run-in paragraph labels; see Section 5.2, “Inline markup rules”.
LOC_LABEL_CLASS = 'loc-label'
CSS class for an ordinary text paragraph; see Section 5.11, “div.para: Ordinary paragraphs”.
PARA_CLASS = 'para'
CSS class for the div that wraps all data
for a single bird form. See Section 5.12, “div.form: General form-related data”.
FORM_CLASS = 'form'
A variant for notable records that gives more space.
NOTABLE_FORM_CLASS = 'notable-form'
CSS class for the span that wraps the name
of a form of bird.
BIRD_NAME_CLASS = 'bird-name'
CSS class for the div element that wraps
each sighting in the multi-sighting case.
FLOC_CLASS = 'floc'