forked from axiom-team/jaklis
Allow -t option with -f for read messages
This commit is contained in:
parent
5bbf27357d
commit
a292711ae8
|
@ -105,8 +105,12 @@ if sys.argv[1] == "read":
|
||||||
elif sys.argv[1] == "send":
|
elif sys.argv[1] == "send":
|
||||||
if args.fichier:
|
if args.fichier:
|
||||||
with open(args.fichier, 'r') as f:
|
with open(args.fichier, 'r') as f:
|
||||||
titre = f.readline().replace('\n','')
|
msgT = f.read()
|
||||||
msg = ''.join(f.read().splitlines(True)[0:])
|
titre = msgT.splitlines(True)[0].replace('\n', '')
|
||||||
|
msg = ''.join(msgT.splitlines(True)[1:])
|
||||||
|
if args.titre:
|
||||||
|
titre = args.titre
|
||||||
|
msg = msgT
|
||||||
elif args.titre and args.message:
|
elif args.titre and args.message:
|
||||||
titre = args.titre
|
titre = args.titre
|
||||||
msg = args.message
|
msg = args.message
|
||||||
|
|
Loading…
Reference in New Issue