29 lines
749 B
Python
29 lines
749 B
Python
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)
|
|
|