regulations.generator package

Submodules

regulations.generator.api_reader module

regulations.generator.generator module

regulations.generator.html_builder module

regulations.generator.label module

regulations.generator.node_types module

regulations.generator.node_types.label_to_text(label, include_section=True, include_marker=False)[source]

Convert a label:list[string] into a human-readable string

regulations.generator.node_types.take_until_markerless(label_parts)[source]
regulations.generator.node_types.to_markup_id(id_parts)[source]

Given the id parts from the JSON tree, convert to an id that can be used in the front end

regulations.generator.node_types.type_from_label(label)[source]

Given a list of label parts, determine the associated node’s type

regulations.generator.notices module

regulations.generator.notices.add_depths(sxs, starting_depth)[source]

We use depth numbers in header tags to determine how titles are output.

regulations.generator.notices.filter_labeled_children(sxs)[source]

Some children don’t have labels. We display those with their parents. The other children are displayed when they are independently, specifically requested.

regulations.generator.notices.find_label_in_sxs(sxs_list, label_id, fr_page=None)[source]

Given a tree of SXS sections, find a non-empty sxs that matches label_id. Some notices may have the same label appearing multiple times; use fr_page to distinguish, defaulting to the first

regulations.generator.notices.non_empty_sxs(sxs)[source]

regulations.generator.section_url module

regulations.generator.subterp module

regulations.generator.title_parsing module

regulations.generator.title_parsing.appendix_supplement(data)[source]

Handle items pointing to an appendix or supplement

regulations.generator.title_parsing.section(data)[source]

Parse out parts of a section title.

regulations.generator.title_parsing.try_split(text, chars=(u'\u2014', '-'))[source]

Utility method for splitting a string by one of multiple chars

regulations.generator.toc module

regulations.generator.versions module

Module contents