From 92e1298b0041c21237df406dd00093854ac43b70 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 23 Dec 2016 05:06:47 -0500 Subject: [PATCH] reverse ordering --- __pycache__/bash.cpython-35.pyc | Bin 0 -> 1143 bytes bash.py | 5 +++-- templates/show_entries.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 __pycache__/bash.cpython-35.pyc diff --git a/__pycache__/bash.cpython-35.pyc b/__pycache__/bash.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92d4a2783af59d4c103343307ee39e1e04470009 GIT binary patch literal 1143 zcmZWo&yO256#ne_m1L96QmIv21ceJ#5XwqbZ@aCKc7=dLfi5D|h}CFVdy`2gGl}h# zbd~94x$}4M4{+d5@s$&I#9>c7dlM9i(b)6+z31<}?~Q%0*Xw-y&yTN8Lf}vAJOSCC z)6f?*33?eyV8)O#%s5gG=1`6@KpH?Y$Pm}$jvymUV~D^lMFCT)(z`B`YCSX5?&M=0?7_VTZ03|FmiD&^V!?e`mhD1~9;s zVam5g;0mNF)|8*4VOu=JnmJrQbJEV-wrB%29IG#3VwePLznS7r&!3_R+o>vY+C*zqF6h|Fonb%0b~gR#}K|5FbfHLZJ=iJ^va_w3S3LlsWP`3G8~C;n$DQ#8}6e_FStQ5=EKzu}++RHX`}oy?nL!8>7{U zbDf?a!L{JYZH7cTpSvL)s9X4YK%wjTT?Ak?BM1L3Dll{DBZX$1C=? z!aYd2uUT+5=)XwYKjnIomGxL(wci~M=Mz~~Z?D3kSs4qPDEUSzEx*5E$5-Jer8&A` z&&e2@qpSDyr2aXRl~IM%!-<)dX>~!`nXjN3khPqb92HGea)^l>VmCQw1R8reGpA#Zf zKnHTrPWQa1#j-Y1rw2QW%$E^e7Nyk6o#1re+u22387f*^c9}+(-w;`vY%m+T9KS(* zK=C*2;i2Oj&fnVZZUYi`6+WX0JZ2yBJ1pdV_JBQP_xS;R9~0VRcUhlx3F(o2hdt!# z5yhviESu#;m1R_Ubm?xN;)HuKYL6^S5mi2uS(XMQG>uffH1c+Hpq7=dY-jq=?>U~; WVp+=PbUmS+)_bhWyTSX9y6j&i7YE}2 literal 0 HcmV?d00001 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 %}