Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from jtuulos/master

fix title and description not being updated with visitor data
  • Loading branch information...
commit 1d36e47c79ed6cb1682a3e75dc4adec9f281cb58 2 parents dbd2cac + ba82993
@tuulos tuulos authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 __main__.py
View
20 __main__.py
@@ -50,6 +50,13 @@ def popularity(repos):
text['popular'] = max(pop)
text['total'] = sum(visits for visits, repo in pop)
+ Title("Repos have {total} daily unique visitors in total "
+ "over the last {window} days",
+ text)
+ Description("The most popular repository is *{popular[1]}* with "
+ "{popular[0]} visitors.",
+ text)
+
yield {'type': 'text',
'size': (12, 1),
'head': 'Daily Unique Visitors'}
@@ -60,6 +67,9 @@ def popularity(repos):
'data': list(timeline(stats)),
'size': (6, 2)}
else:
+ Title("First badge added!")
+ Description("It takes about an hour for the real data "
+ "to start flowing in.")
yield {'type': 'text',
'size': (12, 1),
'color': 3,
@@ -76,13 +86,3 @@ def popularity(repos):
label='Visitors',
size=(12, 4))
-if 'total' in text:
- Title("Repos have {total} daily unique visitors in total over the last "
- "{window} days",
- text)
- Description("The most popular repository is *{popular[1]}* with "
- "{popular[0]} visitors.",
- text)
-else:
- Title("First badge added!")
- Description("It takes about an hour for the real data to start flowing in.")
Please sign in to comment.
Something went wrong with that request. Please try again.