maguowei / starred Goto Github PK
View Code? Open in Web Editor NEWcreating your own Awesome List by GitHub stars!
Home Page: https://github.com/maguowei/awesome-stars
License: MIT License
creating your own Awesome List by GitHub stars!
Home Page: https://github.com/maguowei/awesome-stars
License: MIT License
Hello, thank you for your program. Its awesome!
I used starred many times.
Yesterday I got error:
Run starred --username juev --repository awesome-stars --sort --token ${GITHUB_TOKEN} --message 'update stars'
starred --username juev --repository awesome-stars --sort --token ${GITHUB_TOKEN} --message 'update stars'
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.7.1[2](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:2)/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:3).7.12/x6[4](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:4)/lib
GITHUB_TOKEN: ***
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.12/x[6](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:6)4/bin/starred", line 8, in <module>
sys.exit(starred())
File "/opt/hostedtoolcache/Python/3.[7](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:7).12/x64/lib/python3.7/site-packages/click/core.py", line 82[9](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:9), in __call__
return self.main(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/click/core.py", line [10](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:10)66, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/starred/starred.py", line 72, in starred
for s in stars:
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/github3/structs.py", line 122, in __iter__
yield cls(i)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/github3/models.py", line 48, in __init__
self._update_attributes(json)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/github3/repos/repo.py", line 97, in _update_attributes
self.owner = users.ShortUser(repo["owner"], self)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/github3/models.py", line 48, in __init__
self._update_attributes(json)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/github3/users.py", line 3[11](https://github.com/juev/awesome-stars/runs/5715556212?check_suite_focus=true#step:5:11), in _update_attributes
self.avatar_url = user["avatar_url"]
TypeError: 'NoneType' object is not subscriptable
Error: Process completed with exit code 1.
What's the problem?
As I can see previous we have the same envs:
Run starred --username juev --repository awesome-stars --sort --token ${GITHUB_TOKEN} --message 'update stars'
starred --username juev --repository awesome-stars --sort --token ${GITHUB_TOKEN} --message 'update stars'
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.7.1[2](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:2)/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:3).7.12/x6[4](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:4)/lib
GITHUB_TOKEN: ***
/usr/bin/xdg-open: 8[6](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:6)9: www-browser: not found
/usr/bin/xdg-open: [8](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:8)6[9](https://github.com/juev/awesome-stars/runs/5701600079?check_suite_focus=true#step:5:9): links2: not found
/usr/bin/xdg-open: 869: elinks: not found
/usr/bin/xdg-open: 869: links: not found
/usr/bin/xdg-open: 869: lynx: not found
/usr/bin/xdg-open: 869: w3m: not found
xdg-open: no method available for opening 'https://github.com/juev/awesome-stars'
Thank you!
After running the workflow for the first time from my generated repo, I noticed that the job did not have any effect despite being marked as successful:
Run starred --username ${USERNAME} --repository ${REPOSITORY} --sort --token ${GITHUB_TOKEN} --message 'awesome-stars category by language update by github actions cron, created by starred'
Error: 403, message='Forbidden', url=URL('https://api.github.com/graphql')
Screenshot of the log:
GitHub stars now support an experimental lists feature.
This would allow for a much more personal categorisation, in comparison to topic- or language-sort.
Feedback to the feature is listened to in a currently empty discussion forum.
Please consider adding a flag to support the addition of the username for each item in the list of the repos
starred - description
-> maguowei/starred - description
When i run demo script
starred --repository awesome-stars --sort
i get this error
Traceback (most recent call last):
File "/usr/local/bin/starred", line 11, in <module>
sys.exit(starred())
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/starred.py", line 87, in starred
rep = gh.create_repository(repository, 'Awesome List of my own!')
File "/usr/local/lib/python2.7/site-packages/github3/decorators.py", line 33, in auth_wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/github3/github.py", line 348, in create_repository
json = self._json(self._post(url, data=data), 201)
File "/usr/local/lib/python2.7/site-packages/github3/models.py", line 154, in _json
if self._boolean(response, status_code, 404) and response.content:
File "/usr/local/lib/python2.7/site-packages/github3/models.py", line 176, in _boolean
raise exceptions.error_for(response)
github3.exceptions.UnprocessableEntity: 422 Validation Failed
BTW,i have already set the GITHUB_TOKEN
I think for me, the most useful list would be one that represents the order I added. At least that's what I'm currently thinking. There'd be no categorization at this point, I understand.
Is this something feasible? I could take a look and work on a patch if the answer is "yes", I've just done no investigation at the moment.
Cheers
能解决不,这差好多
Dependabot couldn't authenticate with https://pypi.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
… "starred.py", line 44, in starred
data = '* [{}]({}) - {}'.format(*repo)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0421' in position 67: ordinal not in range(128)
Adding an 'u' to the constant might fix that.
If the description of repository has any text in html format(like <select>
), will breakdown markdown rendering on GitHub.
For example: Fizzadar/selected.js
Escape <text>
format text may help.
UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f468' in position 50: illegal multibyte sequence
我看了楼主之前关闭的,有这个错误,是否无法解决?
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfqfmfQOQGwO28byj9ux3HXACiW3yWCO94S9SyiXWnLWgTrXfsWJuCYjMM [email protected]
我的github的公钥长这样,设置了几次老是说不对,去前,去后,只留中间或是全部,我不确定设置上了没有,我有85个star,读取出来的README只有10多个
Windows Cmd
> python starred.py --username zYeoman --sort > TEST.md
Traceback (most recent call last):
File "starred.py", line 92, in <module>
starred()
File "C:\Users\zYeoman\Anaconda3\lib\site-packages\click\core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "C:\Users\zYeoman\Anaconda3\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
File "C:\Users\zYeoman\Anaconda3\lib\site-packages\click\core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\zYeoman\Anaconda3\lib\site-packages\click\core.py", line 534, in invoke
return callback(*args, **kwargs)
File "starred.py", line 78, in starred
click.echo(data)
File "C:\Users\zYeoman\Anaconda3\lib\site-packages\click\utils.py", line 259, in echo
file.write(message)
UnicodeEncodeError: 'gbk' codec can't encode character '\xe6' in position 55: illegal multibyte sequence
It works after `set PYTHONIOENCODING=utf8``.
Hi, huge fan!
I'm curious as to how the program sorts repos by topic. Does it do a find-in-page for the README? Understanding how the code sorts repos into topics will also help me debug why most of my repos come under "other".
Thanks!
After upgrading to Fedora 35 with Python 3.10, this module stopped working. Downgrading with help of pyenv
helped get this into a working condition again. The thrown error reads:
Traceback (most recent call last):
File "/home/yala/.local/bin/starred", line 5, in <module>
from starred.starred import starred
File "/home/yala/.local/lib/python3.10/site-packages/starred/starred.py", line 8, in <module>
from github3 import GitHub
File "/home/yala/.local/lib/python3.10/site-packages/github3/__init__.py", line 24, in <module>
from .api import (
File "/home/yala/.local/lib/python3.10/site-packages/github3/api.py", line 13, in <module>
from .github import GitHub, GitHubEnterprise
File "/home/yala/.local/lib/python3.10/site-packages/github3/github.py", line 10, in <module>
from . import apps
File "/home/yala/.local/lib/python3.10/site-packages/github3/apps.py", line 10, in <module>
from . import models
File "/home/yala/.local/lib/python3.10/site-packages/github3/models.py", line 13, in <module>
from . import session
File "/home/yala/.local/lib/python3.10/site-packages/github3/session.py", line 3, in <module>
from collections import Callable
ImportError: cannot import name 'Callable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
starred.py
'-'.join(language.lower().split()
But
pip install starred
will
Download starred-1.3.1
UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f525' in position 55: illegal multibyte sequence
这个怎么解决呀。。
now only support markdown.
add csv table json ...
support order by field
(githubStarred) ...\githubStarred>starred --username pramitbiswas --sort > README.md
Traceback (most recent call last):
File "...\python36\Lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "...\python36\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "...\githubStarred\githubStarred\Scripts\starred.exe_main.py", line 9, in
File "...\githubstarred\githubstarred\lib\site-packages\click\core.py", line 716, in call
return self.main(*args, **kwargs)
File "...\githubstarred\githubstarred\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
File "...\githubstarred\githubstarred\lib\site-packages\click\core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "...\githubstarred\githubstarred\lib\site-packages\click\core.py", line 534, in invoke
return callback(*args, **kwargs)
File "...\githubstarred\githubstarred\lib\site-packages\starred.py", line 89, in starred
click.echo(data)
File "...\githubstarred\githubstarred\lib\site-packages\click\utils.py", line 259, in echo
file.write(message)
File "...\githubstarred\githubstarred\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 105-112: character maps to
$ starred --username dapeng --repository awesome-stars --sort
Traceback (most recent call last):
File "/usr/local/bin/starred", line 11, in
sys.exit(starred())
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(_args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/starred.py", line 89, in starred
click.launch(rep.html_url)
File "/usr/local/lib/python2.7/site-packages/click/termui.py", line 483, in launch
return open_url(url, wait=wait, locate=locate)
File "/usr/local/lib/python2.7/site-packages/click/_termui_impl.py", line 469, in open_url
return subprocess.Popen(args, stderr=null).wait()
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings
Following the istructions, I run pip install starred. When I try to run starred, i get this:
$ starred
Traceback (most recent call last):
File "/usr/local/bin/starred", line 7, in <module>
from starred import starred
File "/usr/local/lib/python2.7/dist-packages/starred.py", line 7, in <module>
from github3 import GitHub
File "/usr/local/lib/python2.7/dist-packages/github3/__init__.py", line 18, in <module>
from .api import (
File "/usr/local/lib/python2.7/dist-packages/github3/api.py", line 11, in <module>
from .github import GitHub, GitHubEnterprise
File "/usr/local/lib/python2.7/dist-packages/github3/github.py", line 17, in <module>
from .gists import Gist
File "/usr/local/lib/python2.7/dist-packages/github3/gists/__init__.py", line 16, in <module>
from .gist import Gist
File "/usr/local/lib/python2.7/dist-packages/github3/gists/gist.py", line 14, in <module>
from .comment import GistComment
File "/usr/local/lib/python2.7/dist-packages/github3/gists/comment.py", line 12, in <module>
from ..users import User
File "/usr/local/lib/python2.7/dist-packages/github3/users.py", line 13, in <module>
from uritemplate import URITemplate
ImportError: cannot import name URITemplate
Currently "Others" is treated as if it were a language and is displayed in alphabetical order (between N and P).
Since "Others" is not actually a language and represents none of the other categories, it should be displayed at the end of the list.
For example, see jupyter notebook: https://github.com/maguowei/awesome-stars
It seems github now replaces spaces with -
It would be nice if we could also have starred be able to retrieve and sort repos by their tags. Something like being able to search all repos that have tui
as a tag. A lot of awesome lists are sorted by categories like this instead of just by language.
I just generated a new repo from the template and ran the workflow for the first time. The job succeeded, but with the following warning annotation from GitHub:
The
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
https://github.com/itfanr/awesome-stars
The repo is generated automatically, but the content section of readme is empty.
Can you help me ?
When installing from git, we get version 3.2.0.
Line 3 in c46d2fa
When installing from pip, we get version 4.2.0
How can the pyproject.toml be kept in sync with the generated release artifacts published to PyPi?
I'm a green hand in Python. When I use pip to install starred, it went wrong as following.
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-H_I4s7/pycparser/setup.py'"'"'; __file__='"'"'/tmp/pip-install-H_I4s7/pycparser/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-H_I4s7/pycparser/pip-egg-info
cwd: /tmp/pip-install-H_I4s7/pycparser/
Complete output (17 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-H_I4s7/pycparser/setup.py", line 65, in <module>
cmdclass={'install': install, 'sdist': sdist},
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2326, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'check_specifier'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
So I use pip3 to install it, this time it worked. And I really got it.
[root@cloudServer pip]# pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2019.9.11)
cffi (1.13.1)
chardet (3.0.4)
Click (7.0)
cryptography (2.8)
github3.py (1.2.0)
idna (2.8)
jwcrypto (0.6.0)
pip (9.0.3)
pycparser (2.19)
python-dateutil (2.8.0)
requests (2.22.0)
setuptools (39.2.0)
six (1.12.0)
starred (3.0.0)
uritemplate (3.0.0)
urllib3 (1.25.6)
But when I run starred --username maguowei --sort > README.md
, bash tell me bash: starred: command not found
. Could you please help me to resolve it? Thank u
Thanks for the inspiration, I am building a npm package that does the same job
at https://github.com/abhijithvijayan/stargazed
Hello @maguowei,
I saw that you use Stars List, and me too.
Do you check how to managed those list with your script?
请问有详细的使用教程吗?我对这个比较感兴趣,但是用不来
After installed, I met this when running starred:
ImportError: cannot import name VERSION
I don't know whether it's a bug.
Then I edited starred.py, fix it by modifying VERSION to '2.4.1'.
Anyway, thanks for your job. Starred is cool!
运行:
starred --username anlzou --sort > StarsList.md
报错:
raise exceptions.ConnectionError(exc)
github3.exceptions.ConnectionError: <class 'requests.exceptions.ConnectionError'>: A connection-level exception occurred: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /users/anlzou/starred?per_page=100 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000013805E46948>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
Ps:
可以用爬虫去爬Stars~
Hello @maguowei,
From what I see the generation of awesome-stars
speak about a license CC0 1.0 Universal in the bottom for the README.md.
What do you think about allowing user to add a LICENSE file and just refer in the README.md
to this file if it exist by adding the paragraph License.
docker run -d --name starred -e gituser=aaa -e gitpass=bbb maguowei/starred
实在是太懒了~~~
谢谢啦
As unsuccessfully tried with almereyda/awesome-starred@cf30514 it could be nice to provide multi line git commit messages with escaping the \n
character, in so the organisation of collected stars can be accompagnied by inline documentation.
I followed the instructions to "Use awesome-stars as template" but the update repo category by language
step in the workflow run resulted in an error:
Run starred --username ${USERNAME} --repository ${REPOSITORY} --sort --token ${GITHUB_TOKEN} --message 'awesome-stars category by language update by github actions cron, created by starred'
starred --username ${USERNAME} --repository ${REPOSITORY} --sort --token ${GITHUB_TOKEN} --message 'awesome-stars category by language update by github actions cron, created by starred'
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.10.8/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.8/x64/lib
REPOSITORY_NAME: stars
GITHUB_TOKEN: ***
REPOSITORY: stars
USERNAME: montchr
Error: 403, message='Forbidden', url=URL('https://api.github.com/graphql')
From Automatic token authentication - GitHub Docs:
When you enable GitHub Actions, GitHub installs a GitHub App on your repository. The
GITHUB_TOKEN
secret is a GitHub App installation access token. You can use the installation access token to authenticate on behalf of the GitHub App installed on your repository. The token's permissions are limited to the repository that contains your workflow.
I'm not seeing the referenced GitHub App in my repo settings, which leads me to wonder if the usual process for setting up actions doesn't happen as it normally would when using the "awesome-stars as template" approach.
Should I have created the token manually? Is something weird going on in the repo generatiion process? Am I overlooking something obvious?
Related to #99, which is caused by this issue.
可以查看本人生成的awesome-stars
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.