Browse Source

updates for the contextualise

master
zeroth 5 years ago
parent
commit
7b7f03a2f3
  1. BIN
      __pycache__/contextualise.cpython-35.pyc
  2. 17
      contextualise.py

BIN
__pycache__/contextualise.cpython-35.pyc

Binary file not shown.

17
contextualise.py

@ -29,7 +29,7 @@ listingdirectories = [] #paths
jsonfiles = [] #json files
thefile = None #selected file for description
now = strftime("%Y-%m-%d_%H:%M:%S", gmtime()) #description time
positioninarray = 2 #counter
positioninarray = 8 #counter
listofdicts=[] #to be able to import and use json content
@ -87,6 +87,21 @@ def description():
<source src="'''+thefile+'''" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>''')
#if txtfile
elif thefile.lower().endswith(('.txt')):
# print(thefile)
with open("static/"+thefile,"r") as f:
path = f.read()
thefile = path
# yotxt = open(thefile, 'r+')
# thefile = text.read()
# text.close()
# thefile = Markup('''<iframe src="'''+thefile+'''">
# ''')
#ifvid to be added
elif thefile.lower().endswith(('.mp4')):
thefile = Markup(''' <video width="320" height="240" controls>

Loading…
Cancel
Save