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): for cheat_dir in reversed(cheat_directories):
cheats.update(dict([(cheat, cheat_dir) cheats.update(dict([(cheat, cheat_dir)
for cheat in os.listdir(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('__')])) and not cheat.startswith('__')]))
return cheats return cheats
@ -84,6 +86,7 @@ def main():
print 'No cheatsheet found for %s.' % keyphrase print 'No cheatsheet found for %s.' % keyphrase
def pretty_print(filename): def pretty_print(filename):
try: try:
if os.path.splitext(filename)[1]: if os.path.splitext(filename)[1]: