def _generate_badges(self):
daycount = self._stats.downloads_per_day<EOL>day = self._generate_badge('<STR_LIT>', '<STR_LIT>' % daycount)<EOL>self._badges['<STR_LIT>'] = day<EOL>weekcount = self._stats.downloads_per_week<EOL>if weekcount is None:<EOL><INDENT>return<EOL><DEDENT>week = self._generate_badge('<STR_LIT>', '<STR_LIT>' % weekcount)<EOL>self._badges['<STR_LIT>'] = week<EOL>monthcount = self._stats.downloads_per_month<EOL>if monthcount is None:<EOL><INDENT>return<EOL><DEDENT>month = self._generate_badge('<STR_LIT>', '<STR_LIT>' % monthcount)<EOL>self._badges['<STR_LIT>'] = month<EOL>
Generate download badges. Append them to ``self._badges``.