Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
docutils.transforms.frontmatter.DocInfo Class Reference
Inheritance diagram for docutils.transforms.frontmatter.DocInfo:
Inheritance graph
[legend]
Collaboration diagram for docutils.transforms.frontmatter.DocInfo:
Collaboration graph
[legend]

Public Member Functions

 apply (self)
 
 extract_bibliographic (self, field_list)
 
 check_empty_biblio_field (self, field, name)
 
 check_compound_biblio_field (self, field, name)
 
 extract_authors (self, field, name, docinfo)
 
 authors_from_one_paragraph (self, field)
 
 authors_from_bullet_list (self, field)
 
 authors_from_paragraphs (self, field)
 
- Public Member Functions inherited from docutils.transforms.Transform
 __init__ (self, document, startnode=None)
 

Public Attributes

 rcs_keyword_substitutions
 
- Public Attributes inherited from docutils.transforms.Transform
 document
 
 startnode
 
 language
 

Static Public Attributes

int default_priority = 340
 
dict biblio_nodes
 
list rcs_keyword_substitutions
 
- Static Public Attributes inherited from docutils.transforms.Transform
 default_priority = None
 

Detailed Description

This transform is specific to the reStructuredText_ markup syntax;
see "Bibliographic Fields" in the `reStructuredText Markup
Specification`_ for a high-level description. This transform
should be run *after* the `DocTitle` transform.

If the document contains a field list as the first element (instances
of `nodes.PreBibliographic` are ignored), registered bibliographic
field names are transformed to the corresponding DTD elements,
becoming child elements of the <docinfo> element (except for a
dedication and/or an abstract, which become <topic> elements after
<docinfo>).

For example, given this document fragment after parsing::

    <document>
        <title>
            Document Title
        <field_list>
            <field>
                <field_name>
                    Author
                <field_body>
                    <paragraph>
                        A. Name
            <field>
                <field_name>
                    Status
                <field_body>
                    <paragraph>
                        $RCSfile$
        ...

After running the bibliographic field list transform, the
resulting document tree would look like this::

    <document>
        <title>
            Document Title
        <docinfo>
            <author>
                A. Name
            <status>
                frontmatter.py
        ...

The "Status" field contained an expanded RCS keyword, which is
normally (but optionally) cleaned up by the transform. The sole
contents of the field body must be a paragraph containing an
expanded RCS keyword of the form "$keyword: expansion text $". Any
RCS keyword can be processed in any bibliographic field. The
dollar signs and leading RCS keyword name are removed. Extra
processing is done for the following RCS keywords:

- "RCSfile" expands to the name of the file in the RCS or CVS
  repository, which is the name of the source file with a ",v"
  suffix appended. The transform will remove the ",v" suffix.

- "Date" expands to the format "YYYY/MM/DD hh:mm:ss" (in the UTC
  time zone). The RCS Keywords transform will extract just the
  date itself and transform it to an ISO 8601 format date, as in
  "2000-12-31".

  (Since the source file for this text is itself stored under CVS,
  we can't show an example of the "Date" RCS keyword because we
  can't prevent any RCS keywords used in this explanation from
  being expanded. Only the "RCSfile" keyword is stable; its
  expansion text changes only if the file name changes.)

.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _reStructuredText Markup Specification:
   https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html

Member Function Documentation

◆ apply()

docutils.transforms.frontmatter.DocInfo.apply (   self)
Override to apply the transform to the document tree.

Reimplemented from docutils.transforms.Transform.

◆ authors_from_one_paragraph()

docutils.transforms.frontmatter.DocInfo.authors_from_one_paragraph (   self,
  field 
)
Return list of Text nodes with author names in `field`.

Author names must be separated by one of the "autor separators"
defined for the document language (default: ";" or ",").

Member Data Documentation

◆ biblio_nodes

dict docutils.transforms.frontmatter.DocInfo.biblio_nodes
static
Initial value:
= {
'author': nodes.author,
'authors': nodes.authors,
'organization': nodes.organization,
'address': nodes.address,
'contact': nodes.contact,
'version': nodes.version,
'revision': nodes.revision,
'status': nodes.status,
'date': nodes.date,
'copyright': nodes.copyright,
'dedication': nodes.topic,
'abstract': nodes.topic}

◆ rcs_keyword_substitutions

list docutils.transforms.frontmatter.DocInfo.rcs_keyword_substitutions
static
Initial value:
= [
(re.compile(r'\$' r'Date: (\d\d\d\d)[-/](\d\d)[-/](\d\d)[ T][\d:]+'
r'[^$]* \$', re.IGNORECASE), r'\1-\2-\3'),
(re.compile(r'\$' r'RCSfile: (.+),v \$', re.IGNORECASE), r'\1'),
(re.compile(r'\$[a-zA-Z]+: (.+) \$'), r'\1')]

The documentation for this class was generated from the following file: