-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Licenses content #1
Conversation
var request = require('request'); | ||
var cheerio = require('cheerio'); | ||
var ent = require('ent'); | ||
var url = 'http://spdx.org/licenses/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get all the licenses in go from here: http://git.spdx.org/license-list.git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't know about that repository, I will change it to get data from there.
Hah, yeah I intended too, just couldn't decide on how to embed them, so I deferred it. Options:
Opinions? |
Should also include the license link (eg. |
I probably prefer 1 or 2 :) |
How about precomputing two JSON files, one minimal |
} | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit fragile. Easier to just download the file with all the licenses: http://git.spdx.org/?p=license-list.git;a=snapshot;h=HEAD;sf=tgz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use https://github.com/kevva/download instead of request
to easily just fetch and untar it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree that its fragile :/ But that link contains all the licenses with git metadata so it might be hard to parse it for specific license.
What about just cloning that git repository? http://git.spdx.org/license-list.git (but Im not sure if its good idea to call it form node and also it will create another git repository inside this one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that link contains all the licenses with git metadata so it might be hard to parse it for specific license.
Uhm, why? You just untar it. I just did on my Mac and it extracted into a folder with all the licenses as files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry you are right (stupid unrarchiver)
Thanks :) |
Hey, I have added licenses content because it looks useful to me, but Im not sure if you want it also so feel free to ignore this :)