moo 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/LICENSE +19 -0
  2. data/README.mkd +96 -0
  3. data/data/moo/templates/businesscard_bottom_image_dual_column_text_landscape.xml +361 -0
  4. data/data/moo/templates/businesscard_bottom_image_single_column_text_landscape.xml +231 -0
  5. data/data/moo/templates/businesscard_bottom_image_single_column_text_portrait.xml +361 -0
  6. data/data/moo/templates/businesscard_full_details_image_landscape.xml +77 -0
  7. data/data/moo/templates/businesscard_full_details_image_portrait.xml +75 -0
  8. data/data/moo/templates/businesscard_full_image_landscape.xml +73 -0
  9. data/data/moo/templates/businesscard_full_image_portrait.xml +73 -0
  10. data/data/moo/templates/businesscard_full_text_landscape.xml +343 -0
  11. data/data/moo/templates/businesscard_full_text_portrait.xml +342 -0
  12. data/data/moo/templates/businesscard_left_image_landscape.xml +363 -0
  13. data/data/moo/templates/businesscard_right_image_landscape.xml +363 -0
  14. data/data/moo/templates/businesscard_top_image_dual_column_text_landscape.xml +361 -0
  15. data/data/moo/templates/businesscard_top_image_single_column_text_landscape.xml +231 -0
  16. data/data/moo/templates/businesscard_top_image_single_column_text_portrait.xml +361 -0
  17. data/data/moo/templates/minicard_bottom_image_landscape.xml +155 -0
  18. data/data/moo/templates/minicard_full_details_image_landscape.xml +75 -0
  19. data/data/moo/templates/minicard_full_details_image_portrait.xml +74 -0
  20. data/data/moo/templates/minicard_full_image_landscape.xml +75 -0
  21. data/data/moo/templates/minicard_full_image_portrait.xml +74 -0
  22. data/data/moo/templates/minicard_full_text_landscape.xml +221 -0
  23. data/data/moo/templates/minicard_left_image_landscape.xml +238 -0
  24. data/data/moo/templates/minicard_right_image_landscape.xml +239 -0
  25. data/data/moo/templates/minicard_top_image_landscape.xml +154 -0
  26. data/data/moo/templates/postcard_full_details_image_landscape.xml +77 -0
  27. data/data/moo/templates/postcard_full_details_image_portrait.xml +76 -0
  28. data/data/moo/templates/postcard_full_image_landscape.xml +77 -0
  29. data/data/moo/templates/postcard_full_image_portrait.xml +77 -0
  30. data/data/moo/templates/postcard_full_text_portrait.xml +76 -0
  31. data/data/moo/templates/sticker_image.xml +76 -0
  32. data/lib/moo.rb +4 -0
  33. data/lib/moo/client.rb +111 -0
  34. data/lib/moo/core_ext/object.rb +7 -0
  35. data/lib/moo/core_ext/string.rb +6 -0
  36. data/lib/moo/model.rb +20 -0
  37. data/lib/moo/model/bounding_box.rb +70 -0
  38. data/lib/moo/model/box_data.rb +38 -0
  39. data/lib/moo/model/card.rb +12 -0
  40. data/lib/moo/model/colour.rb +100 -0
  41. data/lib/moo/model/data.rb +11 -0
  42. data/lib/moo/model/fixed_image_data.rb +40 -0
  43. data/lib/moo/model/font.rb +66 -0
  44. data/lib/moo/model/image_basket.rb +21 -0
  45. data/lib/moo/model/image_basket_item.rb +88 -0
  46. data/lib/moo/model/image_data.rb +64 -0
  47. data/lib/moo/model/multi_line_text_data.rb +8 -0
  48. data/lib/moo/model/pack.rb +50 -0
  49. data/lib/moo/model/side.rb +72 -0
  50. data/lib/moo/model/template.rb +78 -0
  51. data/lib/moo/model/text_data.rb +72 -0
  52. metadata +160 -0
@@ -0,0 +1,155 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <!-- $Id: minicard_bottom_image_landscape.xml 26867 2010-01-14 18:33:19Z deployer $ -->
4
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
5
+ <Code>minicard_bottom_image_landscape</Code>
6
+ <Version>1</Version>
7
+ <Settings>
8
+ <Units type="millimetres"/>
9
+ <Origin orientation="top-left" offsetX="0" offsetY="0"/>
10
+ <PrintArea>
11
+ <Width>74</Width>
12
+ <Height>32</Height>
13
+ </PrintArea>
14
+ <BleedBox>
15
+ <Centre x="37" y="16"/>
16
+ <Width>74</Width>
17
+ <Height>32</Height>
18
+ <Angle>0</Angle>
19
+ </BleedBox>
20
+ <CutBox>
21
+ <Centre x="37" y="16"/>
22
+ <Width>70</Width>
23
+ <Height>28</Height>
24
+ <Angle>0</Angle>
25
+ </CutBox>
26
+ <SafeAreaBox>
27
+ <!-- assume safe area matches bleed for now @ 2mm -->
28
+ <Centre x="37" y="16"/>
29
+ <Width>66</Width>
30
+ <Height>24</Height>
31
+ <Angle>0</Angle>
32
+ </SafeAreaBox>
33
+ <RotationAngle>0</RotationAngle>
34
+ <FontSubstitutionStrategy>allLinesIfAnyNeeded</FontSubstitutionStrategy>
35
+ </Settings>
36
+ <Items>
37
+ <Box>
38
+ <LinkId>background_box</LinkId>
39
+ <ClippingBox>
40
+ <Centre x="37" y="16"/>
41
+ <Width>74</Width>
42
+ <Height>32</Height>
43
+ <Angle>0</Angle>
44
+ </ClippingBox>
45
+ <Colour type="CMYK">
46
+ <Cyan>0</Cyan>
47
+ <Magenta>0</Magenta>
48
+ <Yellow>0</Yellow>
49
+ <Black>0</Black>
50
+ </Colour>
51
+ <Filled>true</Filled>
52
+ <Layout>
53
+ <zIndex>0</zIndex>
54
+ </Layout>
55
+ </Box>
56
+ <Image>
57
+ <LinkId>variable_image_back</LinkId>
58
+ <ClippingBox>
59
+ <Centre x="37" y="25.15"/>
60
+ <Width>74</Width>
61
+ <Height>13.7</Height>
62
+ <Angle>0</Angle>
63
+ </ClippingBox>
64
+ <Constraints>
65
+ <TopEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
66
+ <LeftEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
67
+ <BottomEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
68
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
69
+ </Constraints>
70
+ <Layout>
71
+ <zIndex>1</zIndex>
72
+ </Layout>
73
+ </Image>
74
+ <Text>
75
+ <LinkId>back_line_1</LinkId>
76
+ <Font>
77
+ <Family>Helvetica</Family>
78
+ <Bold>false</Bold>
79
+ <Italic>false</Italic>
80
+ </Font>
81
+ <ClippingBox>
82
+ <Centre x="37" y="6.9"/>
83
+ <Width>62</Width>
84
+ <Height>3.6</Height>
85
+ <Angle>0</Angle>
86
+ </ClippingBox>
87
+ <PointSize>2.46944444</PointSize>
88
+ <Alignment>left</Alignment>
89
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
90
+ <Layout>
91
+ <zIndex>2</zIndex>
92
+ </Layout>
93
+ <Colour type="RGB">
94
+ <Red>0</Red>
95
+ <Green>0</Green>
96
+ <Blue>0</Blue>
97
+ </Colour>
98
+ <Text/>
99
+ </Text>
100
+ <Text>
101
+ <LinkId>back_line_2</LinkId>
102
+ <Font>
103
+ <Family>Helvetica</Family>
104
+ <Bold>false</Bold>
105
+ <Italic>false</Italic>
106
+ </Font>
107
+ <ClippingBox>
108
+ <Centre x="37" y="10.5"/>
109
+ <Width>62</Width>
110
+ <Height>3.6</Height>
111
+ <Angle>0</Angle>
112
+ </ClippingBox>
113
+ <!-- 7 * (25.4/72) = 7pt -->
114
+ <PointSize>2.46944444</PointSize>
115
+ <Alignment>left</Alignment>
116
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
117
+ <Layout>
118
+ <zIndex>3</zIndex>
119
+ </Layout>
120
+ <Colour type="RGB">
121
+ <Red>0</Red>
122
+ <Green>0</Green>
123
+ <Blue>0</Blue>
124
+ </Colour>
125
+ <Text/>
126
+ </Text>
127
+ <Text>
128
+ <LinkId>back_line_3</LinkId>
129
+ <Font>
130
+ <Family>Helvetica</Family>
131
+ <Bold>false</Bold>
132
+ <Italic>false</Italic>
133
+ </Font>
134
+ <ClippingBox>
135
+ <Centre x="37" y="14.1"/>
136
+ <Width>62</Width>
137
+ <Height>3.6</Height>
138
+ <Angle>0</Angle>
139
+ </ClippingBox>
140
+ <!-- 7 * (25.4/72) = 7pt -->
141
+ <PointSize>2.46944444</PointSize>
142
+ <Alignment>left</Alignment>
143
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
144
+ <Layout>
145
+ <zIndex>4</zIndex>
146
+ </Layout>
147
+ <Colour type="RGB">
148
+ <Red>0</Red>
149
+ <Green>0</Green>
150
+ <Blue>0</Blue>
151
+ </Colour>
152
+ <Text/>
153
+ </Text>
154
+ </Items>
155
+ </Template>
@@ -0,0 +1,75 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_full_details_image_landscape</Code>
5
+ <Version>1</Version>
6
+ <Settings>
7
+ <Units type="millimetres"/>
8
+ <Origin orientation="top-left" offsetX="0" offsetY="0"/>
9
+ <PrintArea>
10
+ <Width>74</Width>
11
+ <Height>32</Height>
12
+ </PrintArea>
13
+ <BleedBox>
14
+ <Centre x="37" y="16"/>
15
+ <Width>74</Width>
16
+ <Height>32</Height>
17
+ <Angle>0</Angle>
18
+ </BleedBox>
19
+ <CutBox>
20
+ <Centre x="37" y="16"/>
21
+ <Width>70</Width>
22
+ <Height>28</Height>
23
+ <Angle>0</Angle>
24
+ </CutBox>
25
+ <SafeAreaBox>
26
+ <!-- assume safe area matches bleed for now @ 2mm -->
27
+ <Centre x="37" y="16"/>
28
+ <Width>66</Width>
29
+ <Height>24</Height>
30
+ <Angle>0</Angle>
31
+ </SafeAreaBox>
32
+ <RotationAngle>0</RotationAngle>
33
+ <FontSubstitutionStrategy>allLinesIfAnyNeeded</FontSubstitutionStrategy>
34
+ </Settings>
35
+ <Items>
36
+ <Box>
37
+ <LinkId>background_box</LinkId>
38
+ <ClippingBox>
39
+ <Centre x="37" y="16"/>
40
+ <Width>74</Width>
41
+ <Height>32</Height>
42
+ <Angle>0</Angle>
43
+ </ClippingBox>
44
+ <Colour type="CMYK">
45
+ <Cyan>0</Cyan>
46
+ <Magenta>0</Magenta>
47
+ <Yellow>0</Yellow>
48
+ <Black>0</Black>
49
+ </Colour>
50
+ <Filled>true</Filled>
51
+ <Layout>
52
+ <zIndex>0</zIndex>
53
+ </Layout>
54
+ </Box>
55
+ <Image>
56
+ <LinkId>variable_image_back</LinkId>
57
+ <ClippingBox>
58
+ <Centre x="37" y="16"/>
59
+ <Width>74</Width>
60
+ <Height>32</Height>
61
+ <Angle>0</Angle>
62
+ </ClippingBox>
63
+ <Constraints>
64
+ <TopEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
65
+ <LeftEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
66
+ <BottomEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
67
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
68
+ </Constraints>
69
+ <Layout>
70
+ <zIndex>2</zIndex>
71
+ </Layout>
72
+ </Image>
73
+ </Items>
74
+ </Template>
75
+
@@ -0,0 +1,74 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_full_details_image_portrait</Code>
5
+ <Version>1</Version>
6
+ <Settings>
7
+ <Units type="millimetres"/>
8
+ <Origin orientation="top-left" offsetX="0" offsetY="0"/>
9
+ <PrintArea>
10
+ <Width>32</Width>
11
+ <Height>74</Height>
12
+ </PrintArea>
13
+ <BleedBox>
14
+ <Centre x="16" y="37"/>
15
+ <Width>32</Width>
16
+ <Height>74</Height>
17
+ <Angle>0</Angle>
18
+ </BleedBox>
19
+ <CutBox>
20
+ <Centre x="16" y="37"/>
21
+ <Width>28</Width>
22
+ <Height>70</Height>
23
+ <Angle>0</Angle>
24
+ </CutBox>
25
+ <SafeAreaBox>
26
+ <!-- assume safe area matches bleed for now @ 2mm -->
27
+ <Centre x="16" y="37"/>
28
+ <Width>24</Width>
29
+ <Height>66</Height>
30
+ <Angle>0</Angle>
31
+ </SafeAreaBox>
32
+ <RotationAngle>270</RotationAngle>
33
+ <FontSubstitutionStrategy>allLinesIfAnyNeeded</FontSubstitutionStrategy>
34
+ </Settings>
35
+ <Items>
36
+ <Box>
37
+ <LinkId>background_box</LinkId>
38
+ <ClippingBox>
39
+ <Centre x="16" y="37"/>
40
+ <Width>32</Width>
41
+ <Height>74</Height>
42
+ <Angle>0</Angle>
43
+ </ClippingBox>
44
+ <Colour type="CMYK">
45
+ <Cyan>0</Cyan>
46
+ <Magenta>0</Magenta>
47
+ <Yellow>0</Yellow>
48
+ <Black>0</Black>
49
+ </Colour>
50
+ <Filled>true</Filled>
51
+ <Layout>
52
+ <zIndex>0</zIndex>
53
+ </Layout>
54
+ </Box>
55
+ <Image>
56
+ <LinkId>variable_image_back</LinkId>
57
+ <ClippingBox>
58
+ <Centre x="16" y="37"/>
59
+ <Width>32</Width>
60
+ <Height>74</Height>
61
+ <Angle>0</Angle>
62
+ </ClippingBox>
63
+ <Constraints>
64
+ <TopEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
65
+ <LeftEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
66
+ <BottomEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
67
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
68
+ </Constraints>
69
+ <Layout>
70
+ <zIndex>2</zIndex>
71
+ </Layout>
72
+ </Image>
73
+ </Items>
74
+ </Template>
@@ -0,0 +1,75 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_full_image_landscape</Code>
5
+ <Version>1</Version>
6
+ <Settings>
7
+ <Units type="millimetres"/>
8
+ <Origin orientation="top-left" offsetX="0" offsetY="0"/>
9
+ <PrintArea>
10
+ <Width>74</Width>
11
+ <Height>32</Height>
12
+ </PrintArea>
13
+ <BleedBox>
14
+ <Centre x="37" y="16"/>
15
+ <Width>74</Width>
16
+ <Height>32</Height>
17
+ <Angle>0</Angle>
18
+ </BleedBox>
19
+ <CutBox>
20
+ <Centre x="37" y="16"/>
21
+ <Width>70</Width>
22
+ <Height>28</Height>
23
+ <Angle>0</Angle>
24
+ </CutBox>
25
+ <SafeAreaBox>
26
+ <!-- assume safe area matches bleed for now @ 2mm -->
27
+ <Centre x="37" y="16"/>
28
+ <Width>66</Width>
29
+ <Height>24</Height>
30
+ <Angle>0</Angle>
31
+ </SafeAreaBox>
32
+ <RotationAngle>0</RotationAngle>
33
+ <FontSubstitutionStrategy>allLinesIfAnyNeeded</FontSubstitutionStrategy>
34
+ </Settings>
35
+ <Items>
36
+ <Box>
37
+ <LinkId>background_box</LinkId>
38
+ <ClippingBox>
39
+ <Centre x="37" y="16"/>
40
+ <Width>74</Width>
41
+ <Height>32</Height>
42
+ <Angle>0</Angle>
43
+ </ClippingBox>
44
+ <Colour type="CMYK">
45
+ <Cyan>0</Cyan>
46
+ <Magenta>0</Magenta>
47
+ <Yellow>0</Yellow>
48
+ <Black>0</Black>
49
+ </Colour>
50
+ <Filled>true</Filled>
51
+ <Layout>
52
+ <zIndex>0</zIndex>
53
+ </Layout>
54
+ </Box>
55
+ <Image>
56
+ <LinkId>variable_image_front</LinkId>
57
+ <ClippingBox>
58
+ <Centre x="37" y="16"/>
59
+ <Width>74</Width>
60
+ <Height>32</Height>
61
+ <Angle>0</Angle>
62
+ </ClippingBox>
63
+ <Constraints>
64
+ <TopEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
65
+ <LeftEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
66
+ <BottomEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
67
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
68
+ </Constraints>
69
+ <Layout>
70
+ <zIndex>1</zIndex>
71
+ </Layout>
72
+ </Image>
73
+ </Items>
74
+ </Template>
75
+
@@ -0,0 +1,74 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_full_image_portrait</Code>
5
+ <Version>1</Version>
6
+ <Settings>
7
+ <Units type="millimetres"/>
8
+ <Origin orientation="top-left" offsetX="0" offsetY="0"/>
9
+ <PrintArea>
10
+ <Width>32</Width>
11
+ <Height>74</Height>
12
+ </PrintArea>
13
+ <BleedBox>
14
+ <Centre x="16" y="37"/>
15
+ <Width>32</Width>
16
+ <Height>74</Height>
17
+ <Angle>0</Angle>
18
+ </BleedBox>
19
+ <CutBox>
20
+ <Centre x="16" y="37"/>
21
+ <Width>28</Width>
22
+ <Height>70</Height>
23
+ <Angle>0</Angle>
24
+ </CutBox>
25
+ <SafeAreaBox>
26
+ <!-- assume safe area matches bleed for now @ 2mm -->
27
+ <Centre x="16" y="37"/>
28
+ <Width>24</Width>
29
+ <Height>66</Height>
30
+ <Angle>0</Angle>
31
+ </SafeAreaBox>
32
+ <RotationAngle>90</RotationAngle>
33
+ <FontSubstitutionStrategy>allLinesIfAnyNeeded</FontSubstitutionStrategy>
34
+ </Settings>
35
+ <Items>
36
+ <Box>
37
+ <LinkId>background_box</LinkId>
38
+ <ClippingBox>
39
+ <Centre x="16" y="37"/>
40
+ <Width>32</Width>
41
+ <Height>74</Height>
42
+ <Angle>0</Angle>
43
+ </ClippingBox>
44
+ <Colour type="CMYK">
45
+ <Cyan>0</Cyan>
46
+ <Magenta>0</Magenta>
47
+ <Yellow>0</Yellow>
48
+ <Black>0</Black>
49
+ </Colour>
50
+ <Filled>true</Filled>
51
+ <Layout>
52
+ <zIndex>0</zIndex>
53
+ </Layout>
54
+ </Box>
55
+ <Image>
56
+ <LinkId>variable_image_front</LinkId>
57
+ <ClippingBox>
58
+ <Centre x="16" y="37"/>
59
+ <Width>32</Width>
60
+ <Height>74</Height>
61
+ <Angle>0</Angle>
62
+ </ClippingBox>
63
+ <Constraints>
64
+ <TopEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
65
+ <LeftEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
66
+ <BottomEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
67
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true" insideSafe="true"/>
68
+ </Constraints>
69
+ <Layout>
70
+ <zIndex>1</zIndex>
71
+ </Layout>
72
+ </Image>
73
+ </Items>
74
+ </Template>