Took out listing of Readme and License file on cheatsheets

This commit is contained in:
Ozdemircili 2013-08-26 18:05:34 +02:00
parent 0c027b792d
commit e97d73a0e1

5
cheat
View file

@ -41,7 +41,9 @@ def cheat_files(cheat_directories):
for cheat_dir in reversed(cheat_directories):
cheats.update(dict([(cheat, cheat_dir)
for cheat in os.listdir(cheat_dir)
if not cheat.startswith('.')
if not cheat.endswith('md')
and not cheat.startswith('.')
and not cheat.startswith('LICENSE')
and not cheat.startswith('__')]))
return cheats
@ -82,6 +84,7 @@ def main():
# if it does not, say so
else:
print 'No cheatsheet found for %s.' % keyphrase
def pretty_print(filename):