Skip to content
Snippets Groups Projects
Commit dc273ee1 authored by Thon's avatar Thon Committed by Tristan Garcia Marcandelli
Browse files

Feature: translation of params

parent 897775ad
No related branches found
No related tags found
No related merge requests found
import emoji
import sys
wordToEmoji = {
'super': ':thumbs_up:',
......@@ -21,4 +22,13 @@ def convert(word):
if __name__ == "__main__":
print(translate(super))
if len(sys.argv) <= 1:
print("Veuillez entrer une phrase en paramètre.")
else:
convertedText = ""
for sentence in sys.argv[1:]:
words = sentence.split(" ")
for word in words:
convertedText += convert(translate(word)) + " "
print(convertedText)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment