Extract license text from VIP file
Posted 22 April 2014 - 04:52 PM
Posted 22 April 2014 - 04:59 PM
Is there a way to do extract the full text of a software license/copyright from a .vip with the VIPM API? I need to automatically collate the licenses for dependencies in a new text file as part of our build process.
Here is an unofficial way to read the license text that is not guaranteed not to break in the future (and, if you can't find an officially supported way to do this, feel free to suggest it in the VIPM Idea Exchange)
(this uses the OpenG ZIP Library)
Posted 01 May 2014 - 04:59 PM
It'd be one thing if I could use the file type to decide which format to look for ("license" or "spec"), but one of those is a VIP file that's been updated pretty recently. Did the file format change at some point? Is there a format version I can check to decide where to look for the license in a given file?
Posted 01 May 2014 - 05:10 PM
Posted 01 May 2014 - 10:28 PM
Actually, I think I spoke too soon. I see that if the build spec doesn't give any license text, the license file isn't included in the ZIP. I added logic to handle this gracefully. Thanks!
The spec file contains the license agreement name, whereas the "license" text file contains the actual license agreement content. Back in the days of OGP files, we only supported the license agreement name in the spec file and not including the actual agreement itself.
It sounds like you've got what you need. Hopefully my addition comments are helpful, too