[Feature] Add support for the WTFPL license
Summary 💡
Until now, WTFPL hasn’t been supported by onefetch. Hopefully, this license can also be correctly recognized by onefetch.
Motivation 🔦
There are indeed quite a few projects using the WTFPL license in tens of thousands of warehouses worldwide, and I think adding support for the WTFPL license would be beneficial for onefetch.
I was going to tell you to raise an issue at askalono, but it's been archived 🙃
I guess we have some choices:
- Just live with the fact that askalono probably won't get updates ever again.
- Search for a new tool to identify licenses.
- Write our own version (and then we can implement this feature request).
Personally I'm leaning towards writing our own version. I don't think perfect, 100% accuracy is necessary, and we can write a simplified version that just maps unique strings and/or regular expressions to license identifiers.
@o2sh What do you think? Also, can we just update resources/license.cache.zstd ourselves to add support for new licenses? I'm not sure where that file comes from.
Seems like WTFPL is already supported, I tested it on a few repos:
https://github.com/preservim/nerdtree
https://github.com/denysdovhan/wtfjs
To reproduce the issue we need an example of a repo where the license wasn't detected. @TangHanchen can you provide that?
@spenserblack I updated the license cache in 3054de77f95a82bf4af3a6cc34649c037342ed4e it comes from https://github.com/spdx/license-list-data/tree/main/json/details
Thanks @o2sh
:thinking: What's the output of onefetch --version, @TangHanchen? Have you tried using the latest version?
I built it from the source code, and it can already recognize WTFPL normally. Big thanks to o2sh!