Source code for bkgen.source
from bl.file import File
[docs]class Source(File):
"""Base class/mixin for supported source formats. All sources must have the following properties and methods.
**fn**
the filesystem path (filename) of the source, or None
**write()**
to write the source to the filesystem
"""
[docs] def documents(self):
"""returns a list of XML documents, with the root element tag pub:document, from the Source.
"""
return []
[docs] def images(self):
"""returns a list of bf.image.Image objects provided by the Source.
"""
return []
[docs] def stylesheet(self):
"""returns a :doc:`bkgen.css.CSS </api/css>` stylesheet object provided by the Source, or None.
"""
return None