lib.metadata.extract¶
Title, Subtitle, and Metadata extraction of reStructuredText.
-
django_docutils.lib.metadata.extract.extract_title(document)¶
Return the title of the document.
- Parameters:
document (
docutils.nodes.document) – Document to return title for.- Returns:
Title of document or None if not found.
- Return type:
str or None
-
django_docutils.lib.metadata.extract.extract_metadata(document)¶
Return the dict containing document metadata.
- Parameters:
document (
docutils.nodes.document) – Document extract metadata from.- Returns:
docinfo data from document
- Return type:
See also
From:,License:
-
django_docutils.lib.metadata.extract.extract_subtitle(document)¶
Return the subtitle of the document.
-
django_docutils.lib.metadata.extract.extract_abstract(doctree, length=100)¶
Pull first n words from a docutils document.
We use this to create snippets for Twitter Cards, FB, etc.