Giter Club home page Giter Club logo

thanks's Introduction

thanks

Finding ways to fund the python packages you use. Inspired by feross' thanks.

Run thanks on your requirements.txt to find ways to support the developers who are supporting your code. πŸ’š

asciicast

$ pip install thanks
$ thanks requirements.txt

Contributing

The best way to contribute is to add info to thanks/thanks.json about contributors, matching PyPI usernames to URLs.

The second best way is to add whatever you think will make this library more useful. I will happily accept PRs for tests, better functionality, better output formatting, etc.

thanks's People

Contributors

jezdez avatar kennethreitz avatar lamby avatar martinmaillard avatar phildini avatar singingwolfboy avatar therealphildini avatar tomdottom avatar untitaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

thanks's Issues

Feature : How about showing links to github project - twitter profile of the author?

If the user wants to donate he would hit the command thanks requirements.txt donate which would show links to the authors patreon pages. While thanks requirements tweet would show the authors twitter profile links using which user can tweet the author expressing his love for the library.

The same for github as well - it would show github project links which helps people star the project.

I was planning to put this up in the package that I'm building but thought of chiming in my thoughts here instead of building yet another thanks library πŸ˜„

There are two README files

You've currently got two README files in the project's root directory. Probably not intentional? Note also the interaction with MANIFEST.in, which currently ignores README.md - maybe that's intentional?

Read data from the packages?

A suggestion from @EricaJoy was to figure out some way of reading this info from the packages themselves, rather than a central database.

(Relates to feross/thanks#2)

Today, few-to-no package authors are capturing this metadata in their packages. Two approaches that come to mind:

  1. Make it possible for that info to go in the setup.py
    • Ideally this would also be fetchable via PyPI API.
  2. Encourage maintainers to ship a .thanks.json in their packages, and check from the package to read from there.

Edit: I have filed pypa/setuptools#1276 to try and get the ball rolling on this.

Running thanks without argument could simply scan a pip freeze

Because packages often come with dependencies that are not always written in requirements files, I'd love to be able to run thanks anywhere without argument, and having it to get the packages to scan from a simple pip freeze.

Such a feature would be particularly interesting in virtualenv settings, and make thanks work in a similar fashion than feross/thanks.

PS: thank you for writing this piece of code! I definitely wanted to do it too when I saw the JS version 10 days ago, and it was actually a top priority in my spare time to-do list… but it looks like I was too slow. πŸ˜„

pip 10 support (`module 'pip' has no attribute 'get_installed_distributions')

  • Thanks version: 0.0.7
  • Python version: 3.6.2
  • Operating System: Linux ... 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

Possibly Helpful: pypa/pip#5243

What I Did

β””> thanks Pipfile
Loading data about contributors...
Traceback (most recent call last):
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/bin/thanks", line 11, in <module>
    sys.exit(main())
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/cli.py", line 14, in main
    Thanks(debug=debug).find_package_roles(requirements)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/thanks.py", line 29, in __init__
    for package in pip.get_installed_distributions():
AttributeError: module 'pip' has no attribute 'get_installed_distributions'

Pipfile support

  • Thanks version: 0.0.7
  • Python version: 3.6.2
  • Operating System: Linux ... 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Description

I'd like to be able to run thanks on Pipfile, as I do not have a requirements.txt and track that in Pipfile instead. The documentation for Pipfile is at: https://github.com/pypa/pipfile

What I Did

$ thanks Pipfile
Loading data about contributors...
Traceback (most recent call last):
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/bin/thanks", line 11, in <module>
    sys.exit(main())
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/cli.py", line 14, in main
    Thanks(debug=debug).find_package_roles(requirements)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/thanks.py", line 29, in __init__
    for package in pip.get_installed_distributions():
AttributeError: module 'pip' has no attribute 'get_installed_distributions'

thanks should concentrate on funding the project, not the author

Whilst funding links may belong to an author, they might not.

Primary focus should be on funding and giving thanks to on a project basis
whether that be to an authors, group, or organisation.

Proposed output

Scanning your requirements file...
Loading data about projects...
You depend on x projects who would enjoy donations!

  Project     Where to thank                    Author

  click       https://www.paypal.me/untitaker   untitaker
  thanks      https://patreon.com/phildini      phildini, tomdottom
  virtualenv  https://earn.com/brosner/         brosner, jezdez

Current output

$ thanks foo.txt

Loading data about contributors...
Scanning your requirements file...
You depend on 4 authors who would enjoy donations!

  Author      Where to thank                    Packages

  untitaker   https://www.paypal.me/untitaker   click
  phildini    https://patreon.com/phildini      thanks
  brosner     https://earn.com/brosner/         virtualenv
  jezdez      https://www.paypal.me/jezdez      virtualenv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.