Skip to content
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

Feature Request: Add interactive license generator #406

Closed
7 of 10 tasks
sandr01d opened this issue Nov 5, 2024 · 5 comments
Closed
7 of 10 tasks

Feature Request: Add interactive license generator #406

sandr01d opened this issue Nov 5, 2024 · 5 comments

Comments

@sandr01d
Copy link
Collaborator

sandr01d commented Nov 5, 2024

Check list

  • I have read through the README
  • I have the latest version of forgit
  • I have searched through the existing issues

Environment info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:
  • Shell
    • bash
    • zsh
    • fish

Feature

Similar to #405, I'd like have an interactive license generator that let's you pick from a bunch of common licenses. Unfortunately, I am not aware of a nice repo that provides such license templates that is actively maintained. We could use the GitHub API to retrieve this information. It provides these licenses:

  • agpl-3.0
  • apache-2.0
  • bsd-2-clause
  • bsd-3-clause
  • bsl-1.0
  • cc0-1.0
  • epl-2.0
  • gpl-2.0
  • gpl-3.0
  • lgpl-2.1
  • mit
  • mpl-2.0
  • unlicense

The downside of this is that we'd need a way to handle the json responses from the API, e.g. by addding jq as a dependency. What are your thoughts on this? Maybe somebody knows a good repo providing license templates, so we would be able to implement this feature without having to introduce a new dependency?
Would be up to implement this feature myself, just wanted to check back with you regarding the license templates as mentioned above.

@cjappl
Copy link
Collaborator

cjappl commented Nov 5, 2024

This is pretty clever. I am not against this feature at all, but some concerns:

  • This isn't really git related, more project management. Is it orthogonal to the rest of forgit?
  • Is this somewhere that a massive speed-up would be beneficial? It seems like users would do this once, then forget about it. Is it worth adding a dependency etc for something people do for 5 seconds of a project setup?

Again, not against this feature, just some things that came to my mind when thinking it over.

@sandr01d
Copy link
Collaborator Author

sandr01d commented Nov 5, 2024

This isn't really git related, more project management. Is it orthogonal to the rest of forgit?

This is true, but I personally still see a value in having such a utility anyways. Maybe it makes more sense that I create a separate project for it?

Is this somewhere that a massive speed-up would be beneficial? It seems like users would do this once, then forget about it. Is it worth adding a dependency etc for something people do for 5 seconds of a project setup?

I'd personally use it exactly as often as I use gi - each time I create a new repository. Call me lazy, but I find copy/pasting license files from the internet tedious. I think the dependency is the main issue here. If it weren't for that, I think this would be fine. Adding a dependency for a single function that will only be used by a subset of users would not be a good idea.

Going forward, I see the following options:

  1. We could create maintain a repo with the necessary license file templates and implement the command similar to gi.
  2. I create a separate project not based on forgit to implement this functionality.

WDYT?

@cjappl
Copy link
Collaborator

cjappl commented Nov 5, 2024

I'd personally use it exactly as often as I use gi - each time I create a new repository. Call me lazy, but I find copy/pasting license files from the internet tedious.

Yeah, I will say I am a huge fan of gi and use it constantly when I spin up a new directory I want to track in git. I do not think that "users will only use it once" disqualifies us putting it in there

This is true, but I personally still see a value in having such a utility anyways. Maybe it makes more sense that I create a separate project for it?

Definitely there is value in it. I think the big question is does it live in forgit, and I can see some pros/cons of each of them.

Definitely interested in what the other maintainers think. I think this is a high value idea, but I'm not sure how much we should preserve the "unix tool philosophy" of forgit only interacting with git commands. I can really see it going either way.

@carlfriedrich
Copy link
Collaborator

I would strongly prefer this in a separate tool. This is definitely not git-related, and I think we should stick to the "do one thing and do it well" principle here.

That being said, I know that the Yocto project maintains a list of common licenses. See the repo folder here.

@sandr01d
Copy link
Collaborator Author

Alright, closing this then. In case I do get to implement this outside of forgit, I'll drop a link in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants