Skip to content
Snippets Groups Projects

Feature: translation of params

Merged Louis Moriceau requested to merge branche-a-rebase into master
1 file
+ 11
1
Compare changes
  • Side-by-side
  • Inline
+ 11
1
import emoji
import emoji
 
import sys
wordToEmoji = {
wordToEmoji = {
'super': ':thumbs_up:',
'super': ':thumbs_up:',
@@ -21,4 +22,13 @@ def convert(word):
@@ -21,4 +22,13 @@ def convert(word):
if __name__ == "__main__":
if __name__ == "__main__":
print("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)
Loading