Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
71 naveen 1
import camera_math as mathmodel
73 naveen 2
import utils
71 naveen 3
 
73 naveen 4
print "expSlide=" + `expSlide`
71 naveen 5
 
73 naveen 6
struct = utils.contentModel2Struct(expSlide)
7
print "struct=" + `struct`
8
 
76 naveen 9
if struct.has_key("features") :
10
    features = struct.get("features")
11
    camcount = features.pop("Number of Cameras")
12
    print "camcount=" + `camcount`
13
 
14
    nfcsfeatures = {}
15
 
16
    if camcount == 1 :
17
        nfcsfeatures['Primary camera'] = []
18
 
19
    elif camcount > 1 :
20
        nfcsfeatures['Secondary camera'] = []
21
 
22
    nfcsslides = {}
23
    nfcsslides['Number of Cameras'] = {'features': nfcsfeatures}
24
 
25
    struct['childrenslides'] = nfcsslides
26
 
27
    print "newstruct=" + `struct`
28
 
71 naveen 29
score = mathmodel.getscore(struct)