Stobber Posted April 22, 2014 Report Share Posted April 22, 2014 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. Link to comment Share on other sites More sharing options...
Jim Kring Posted April 22, 2014 Report Share Posted April 22, 2014 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) Link to comment Share on other sites More sharing options...
Stobber Posted May 1, 2014 Author Report Share Posted May 1, 2014 This doesn't work for .ogp files and some .vip files I've seen on LAVA. Specifically, these two don't have a "license" file in the root of the ZIP; the license is buried in a config file named "spec", instead. http://lavag.org/files/file/163-icon-editor-api/ http://lavag.org/files/file/212-sqlite-labview/ 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? Link to comment Share on other sites More sharing options...
Stobber Posted May 1, 2014 Author Report Share Posted May 1, 2014 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! Link to comment Share on other sites More sharing options...
Jim Kring Posted May 1, 2014 Report Share Posted May 1, 2014 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.