Script works with hardcoded path.

This commit is contained in:
Alex Huddleston 2018-06-06 09:25:58 -05:00
parent 84c65689a4
commit 7c77f76f05

View file

@ -1,2 +1,29 @@
import os
from os import listdir
from os.path import isfile, join
print("Hello, world!")
input_path = "./ms-emoji"
real_path = os.path.dirname(os.path.realpath(input_path))
def pleromoji(current_path):
output_path = ""
output_shortcode = ""
output_line = ""
for f in listdir(current_path):
if isfile(join(current_path, f)):
output_path = os.path.dirname(os.path.realpath(join(current_path, f))).replace(real_path, "") + "/" + f
output_path = "emoji" + output_path
output_shortcode = f.replace(".png", "")
output_line = output_shortcode + ", " + output_path
print(output_line)
else:
pleromoji(join(current_path,f))
pleromoji(input_path)