diff --git a/distribusi.py b/distribusi.py index eb00de7..f409d31 100755 --- a/distribusi.py +++ b/distribusi.py @@ -23,9 +23,12 @@ else: mime_type = magic.Magic(mime=True) -file_types = {'image':'', 'pdf':'{}', +file_types = {'image':'', 'pdf':'', 'text':'{}', 'video':'', 'audio':'','html':'{}'} +code_types = ['x-c', 'html'] + + def dict_by_value(dictionary, value): return(list(dictionary.keys())[list(dictionary.values()).index(value)]) # returns the key for the given value def div(mime, tag, *values): @@ -33,6 +36,9 @@ def div(mime, tag, *values): class_name = values[0].split('.')[0].replace(' ', '_') if 'image' in mime: html ='
"+open(full_path).read()+"" + else: + a = file_types[mime] else: a = file_types[mime] diff --git a/page_template.py b/page_template.py index da22458..1a3f256 100644 --- a/page_template.py +++ b/page_template.py @@ -8,7 +8,8 @@ html_head = """