forked from kobotoolbox/formpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathessai.py
52 lines (32 loc) · 881 Bytes
/
essai.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# coding: utf-8
from __future__ import (unicode_literals, print_function,
absolute_import, division)
import unittest
from textwrap import dedent
from collections import OrderedDict
from nose.tools import raises
from formpack import FormPack
from formpack.fixtures import build_fixture
import time
a = time.time()
print('Loading fixtures')
title, schemas, submissions = build_fixture('grouped_repeatable')
b = time.time()
print(b - a, 's')
print('Loading schema')
fp = FormPack(schemas, title)
a = time.time()
print(a - b, 's')
options = { }
print('Python export')
export = fp.export(**options)
b = time.time()
print(b - a, 's')
print('xls export')
#export.to_xlsx('/tmp/foo.xlsx', submissions)
#data = export.to_table()
#print(data['submissions'][-1])
for x in export.to_html(submissions):
print(x)
a = time.time()
print(a - b, 's')