Add files via upload

This commit is contained in:
Maboroshy 2017-08-18 11:37:11 +04:00 committed by GitHub
parent 1961bb8695
commit f0e82411c9
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
import os
import sys
import time
merge_to_first = sys.argv[1]
delete_merged = sys.argv[2]
@ -19,6 +20,9 @@ else:
len(note_list),
os.path.splitext(os.path.basename(note_list[0]))[0],
os.path.splitext(note_list[0])[1])
if os.path.isfile(output_path):
output_path = os.path.splitext(output_path)[0] + '_' + str(int(time.time())) + os.path.splitext(note_list[0])[1]
try:
with open(output_path, 'w') as output:
output.write('\n\n'.join(note_content_list))
@ -27,4 +31,4 @@ except:
else:
if delete_merged == 'true':
for note_path in note_list:
os.remove(note_path)
os.remove(note_path)