You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reading top level suite documentation from an external file #3983
I would like to add documentation using -D --doc argument followed with a file rather than a string of text, like (rebot|robot) --doc topleveldoc.robot other args
The file could be a .robot with just the top level documentation field, like :
*** Settings ***
Documentation A nice headline that I would like to add to my top level documentation
...
... Some more documentation
This formatting would enable IDE pretty formatting, linting ... (or python formatting ? like the variable file ?)
It should enable all the formatting features of the documentation.
Use case:
When combining or merging multiple files, there is no other way to fill top level documentation than the --doc argument.
What I'm doing right now:
testing various boards
generating reports without keywords from main reports
combining the report
I would like to add links in the top level doc to the main reports. This is where I need the feature of this ticket
Add that top level report into our CI job page and save me the hassles of digging into artifacts !
This ticket is connected to #3981 as a dependency to this ticket.
Possibly connected topic : metadata and all other top level features of a report/log.
Reading documentation from an external file is a good idea, but I think the file should then be used as-is. Needing to use *** Settings *** and especially needing to use ... with multiline documentation wouldn't be too convenient. Using *.robot format would have a benefit that also Metadata and other settings could possibly be specified there, but it would be strange if using --doc would also alter other settings. In my opinion it would be better to add separate support for reading Metadata from an external file with something like --metadata name:example.txt.
In my opinion this should work simply like --doc path/to/file.txt. Implementation would be easy: if the given doc points to an existing file, read file contents and use that as documentation.
This functionality would also enable using other formats than plain text with Robot's own formatting. For example, HTML could be supported with --doc doc.html and we could also pretty easily convert Markdown and reST formats into HTML. This would, however, require enhancements in how doc is handled in general. At the moment you cannot use other than plain text with it and support for alternative formats would need to be implemented. That part requires its own issue.
Could you @lesnake submit a new issue about just reading the doc directly from the file? The current description talks about *.robot files and, as discussed above, that's not so good idea. Alternatively you could update the description, but then this remaining conversation would look strange.
Activity
pekkaklarck commentedon May 25, 2021
Reading documentation from an external file is a good idea, but I think the file should then be used as-is. Needing to use
*** Settings ***and especially needing to use...with multiline documentation wouldn't be too convenient. Using*.robotformat would have a benefit that also Metadata and other settings could possibly be specified there, but it would be strange if using--docwould also alter other settings. In my opinion it would be better to add separate support for reading Metadata from an external file with something like--metadata name:example.txt.pekkaklarck commentedon May 25, 2021
In my opinion this should work simply like
--doc path/to/file.txt. Implementation would be easy: if the given doc points to an existing file, read file contents and use that as documentation.This functionality would also enable using other formats than plain text with Robot's own formatting. For example, HTML could be supported with
--doc doc.htmland we could also pretty easily convert Markdown and reST formats into HTML. This would, however, require enhancements in how doc is handled in general. At the moment you cannot use other than plain text with it and support for alternative formats would need to be implemented. That part requires its own issue.lesnake commentedon May 25, 2021
I agree, especially with
pekkaklarck commentedon Jun 7, 2021
Could you @lesnake submit a new issue about just reading the doc directly from the file? The current description talks about
*.robotfiles and, as discussed above, that's not so good idea. Alternatively you could update the description, but then this remaining conversation would look strange.pekkaklarck commentedon Jun 9, 2021
Closing in favor of #4008.