From: Mart Lubbers Date: Mon, 19 May 2014 14:45:52 +0000 (+0200) Subject: started converting X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=25e0fd89ee34d39471785860f3744d371ad96de1;p=bsc-thesis1415.git started converting --- diff --git a/program/hypconvert/hypconvert.py b/program/hypconvert/hypconvert.py index e69de29..04b5eda 100644 --- a/program/hypconvert/hypconvert.py +++ b/program/hypconvert/hypconvert.py @@ -0,0 +1,16 @@ +#!/bin/env python +# -*- coding: utf-8 -*- +import pprint +import json +import ast +import re + +with open('../output/raw_out.txt', 'r') as data: + d = data.readline() + d = re.sub('\)\]}$', '}', + re.sub('\)\],', ',', + re.sub('\[Field\(\'.*?\', ', '', d))) + print d + d = ast.literal_eval(d) + +pprint.pprint(d) diff --git a/program/hypfront/install.sh b/program/hypfront/install.sh index 148c399..868501d 100644 --- a/program/hypfront/install.sh +++ b/program/hypfront/install.sh @@ -4,3 +4,4 @@ sudo cp -v ./*.{xml,py,html,js} /var/www/py/ sudo mkdir /var/www/py/files sudo chown -R mart:www-data /var/www/py sudo chmod -R 770 /var/www/py +ln -s /var/www/py/files/ ../output diff --git a/program/output b/program/output new file mode 120000 index 0000000..6550f0b --- /dev/null +++ b/program/output @@ -0,0 +1 @@ +/var/www/py/files/ \ No newline at end of file