From 25e0fd89ee34d39471785860f3744d371ad96de1 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 19 May 2014 16:45:52 +0200 Subject: [PATCH] started converting --- program/hypconvert/hypconvert.py | 16 ++++++++++++++++ program/hypfront/install.sh | 1 + program/output | 1 + 3 files changed, 18 insertions(+) create mode 120000 program/output 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 -- 2.20.1