From eddde7023cbca09b700d9c388b51d59f715bb0f5 Mon Sep 17 00:00:00 2001 From: Cristina Cochior Date: Mon, 20 May 2019 16:23:50 +0200 Subject: [PATCH] some things new --- __pycache__/contextualise.cpython-37.pyc | Bin 5205 -> 4928 bytes contextualise.py | 31 +++++++++++------------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/__pycache__/contextualise.cpython-37.pyc b/__pycache__/contextualise.cpython-37.pyc index 14caaa952bb6c9982da5cab50f24d78a6a5f7124..92df5532c0ed174dc31a335850e6630cf95ff103 100644 GIT binary patch delta 1275 zcmZ9K&u<$=6vt=QKX&cdak5A>38ZZbalDD^&9A0O8ywOmEo}p(5C~dTvNk(oXX)A- zX4XxiLJ=aD9$KZEUQjRX1r?BhDhCd|RK4}YiOZ_JaN}P<9GEwW5-A?(n<^ z=C9K8V*Xq{pGER_=a0Xy-@Bjh)qd5UmTqJH9xXhYCP&4BHX!m^kN8$AZyxJKbb`K5 zdV0|;T0tan4Sj;XK->7M2P?p>6-4_V&6DoOm>eeqTj+c2oFga5J6p&(uOjct$RH`I z$bwRaq*5Z5QWljmER_*bR>}q1|K&V6Nh%FY?4`RJ86{&Xa8ad>%hU-nsgw_ta!M*w z)Y~mDlGS@Ap%l3$fiN2p{rck2L4lg7s+7ALwxf;xT#c2*9sNG8h_{Tssx5Uk zDq(4{9<5P0J{tq^z)RUA+#t9OCc8&9a1yi09d2C1dYn=pEna4R!!zRR?9mHOhPaVi zBfb~0DOuzg5xo^D?`iNp4LAunv`Yt}+++SaeC2oIb=Jmmboq!=g2Vf460zj#yu}d&l@k3kc#J@>dgZ>~BxO&N24jZ^r4t7~;-{kB- z4CS89ErG)oz=wcCHXVV_qp-daGQuCr_^wsLz&SP8)t!O-e|ToUO7>f;jK!wqgY zI&ZH^bIwl5K%8v3P0HpW$Ah&2ZCQ7tHFcX#CZf%C^`_z!lTVtmVMrYTlmU|nRS{c+ zDO?=83Q!$Lu=ZYG_xr!suGwZt+5xR%nagjA7jG;NcD;$S^3FQ3DgR*X3|WX NJw1lmWnRqU{{e{2EgJv; delta 1537 zcmZ8g%~Kpj6rY}%Wj|ndVM_x*)Mu#%^Inq zGnz%p1j2>{{hQ`?==)un5p{B>)(6t*FEpO{;lbCZ@{S&hDH49gUS#+PwC^zrl(2S@tVvLrz*(j_XV~mYe z#%W}q>=E0QcJq-Pz7?%ZuqYebSB)gQSV^G5rlJp$aK35wR$s8;2$L!UtmP)GS z)!;p{^>|eQ++9`5U*gf|dGP~@YATP5=VX#ZMXg%Dqi)3^O5JK+RV>ArWc{>-wa~X3 zm3oD~aZi2NU<|NOWsnW*6Jv@^(F=`=5nENLwxld8*A>=OnWlC7gkGeryUIOc%+NO4 zzN;9s(h~#ECE6i9bCT%$s0&BW8O?zqI2BG~AR60NhC4WUG z4?*NG9g)o2k{JbNjE+m@9rh-jxUKGKybLOfG)YqrppH~qQDT=5T(y;upiuQEVSjvP zCB5PlID6@ZK8kPkhS%?UZO3%1OyZ>ulc^PKCaremh5m2vnmxD21e%8pbX zMdcBMZiG{NR8wYWxK+ecekT6$C&+?m3Ow1tvbq7AnLM-UFrJI~xgXQV5hf5q2$vA5 z5hfAj|6yuO<%>v2|EVp#)cT0=4fYKL*z&5XHN;0k@bas`-K|Mv#ZdLL)O)D#F2ef= zr(~+LmhBYQ?-V$-zXSiFl;$Hf^5x41JvIN4k>f0=wi@qti3Ns#y_C(`85l8_cc5S)3Zz zmrmzQE1ynZixJmD*;;8Mc2zv9T@0tttrqOV>fID)>dK^7Jglql!+|j(xV@F%pcZEt zxB(Wk`5zDR9kK0y8l9N}~o diff --git a/contextualise.py b/contextualise.py index 8201b8c..f08c96b 100644 --- a/contextualise.py +++ b/contextualise.py @@ -20,7 +20,7 @@ app.config.from_object(Config) ###################################################################################### # setting variables for holding paths, folder names and the one file for description -path = "static/files/" +path = "/static/files/" jsonfiles = [] #json files fullpathjsonfiles = [] #fullpath for some situations listingfiles= [] #fullpaths @@ -68,17 +68,16 @@ with open('wordlist.json', 'r', encoding='utf8') as f: wordlist_dict = json.load(f) #listing paths and files, not in order but well... -for path, subdirs, files in os.walk(path): - for name in files: -#excluding json files from listing :-) - if not name.endswith(".json") and not name.endswith(".DS_Store"): - fullpath = os.path.join(path, name) - listingdirectories.append(path) - listingfiles.append(fullpath[7:]) #fullpaths minus static/ - - if name.endswith(".json"): - fullpath = os.path.join(path, name) - jsonfiles.append(fullpath[7:]) +# for path, subdirs, files in os.walk(path): +# for name in files: +# if not name.endswith(".json") and not name.endswith(".DS_Store"): +# fullpath = os.path.join(path, name) +# listingdirectories.append(path) +# listingfiles.append(fullpath[7:]) #fullpaths minus static/ +# +# if name.endswith(".json"): +# fullpath = os.path.join(path, name) +# jsonfiles.append(fullpath[7:]) #listing the json paths simultaneously generating a new index.json for the navbar @@ -92,11 +91,11 @@ for path, subdirs, files in os.walk('./static/files/'): temp_dict = json.load(f) index_dict[temp_dict["id"]] = temp_dict["title"] -dict = {} #dict for the form entries -with open("static/"+jsonfiles[4], 'r') as f: - data_dict = json.load(f) - datafromjson = data_dict["files"] + +# with open("static/"+jsonfiles[4], 'r') as f: +# data_dict = json.load(f) +# datafromjson = data_dict["files"] ###################################################################################### #NOW THE REAL DEAL