-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__main__.py
More file actions
22 lines (20 loc) · 824 Bytes
/
__main__.py
File metadata and controls
22 lines (20 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
# -*- encoding: utf8 -*-
import text_art
from PIL import Image
if __name__ == '__main__':
logos = [
['Agilize', './arts/agilize.png', './arts/agilize.md'],
['Python', './arts/python.png', './arts/python.md'],
['Devry', './arts/devry.jpg', './arts/devry.md'],
['Bugginho Developer', './arts/buginho.png', './arts/buguinho-develop.md'],
['Java', './arts/java.jpg', './arts/java.md'],
['RaulHc', './arts/raulhc.png', './arts/raulhc.md'],
]
for logo in logos:
image = Image.open(logo[1])
with open(logo[2], 'w') as markdown:
markdown.write('# %s\n\n````\n' % logo[0])
for line in text_art.image_to_textart(image):
markdown.write('%s\n' % ''.join(line))
markdown.write('````')