diff options
author | florent <florent.pigout@gmail.com> | 2011-08-25 19:44:30 (GMT) |
---|---|---|
committer | florent <florent.pigout@gmail.com> | 2011-08-25 19:44:30 (GMT) |
commit | 8e93250fd567dce82706242cedfa5d4bcbd9d5b9 (patch) | |
tree | 5b1cc3b2e0ee68a794099a2610f32bb8ad002748 | |
parent | 48a2247e0a531027bac440d64ca4649e2f23b835 (diff) |
move data file to sample folder or should be managed in a data folder + add some tools
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | DATABASE | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | DATABASE2 | bin | 6144 -> 0 bytes | |||
-rw-r--r-- | DATABASE3 | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | activity/activity-nutriweb.svg | 232 | ||||
-rw-r--r-- | lib/server/tools/__init__.py | 1 | ||||
-rw-r--r-- | lib/server/tools/_obj.py | 8 | ||||
-rw-r--r-- | nutrinoweb/controllers/schema.sql | 29 | ||||
-rw-r--r-- | nutrinoweb/controllers/schema2.sql | 30 | ||||
-rw-r--r-- | sample/aliments.txt (renamed from nutrinoweb/controllers/aliments.txt) | 0 | ||||
-rwxr-xr-x | sample/dbinput.txt (renamed from nutrinoweb/controllers/dbinput.txt) | 0 | ||||
-rwxr-xr-x | sample/dbinputsparetime.txt (renamed from nutrinoweb/controllers/dbinputsparetime.txt) | 0 | ||||
-rw-r--r-- | sample/status.txt (renamed from nutrinoweb/controllers/status.txt) | 0 | ||||
-rw-r--r-- | sample/statusanfang.txt (renamed from nutrinoweb/controllers/statusanfang.txt) | 0 |
14 files changed, 10 insertions, 291 deletions
@@ -9,3 +9,4 @@ syntax: glob dist docs/build .DS_Store +data/ diff --git a/DATABASE b/DATABASE Binary files differdeleted file mode 100644 index 442c665..0000000 --- a/DATABASE +++ /dev/null diff --git a/DATABASE2 b/DATABASE2 Binary files differdeleted file mode 100644 index 620ce22..0000000 --- a/DATABASE2 +++ /dev/null diff --git a/DATABASE3 b/DATABASE3 Binary files differdeleted file mode 100644 index dd024fc..0000000 --- a/DATABASE3 +++ /dev/null diff --git a/activity/activity-nutriweb.svg b/activity/activity-nutriweb.svg deleted file mode 100644 index 0726484..0000000 --- a/activity/activity-nutriweb.svg +++ /dev/null @@ -1,232 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.0" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.47 r22583" - sodipodi:docname="activity-NutriWeb.svg" - width="55" - height="55" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <metadata - id="metadata371"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - inkscape:window-height="882" - inkscape:window-width="1233" - inkscape:pageshadow="2" - inkscape:pageopacity="0.0" - guidetolerance="10.0" - gridtolerance="10.0" - objecttolerance="10.0" - borderopacity="1.0" - bordercolor="#666666" - pagecolor="#ffffff" - id="base" - inkscape:zoom="4.2923284" - inkscape:cx="63.342591" - inkscape:cy="51.710699" - inkscape:window-x="168" - inkscape:window-y="24" - inkscape:current-layer="svg2" - width="210mm" - height="40mm" - units="mm" - showgrid="false" - inkscape:window-maximized="0" /> - <defs - id="defs4"> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 71.887497 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="486.04999 : 71.887497 : 1" - inkscape:persp3d-origin="243.02499 : 47.924998 : 1" - id="perspective46" /> - <linearGradient - id="linearGradient2795"> - <stop - style="stop-color: rgb(184, 184, 184); stop-opacity: 0.498039;" - offset="0" - id="stop2797" /> - <stop - style="stop-color: rgb(127, 127, 127); stop-opacity: 0;" - offset="1" - id="stop2799" /> - </linearGradient> - <linearGradient - id="linearGradient2787"> - <stop - style="stop-color: rgb(127, 127, 127); stop-opacity: 0.5;" - offset="0" - id="stop2789" /> - <stop - style="stop-color: rgb(127, 127, 127); stop-opacity: 0;" - offset="1" - id="stop2791" /> - </linearGradient> - <linearGradient - id="linearGradient3676"> - <stop - style="stop-color: rgb(178, 178, 178); stop-opacity: 0.5;" - offset="0" - id="stop3678" /> - <stop - style="stop-color: rgb(179, 179, 179); stop-opacity: 0;" - offset="1" - id="stop3680" /> - </linearGradient> - <linearGradient - id="linearGradient3236"> - <stop - style="stop-color: rgb(244, 244, 244); stop-opacity: 1;" - offset="0" - id="stop3244" /> - <stop - style="stop-color: white; stop-opacity: 1;" - offset="1" - id="stop3240" /> - </linearGradient> - <linearGradient - id="linearGradient4671"> - <stop - style="stop-color: rgb(255, 212, 59); stop-opacity: 1;" - offset="0" - id="stop4673" /> - <stop - style="stop-color: rgb(255, 232, 115); stop-opacity: 1;" - offset="1" - id="stop4675" /> - </linearGradient> - <linearGradient - id="linearGradient4689"> - <stop - style="stop-color: rgb(90, 159, 212); stop-opacity: 1;" - offset="0" - id="stop4691" /> - <stop - style="stop-color: rgb(48, 105, 152); stop-opacity: 1;" - offset="1" - id="stop4693" /> - </linearGradient> - <linearGradient - x1="224.23996" - y1="144.75717" - x2="-65.308502" - y2="144.75717" - id="linearGradient2987" - xlink:href="#linearGradient4671" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" /> - <linearGradient - x1="172.94208" - y1="77.475983" - x2="26.670298" - y2="76.313133" - id="linearGradient2990" - xlink:href="#linearGradient4689" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4689" - id="linearGradient2587" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" - x1="172.94208" - y1="77.475983" - x2="26.670298" - y2="76.313133" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4671" - id="linearGradient2589" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" - x1="224.23996" - y1="144.75717" - x2="-65.308502" - y2="144.75717" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4689" - id="linearGradient2248" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" - x1="172.94208" - y1="77.475983" - x2="26.670298" - y2="76.313133" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4671" - id="linearGradient2250" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(100.27,99.6112)" - x1="224.23996" - y1="144.75717" - x2="-65.308502" - y2="144.75717" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4671" - id="linearGradient2255" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" - x1="224.23996" - y1="144.75717" - x2="-65.308502" - y2="144.75717" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4689" - id="linearGradient2258" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" - x1="172.94208" - y1="76.176224" - x2="26.670298" - y2="76.313133" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2795" - id="radialGradient2801" - cx="61.518883" - cy="132.28575" - fx="61.518883" - fy="132.28575" - r="29.036913" - gradientTransform="matrix(1,0,0,0.177966,0,108.743)" - gradientUnits="userSpaceOnUse" /> - </defs> - <g - id="g2847" - transform="matrix(0.46766264,0,0,0.46766264,-1.1078811,-1.5517981)"> - <path - id="path1948" - d="m 60.510156,6.3979729 c -4.583653,0.021298 -8.960939,0.4122177 -12.8125,1.09375 C 36.35144,9.4962267 34.291407,13.691825 34.291406,21.429223 l 0,10.21875 26.8125,0 0,3.40625 -26.8125,0 -10.0625,0 c -7.792459,0 -14.6157592,4.683717 -16.7500002,13.59375 -2.46182,10.212966 -2.5710151,16.586023 0,27.25 1.9059283,7.937852 6.4575432,13.593748 14.2500002,13.59375 l 9.21875,0 0,-12.25 c 0,-8.849902 7.657144,-16.656248 16.75,-16.65625 l 26.78125,0 c 7.454951,0 13.406253,-6.138164 13.40625,-13.625 l 0,-25.53125 c 0,-7.266339 -6.12998,-12.7247775 -13.40625,-13.9375001 -4.605987,-0.7667253 -9.385097,-1.1150483 -13.96875,-1.09375 z m -14.5,8.2187501 c 2.769547,0 5.03125,2.298646 5.03125,5.125 -2e-6,2.816336 -2.261703,5.09375 -5.03125,5.09375 -2.779476,-1e-6 -5.03125,-2.277415 -5.03125,-5.09375 -1e-6,-2.826353 2.251774,-5.125 5.03125,-5.125 z" - style="fill:#000000;fill-opacity:1" /> - <path - id="path1950" - d="m 91.228906,35.054223 0,11.90625 c 0,9.230755 -7.825895,16.999999 -16.75,17 l -26.78125,0 c -7.335833,0 -13.406249,6.278483 -13.40625,13.625 l 0,25.531247 c 0,7.26634 6.318588,11.54032 13.40625,13.625 8.487331,2.49561 16.626237,2.94663 26.78125,0 6.750155,-1.95439 13.406253,-5.88761 13.40625,-13.625 l 0,-10.218747 -26.78125,0 0,-3.40625 26.78125,0 13.406254,0 c 7.79246,0 10.69625,-5.435408 13.40624,-13.59375 2.79933,-8.398886 2.68022,-16.475776 0,-27.25 -1.92578,-7.757441 -5.60387,-13.59375 -13.40624,-13.59375 l -10.062504,0 z m -15.0625,64.65625 c 2.779478,3e-6 5.03125,2.277417 5.03125,5.093747 -2e-6,2.82635 -2.251775,5.125 -5.03125,5.125 -2.76955,0 -5.03125,-2.29865 -5.03125,-5.125 2e-6,-2.81633 2.261697,-5.093747 5.03125,-5.093747 z" - style="fill:#000000;fill-opacity:1" /> - </g> -</svg> diff --git a/lib/server/tools/__init__.py b/lib/server/tools/__init__.py index e69de29..ec464ac 100644 --- a/lib/server/tools/__init__.py +++ b/lib/server/tools/__init__.py @@ -0,0 +1 @@ +from server.tools._obj import obj diff --git a/lib/server/tools/_obj.py b/lib/server/tools/_obj.py new file mode 100644 index 0000000..c2c3383 --- /dev/null +++ b/lib/server/tools/_obj.py @@ -0,0 +1,8 @@ + +class obj(object): + def __init__(self, d): + for a, b in d.items(): + if isinstance(b, (list, tuple)): + setattr(self, a, [obj(x) if isinstance(x, dict) else x for x in b]) + else: + setattr(self, a, obj(b) if isinstance(b, dict) else b) diff --git a/nutrinoweb/controllers/schema.sql b/nutrinoweb/controllers/schema.sql deleted file mode 100644 index fab8d9a..0000000 --- a/nutrinoweb/controllers/schema.sql +++ /dev/null @@ -1,29 +0,0 @@ -drop table if exists entries; -create table entries( - id integer primary key autoincrement, - title string not null, - water string not null, - energie string not null, - calcium string not null, - iron string not null, - magnesium string not null, - phosphorus string not null, - potassium string not null, - sodium string not null, - zinc string not null, - copper string not null, - vit_c string not null, - thiamin string not null, - riboflavin string not null, - niacin string not null, - panto_acid string not null, - vit_b6 string not null, - folate_tot string not null, - vit_b12 string not null, - vit_a string not null, - vit_e string not null, - vit_d string not null, - protein string not null, - path string, - scenario string -); diff --git a/nutrinoweb/controllers/schema2.sql b/nutrinoweb/controllers/schema2.sql deleted file mode 100644 index 17bb3c7..0000000 --- a/nutrinoweb/controllers/schema2.sql +++ /dev/null @@ -1,30 +0,0 @@ -drop table if exists aliments; -create table aliments( - id integer primary key autoincrement, - title string not null, - path string not null, - quantity string not null, - unit string not null, - water string not null, - energie string not null, - calcium string not null, - iron string not null, - magnesium string not null, - phosphorus string not null, - potassium string not null, - sodium string not null, - zinc string not null, - copper string not null, - vit_c string not null, - thiamin string not null, - riboflavin string not null, - niacin string not null, - panto_acid string not null, - vit_b6 string not null, - folate_tot string not null, - vit_b12 string not null, - vit_a string not null, - vit_e string not null, - vit_d string not null, - protein string not null -); diff --git a/nutrinoweb/controllers/aliments.txt b/sample/aliments.txt index b43ba12..b43ba12 100644 --- a/nutrinoweb/controllers/aliments.txt +++ b/sample/aliments.txt diff --git a/nutrinoweb/controllers/dbinput.txt b/sample/dbinput.txt index b9d4a11..b9d4a11 100755 --- a/nutrinoweb/controllers/dbinput.txt +++ b/sample/dbinput.txt diff --git a/nutrinoweb/controllers/dbinputsparetime.txt b/sample/dbinputsparetime.txt index 7b3e42e..7b3e42e 100755 --- a/nutrinoweb/controllers/dbinputsparetime.txt +++ b/sample/dbinputsparetime.txt diff --git a/nutrinoweb/controllers/status.txt b/sample/status.txt index 51792ad..51792ad 100644 --- a/nutrinoweb/controllers/status.txt +++ b/sample/status.txt diff --git a/nutrinoweb/controllers/statusanfang.txt b/sample/statusanfang.txt index 84ae936..84ae936 100644 --- a/nutrinoweb/controllers/statusanfang.txt +++ b/sample/statusanfang.txt |