Слияние кода завершено, страница обновится автоматически
import os
import sys
import enc
import dec
args = sys.argv
rds = ['-e', '-d']
def layout_help():
help_content = '''
Novel_In_Image v0.3
By RDPStudio
Usage: python {} [[-e|-d filename colortheme]|-h|-i]
-e : Encode the file
-d : Decode the file
-h : View this help page
-i : Install the dependencies
filename:File Name.Example:good.txt
colortheme:Set the picture whats red.Example:0
'''.format(sys.argv[0])
print(help_content)
return
def install_dependencies():
os.system('pip install pillow')
os.system('pip3 install pillow')
return
def raise_err():
help_content = '''
Unknown argument: "{}"
Type "python {} -h" to see the usage.
'''.format(sys.argv[1], sys.argv[0])
print(help_content)
return
if __name__ == '__main__':
if len(args) == 1 or (len(args) == 2 and args[1] == '-h'):
layout_help()
elif len(args) == 2 and args[1] == '-i':
install_dependencies()
elif len(args) == 4 and args[1] in rds:
if args[1] == rds[0]:
enc.main(args[2], args[3])
else:
dec.main(args[2])
else:
raise_err()
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )