github / choosealicense.com

A site to provide non-judgmental guidance on choosing a license for your open source project
https://choosealicense.com
MIT License
3.68k stars 1.34k forks source link

Raw license static url #1176

Open Dlurak opened 10 months ago

Dlurak commented 10 months ago

Currently users have to visit the site, choose the license, copy it contents and put it into a new file.

I think it would be beneficial if only the content of a license would be available under a standalone uri. It would allow for things like this:

$ curl https://choosealicense.com/licenses/agpl-3.0.txt > LICENSE

Happy new year 2024! What do you think?

mlinksva commented 10 months ago

Happy new year! It's a reasonable idea but would require some restructuring of this repo and additional URLs to support forever. I don't oppose it but probably won't personally get to it. Less convenient to type, but the following should (not in a place to test it at the moment) get you the same result (the licenses in this repo are the ones github.com knows about, this repo is ultimately the source):

$ curl https://api.github.com/licenses/agpl-3.0 |  jq --raw-output '."body"' > LICENSE