reverse ordering
parent
843bae8fa0
commit
92e1298b00
Binary file not shown.
5
bash.py
5
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()
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<title>vtbash</title>
|
||||
{% block body %}
|
||||
{% for j in i %}
|
||||
<p style="background-color: rgba(255,102,0,.2);">
|
||||
#{{ j + 1 }}<br>
|
||||
<p id="{{ j + 1}}" style="background-color: rgba(255,102,0,.2);">
|
||||
#{{ length - j }}<br>
|
||||
{% for line in entries[j] %}
|
||||
{{ line }}<br>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue