diff --git a/src/app/components/cv/cv.component.html b/src/app/components/cv/cv.component.html
index fdea95a..fe8000c 100644
--- a/src/app/components/cv/cv.component.html
+++ b/src/app/components/cv/cv.component.html
@@ -13,6 +13,7 @@
{{educationItem.description}}
+ Some random text here random text here random text here random text here random text here random text here random text here random text here random text here
diff --git a/src/assets/post/project/cupboard1/full.html b/src/assets/post/cupboard1/full.html
similarity index 100%
rename from src/assets/post/project/cupboard1/full.html
rename to src/assets/post/cupboard1/full.html
diff --git a/src/assets/post/project/cupboard1/info.json b/src/assets/post/cupboard1/info.json
similarity index 100%
rename from src/assets/post/project/cupboard1/info.json
rename to src/assets/post/cupboard1/info.json
diff --git a/src/assets/post/blog/first/full.html b/src/assets/post/first/full.html
similarity index 100%
rename from src/assets/post/blog/first/full.html
rename to src/assets/post/first/full.html
diff --git a/src/assets/post/blog/first/info.json b/src/assets/post/first/info.json
similarity index 100%
rename from src/assets/post/blog/first/info.json
rename to src/assets/post/first/info.json
diff --git a/src/assets/post/tech/lxdarch/full.html b/src/assets/post/lxdarch/full.html
similarity index 100%
rename from src/assets/post/tech/lxdarch/full.html
rename to src/assets/post/lxdarch/full.html
diff --git a/src/assets/post/tech/lxdarch/info.json b/src/assets/post/lxdarch/info.json
similarity index 100%
rename from src/assets/post/tech/lxdarch/info.json
rename to src/assets/post/lxdarch/info.json
diff --git a/src/assets/post/project/test/full.html b/src/assets/post/test/full.html
similarity index 100%
rename from src/assets/post/project/test/full.html
rename to src/assets/post/test/full.html
diff --git a/src/assets/post/project/test/info.json b/src/assets/post/test/info.json
similarity index 100%
rename from src/assets/post/project/test/info.json
rename to src/assets/post/test/info.json
diff --git a/src/assets/posts.json b/src/assets/posts.json
index d6f07cb..3205ea1 100644
--- a/src/assets/posts.json
+++ b/src/assets/posts.json
@@ -1 +1 @@
-[{"info": {"created_timestamp": 1515095948.838848, "title": "Test title"}, "post": [], "type": "project", "id": "test"}, {"info": {"created_timestamp": 1515094644.215065, "title": "cupboard"}, "post": [], "type": "project", "id": "cupboard1"}, {"info": {"created_timestamp": 1515094644.215333, "title": "some things about lxc in arch"}, "post": [], "type": "tech", "id": "lxdarch"}, {"info": {"created_timestamp": 1515094679.342938, "title": "Who said Web 1.0 was dead anyway?"}, "post": [], "type": "blog", "id": "first"}]
\ No newline at end of file
+[{"info": {"created_timestamp": 1515094679.342938, "title": "Who said Web 1.0 was dead anyway?"}, "id": "first"}, {"info": {"created_timestamp": 1515094644.215065, "title": "cupboard"}, "id": "cupboard1"}, {"info": {"created_timestamp": 1515095948.838848, "title": "Test title"}, "id": "test"}, {"info": {"created_timestamp": 1515094644.215333, "title": "some things about lxc in arch"}, "id": "lxdarch"}]
\ No newline at end of file
diff --git a/src/scripts/compileposts.py b/src/scripts/compileposts.py
index af0269d..3046065 100644
--- a/src/scripts/compileposts.py
+++ b/src/scripts/compileposts.py
@@ -1,57 +1,48 @@
+#!/usr/bin/env python
import os;
import json;
import time;
# each folder in the post folder is a type of post
base = '../assets/post'
-types = os.listdir(base);
+posts = os.listdir(base);
outputfile = '../assets/posts.json'
-# go over the types
-for type in types:
- print type
-
# build ourselves a json object
jsonresult = [];
-for type in types:
- # now read that folder
- posts = os.listdir(base+"/"+type);
- # each folder in the current one is a post! the name of the folder is the _id_
- for post in posts:
- print('doing post '+post)
- postdir = base+"/"+type+"/"+post;
- infofile = postdir+"/info.json";
- print(infofile)
- with open(infofile) as j:
- tt = j.read()
- d = json.loads(tt)
- temp = {};
- temp['type'] = type;
- temp['id'] = post;
- if 'post' not in temp:
- temp['post'] = [];
- temp['info'] = d;
+# each folder in the current one is a post! the name of the folder is the _id_
+for post in posts:
+ print('doing post '+post)
+ postdir = base+"/"+post;
+ infofile = postdir+"/info.json";
+ print(infofile)
+ with open(infofile) as j:
+ tt = j.read()
+ d = json.loads(tt)
+ temp = {};
+ temp['id'] = post;
+ temp['info'] = d;
- # have to write the 'modified date' in the info.json of the post if it's not there yet
- if not d.has_key('created_timestamp'):
- d['created_timestamp'] = time.time()
- # persist it in the json file itself
- with open(infofile, 'w') as infooutfile:
- json.dump(d, infooutfile, sort_keys=True, indent=4, separators=(',', ': '))
+ # have to write the 'modified date' in the info.json of the post if it's not there yet
+ if not d.has_key('created_timestamp'):
+ d['created_timestamp'] = time.time()
+ # persist it in the json file itself
+ with open(infofile, 'w') as infooutfile:
+ json.dump(d, infooutfile, sort_keys=True, indent=4, separators=(',', ': '))
- # # figure out the last change of any file in the folder
- # lastchange = 0;
- # contents = os.listdir(postdir);
- # for contentfile in contents:
- # lastchange = max(lastchange,os.path.getmtime(postdir+"/"+contentfile))
- # temp['lastmodified'] = lastchange;
+ # # figure out the last change of any file in the folder
+ # lastchange = 0;
+ # contents = os.listdir(postdir);
+ # for contentfile in contents:
+ # lastchange = max(lastchange,os.path.getmtime(postdir+"/"+contentfile))
+ # temp['lastmodified'] = lastchange;
- jsonresult.append(temp);
+ jsonresult.append(temp);
- # completely append the info.json file
+ # completely append the info.json file
# print the result of the json parse
print(json.dumps(jsonresult));
with open(outputfile, 'w') as outfile:
- json.dump(jsonresult, outfile)
\ No newline at end of file
+ json.dump(jsonresult, outfile)