-
Notifications
You must be signed in to change notification settings - Fork 1
Tag Value Writing
The module spdx.writers.tagvalue
contains methods for writing out an SPDX document in tag/value format.
Takes two parameters document and out
out is any object that has a write method that takes as an argument a string to output, usually it's a file.
This method prints the top-level document fields version
, data_license
and comment
. It uses the other methods in this module to output the subcomponents of the Document creation_info
, reviews
, package
and extracted_licenses
.
It raises an InvalidDocumentError
(defined in the same module) if the document.validate
returns False
.
Note:
Document validation is only partially implemented.
Specifically package
, extracted_license
and file
validations are stubs that return True
.
Takes two arguments creation_info and out
.
It writes out all the fields of creation_info
in Tag/Value format.
Takes two arguments review and out
.
It writes out all the fields of review
in Tag/Value format.
Unimplemented, takes two arguments lics and out
.
It writes out all the fields of lics
in Tag/Value format.
Takes two arguments package and out
.
It writes out all the fields of package
in Tag/Value format.
Takes two arguments file and out
.
It writes out all the fields of file
in Tag/Value format.