summaryrefslogtreecommitdiff
path: root/site.py
diff options
context:
space:
mode:
Diffstat (limited to 'site.py')
-rw-r--r--site.py28
1 files changed, 25 insertions, 3 deletions
diff --git a/site.py b/site.py
index c722f5b..3ff05c0 100644
--- a/site.py
+++ b/site.py
@@ -3,7 +3,29 @@
import os
-for file in os.listdir("manuals"):
- if file.endswith(".txt"):
+folder = "manuals"
+header = """"""
+middlepart = """"""
+footer = """<script src="http://listjs.com/no-cdn/list.js"></script>"""
+for file in os.listdir(folder):
+ if file.endswith(".txt"):
+ print(file)
+ filename = file
+ text = open(folder+"/"+filename, 'r')
+ title = ""
+ filename = ""
+ tags = []
+ description = ""
+ for line in text:
+ line = line.replace('\n','')
+ if "Title:" in line:
+ title = line.replace("Title: ", "")
+ if "File:" in line:
+ filename = line.replace("File: ", "")
+ if "Tags:" in line:
+ tags = line.replace("Tags: ", "").split(",")
+ if "Description:" in line:
+ description = line.replace("Description: ", "")
+ if
-
+