FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/misc/developer_commit_history.py at master · staticfloat/matplotlib · GitHub
staticfloat
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
misc
/
developer_commit_history.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (32 loc) · 1018 Bytes
Breadcrumbs
matplotlib
/
examples
/
misc
/
developer_commit_history.py
Copy path
File metadata and controls
45 lines (32 loc) · 1018 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from
__future__
import
print_function
"""
report how many days it has been since each developer committed. You
must do an
svn log > log.txt
and place the output next to this file before running
"""
import
os
,
datetime
import
matplotlib
.
cbook
as
cbook
todate
=
cbook
.
todate
(
'%Y-%m-%d'
)
today
=
datetime
.
date
.
today
()
if
not
os
.
path
.
exists
(
'log.txt'
):
print
(
'You must place the "svn log" output into a file "log.txt"'
)
raise
SystemExit
parse
=
False
lastd
=
dict
()
for
line
in
file
(
'log.txt'
):
if
line
.
startswith
(
'--------'
):
parse
=
True
continue
if
parse
:
parts
=
[
part
.
strip
()
for
part
in
line
.
split
(
'|'
)]
developer
=
parts
[
1
]
dateparts
=
parts
[
2
].
split
(
' '
)
ymd
=
todate
(
dateparts
[
0
])
if
developer
not
in
lastd
:
lastd
[
developer
]
=
ymd
parse
=
False
dsu
=
[((
today
-
lastdate
).
days
,
developer
)
for
developer
,
lastdate
in
lastd
.
items
()]
dsu
.
sort
()
for
timedelta
,
developer
in
dsu
:
print
(
'%s : %d'
%
(
developer
,
timedelta
))
Back
|
FazBrowse Home
|
New Git URL