Menu

#325 Warning on multiparagraph copyright field that is correctly recognised

closed-invalid
nobody
None
5
2020-03-03
2017-10-03
No

[Forwarded from Debian #877444]

Trying to convert the attached file to a manpage I get a warning:

debdate.1.rst:11: (WARNING/2) Cannot extract compound bibliographic field "Copyright".

This probably comes from line 460 in docutils/transforms/frontmatter.py.

From the specs it isn't clear whether multiple paragraphs are supported so it could be an error in the source document.

The reason I'm opening this bug, however, is that in the resulting man page the second paragraph is correctly recognised and rendered, so the warning is somewhat misleading.

1 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2017-10-05

    Coming from a standard transform, the warning is not specific to rst2man but shown with every docutils front-end.

    The documentation may be difficult to understand but is, IMO, non-ambiguous:

    Unless otherwise indicated below, each of the bibliographic elements’ field bodies
    may contain a single paragraph only.

    with the exceptions: “Authors”, “Dedication”, “Abstract”, and unregistered/generic fields.

    The "copyright" field may only have one paragraph and is hence not recognized as a registered bibliographic field despite the matching field name. This is what the warning tries to convey. (Suggestions for a better wording are welcome.)

    A "warning" is issued, because the result may not be what you expect but there is no error preventing conversion of the document into the target format.
    The warning can be silenced with the "report" option/setting. Then, the "copyright" field is parsed as generic docinfo field. This is not a bug but a feature.

    Workarounds:

    • convert with report=errors
    • put the license info into a separate field:
       :Copyright: 2017 E. X. Ample
       :License: Released under the terms of the 
                           Do What The Fuck You Want To Public License, Version 2, 
                           as published by Sam Hocevar. http://www.wtfpl.net/
      

    "License" will become a generic field (it is not in the set currently registerd in rST).

    You may consider an enhancement request (or discussion on the developers list) for either a multi paragraph "copyright" or a registered "license" field.
    (Dublin core, e.g., has both "rights" and "license" in the set of Metadata Terms.)

     

    Last edit: Günter Milde 2017-10-06
  • Günter Milde

    Günter Milde - 2017-10-06
    • status: open --> closed-invalid
     
  • Günter Milde

    Günter Milde - 2017-10-06

    Closing as invalid: The warning is justified because the docinfo field in this example is recognized as generic docinfo field while the field name suggest the intention to get this recognized as a "copyright" element.
    (See the preceding comment for workarounds and suggestions.)
    Thank you for reporting.

     

Log in to post a comment.

MongoDB Logo MongoDB