minor changes.
This commit is contained in:
parent
40870fd759
commit
01bf86d086
8
gempost
8
gempost
|
@ -449,8 +449,12 @@ elif (arg == "post"):
|
|||
existing_files = listdir(f"{postDir}")
|
||||
while True: # inputting custom filename from user, or not. if empty, simply set fname to None, which makes newpost() know to generate filename using the sha1 hash
|
||||
fname = input("\nFILENAME: (without .gmi extension) (no spaces. leave empty to generate random) ")
|
||||
if (fname[-1] == '\n'): # removing the \n that creeps in because of input()
|
||||
fname = fname[:-1]
|
||||
|
||||
try:
|
||||
if (fname[-1] == '\n'): # removing the \n that creeps in because of input()
|
||||
fname = fname[:-1]
|
||||
except IndexError:
|
||||
fname = ''
|
||||
|
||||
if ".gmi" in fname:
|
||||
prYellow("The filename should not contain .gmi extension because it is automatically added.\n Correcting and continuing...")
|
||||
|
|
Loading…
Reference in New Issue