Skip to content

Commit 6b563cd

Browse files
committed
Add github-repo-summary.
1 parent 44081a3 commit 6b563cd

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,69 @@ $ EvalExpr.py '(((4+6)*10)<<2)'
3838
(((4+6)*10)<<2) = 400
3939
```
4040

41+
## github-repo-summary.py
42+
Produces a Markdown table concisely summarizing a list of GitHub repositories.
43+
See the [blog post][repo-summary-post] for a more detailed overview.
44+
45+
```
46+
$ github-repo-summary.py \
47+
> afriggeri/cv \
48+
> cies/resume \
49+
> deedydas/Deedy-Resume \
50+
> divad12/resume \
51+
> icco/Resume \
52+
> jsonresume/resume-schema \
53+
> kaeluka/cv \
54+
> mwhite/resume \
55+
> prat0318/json_resume \
56+
> qutebits/resume_42 \
57+
> raphink/CV \
58+
> sc932/resume \
59+
> terro/CV \
60+
> there4/markdown-resume \
61+
> zellux/resume
62+
63+
Generated on 2014-11-02, see the Markdown source of this file for more details.
64+
65+
Name | Stargazers | Description
66+
----|----|----
67+
[afriggeri/cv](https://github.com/afriggeri/cv) | 749 | CV, typesetted in Helvetica Neue, using XeTeX, TikZ and Biblatex
68+
[cies/resume](https://github.com/cies/resume) | 184 | My resume as a PDF including the well commented Latex sources and build instructions.
69+
[deedydas/Deedy-Resume](https://github.com/deedydas/Deedy-Resume) | 464 | A one page , two asymmetric column resume template in XeTeX that caters to an undergraduate Computer Science student
70+
[divad12/resume](https://github.com/divad12/resume) | 22 | Yaml resume compiled into multiple formats (such as LaTeX, HTML (TODO), etc.)
71+
[icco/Resume](https://github.com/icco/Resume) | 212 | A markdown port of my resume
72+
[jsonresume/resume-schema](https://github.com/jsonresume/resume-schema) | 303 | JSON-Schema is used here to define and validate our proposed resume json
73+
[kaeluka/cv](https://github.com/kaeluka/cv) | 64 | My CV.
74+
[mwhite/resume](https://github.com/mwhite/resume) | 528 | Markdown -> PDF/HTML resumé generator
75+
[prat0318/json_resume](https://github.com/prat0318/json_resume) | 1002 | Generates pretty HTML, LaTeX, markdown, with biodata feeded as input in JSON
76+
[QuteBits/resume_42](https://github.com/QuteBits/resume_42) | 2 | It generates a beautiful resume from yaml data
77+
[raphink/CV](https://github.com/raphink/CV) | 45 | My CV
78+
[sc932/resume](https://github.com/sc932/resume) | 294 | My CV/resume in LaTeX.
79+
[terro/CV](https://github.com/terro/CV) | 17 | My cv template
80+
[there4/markdown-resume](https://github.com/there4/markdown-resume) | 353 | Generate a responsive CSS3 and HTML5 resume with Markdown, with optional PDF output.
81+
[zellux/resume](https://github.com/zellux/resume) | 88 | My resume, generated with moderncv
82+
```
83+
84+
Generated on 2014-11-02, see the Markdown source of this file for more details.
85+
86+
Name | Stargazers | Description
87+
----|----|----
88+
[afriggeri/cv](https://github.com/afriggeri/cv) | 749 | CV, typesetted in Helvetica Neue, using XeTeX, TikZ and Biblatex
89+
[cies/resume](https://github.com/cies/resume) | 184 | My resume as a PDF including the well commented Latex sources and build instructions.
90+
[deedydas/Deedy-Resume](https://github.com/deedydas/Deedy-Resume) | 464 | A one page , two asymmetric column resume template in XeTeX that caters to an undergraduate Computer Science student
91+
[divad12/resume](https://github.com/divad12/resume) | 22 | Yaml resume compiled into multiple formats (such as LaTeX, HTML (TODO), etc.)
92+
[icco/Resume](https://github.com/icco/Resume) | 212 | A markdown port of my resume
93+
[jsonresume/resume-schema](https://github.com/jsonresume/resume-schema) | 303 | JSON-Schema is used here to define and validate our proposed resume json
94+
[kaeluka/cv](https://github.com/kaeluka/cv) | 64 | My CV.
95+
[mwhite/resume](https://github.com/mwhite/resume) | 528 | Markdown -> PDF/HTML resumé generator
96+
[prat0318/json_resume](https://github.com/prat0318/json_resume) | 1002 | Generates pretty HTML, LaTeX, markdown, with biodata feeded as input in JSON
97+
[QuteBits/resume_42](https://github.com/QuteBits/resume_42) | 2 | It generates a beautiful resume from yaml data
98+
[raphink/CV](https://github.com/raphink/CV) | 45 | My CV
99+
[sc932/resume](https://github.com/sc932/resume) | 294 | My CV/resume in LaTeX.
100+
[terro/CV](https://github.com/terro/CV) | 17 | My cv template
101+
[there4/markdown-resume](https://github.com/there4/markdown-resume) | 353 | Generate a responsive CSS3 and HTML5 resume with Markdown, with optional PDF output.
102+
[zellux/resume](https://github.com/zellux/resume) | 88 | My resume, generated with moderncv
103+
41104
## link-checker.py
42105
Builds upon linkchecker to hide warnings and to send a concise email
43106
if bad links are found.
@@ -110,6 +173,8 @@ b - bravo
110173
[eval-post]: http://bamos.github.io/2013/08/07/python-expression-evaluator/
111174
[link-checker-post]: http://bamos.github.io/2014/02/06/link-checker-crontab/
112175
[music-organizer-post]: http://bamos.github.io/2014/07/05/music-organizer/
176+
[repo-summary-post]: http://bamos.github.io/2014/11/02/github-repo-summary/
177+
113178
[mpv]: http://mpv.io/
114179
[pip]: http://pip.readthedocs.org/en/latest/
115180
[dotfiles]: https://github.com/bamos/dotfiles

python3/github-repo-summary.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Brandon Amos <http://bamos.io>
4+
# 2014.11.02
5+
6+
from github import Github
7+
import argparse
8+
import time
9+
import os
10+
import sys
11+
12+
parser = argparse.ArgumentParser()
13+
parser.add_argument('repos',nargs="+",type=str)
14+
args = parser.parse_args()
15+
github = Github(os.getenv("GITHUB_TOKEN"))
16+
17+
print(
18+
"Generated on {}, see the Markdown source of this file for more details.\n".format(
19+
time.strftime("%Y-%m-%d")
20+
)
21+
)
22+
print("Name | Stargazers | Description")
23+
print("|".join(["----"]*3))
24+
for r_name in sorted(args.repos):
25+
try:
26+
r = github.get_repo(r_name)
27+
except:
28+
print("Error: Repository '{}' not found.".format(r_name),file=sys.stderr)
29+
sys.exit(-1)
30+
content = " | ".join([
31+
"[{}]({})".format(r.full_name,r.html_url),
32+
str(r.stargazers_count),
33+
r.description
34+
])
35+
print(content)

0 commit comments

Comments
 (0)