Jump to content


Photo

Extract license text from VIP file


  • Please log in to reply
4 replies to this topic

#1 Stobber

Stobber
  • Members
  • 17 posts

Posted 22 April 2014 - 04:52 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.
  • 0

#2 Jim Kring

Jim Kring
  • JKI Team
  • 1,267 posts

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)

Read VIP License Text.png
(this uses the OpenG ZIP Library)
  • 2

#3 Stobber

Stobber
  • Members
  • 17 posts

Posted 01 May 2014 - 04:59 PM

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/fil...con-editor-api/
http://lavag.org/fil...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?
  • 0

#4 Stobber

Stobber
  • Members
  • 17 posts

Posted 01 May 2014 - 05:10 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!
  • 0

#5 Jim Kring

Jim Kring
  • JKI Team
  • 1,267 posts

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 :)
  • 1