diff --git a/webgen.py b/webgen.py index 3029b61..9aae5ba 100755 --- a/webgen.py +++ b/webgen.py @@ -52,9 +52,12 @@ def edit(headline): # Select a topic for the new post or reedit an existing one def selectfile(): # Put all .md files in sourcefolder into list with a format, which dialog can eat. - zahl = 0 + + filelist = glob.glob("*.md") + filelist.sort() tabelle = [] - for zeile in glob.glob("*.md"): + zahl = 0 + for zeile in filelist: tabelle.insert(zahl, (str(zahl), zeile)) zahl += 1