Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix title and description not being updated with visitor data #3

Merged
merged 1 commit into from

2 participants

@jtuulos
Owner

No description provided.

@tuulos tuulos merged commit 1d36e47 into bitdeli:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 9, 2013
  1. @jtuulos @bitdeli-commits
This page is out of date. Refresh to see the latest.
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.")
Something went wrong with that request. Please try again.