diff --git a/__pycache__/bash.cpython-35.pyc b/__pycache__/bash.cpython-35.pyc new file mode 100644 index 0000000..92d4a27 Binary files /dev/null and b/__pycache__/bash.cpython-35.pyc differ diff --git a/bash.py b/bash.py index 991a6eb..c364386 100644 --- a/bash.py +++ b/bash.py @@ -16,7 +16,8 @@ def show_entries(): for i in range(len(files)): files[i] = files[i].replace('.txt', '') files[i] = int(files[i]) - files.sort() + + files.sort(reverse=True) for i in range(len(files)): files[i] = ''.join([str(files[i]), '.txt']) @@ -32,7 +33,7 @@ def show_entries(): line = line.replace('<', '<') line = line.replace('>', '>') - return render_template('show_entries.html', entries=files_contents, i=range(len(files_contents))) + return render_template('show_entries.html', length=len(files_contents), entries=files_contents, i=range(len(files_contents))) if __name__ == "__main__": app.run() diff --git a/templates/show_entries.html b/templates/show_entries.html index 225d8e2..87b2b26 100644 --- a/templates/show_entries.html +++ b/templates/show_entries.html @@ -2,8 +2,8 @@ vtbash {% block body %} {% for j in i %} -

- #{{ j + 1 }}
+

+ #{{ length - j }}
{% for line in entries[j] %} {{ line }}
{% endfor %}