behave_manners.pagelems.index_elems module¶
-
class
IHeadObject
(tag=None, attrs=())¶ Bases:
behave_manners.pagelems.index_elems.ISomeObject
-
reduce
(site=None)¶ Cleanup internally, possibly merging nested elements
None can be returned, in case this element is no longer useful. reduce() shall be called after all children have been scanned and appended to this; after thet have been reduced.
If site is provided, this should be a context object, which provides (or consumes) additional resources from this element.
-
-
class
IHtmlObject
(tag=None, attrs=())¶ Bases:
behave_manners.pagelems.index_elems.ISomeObject
Consume the <html> element as top-level index page
-
class
ILinkObject
(tag, attrs)¶ Bases:
behave_manners.pagelems.base_parsers.DBaseLinkElement
-
class
ISomeObject
(tag=None, attrs=())¶ Bases:
behave_manners.pagelems.base_parsers.DPageElement
Base class for ‘index.html’ and its sub-elements
These override reduce() so that <link> elements are consumed and the rest is discarded.
-
reduce
(site=None)¶ Cleanup internally, possibly merging nested elements
None can be returned, in case this element is no longer useful. reduce() shall be called after all children have been scanned and appended to this; after thet have been reduced.
If site is provided, this should be a context object, which provides (or consumes) additional resources from this element.
-
-
class
IndexHTMLParser
(site_collection)¶ Bases:
behave_manners.pagelems.base_parsers.BaseDPOParser
Parser only for ‘index.html’, containing links to other pages
In this pseydo-HTML site language, ‘index.html’ is only allowed to contain
<link>
elements to other named page object files. This parser restricts any other HTML elements for this file.Example:
<html> <link rel="next" href="main-page.html" title="Main Page" url="/"> <link rel="preload" href="common-components.html"> </html>
-
handle_starttag
(tag, attrs)¶
-
logger
= <Logger behave_manners.pagelems.index_elems.IndexHTMLParser (WARNING)>¶
-