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,239 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_right_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="63.5" y="16"/>
59
+ <Width>21</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
+ <Text>
74
+ <LinkId>back_line_1</LinkId>
75
+ <Font>
76
+ <Family>Helvetica</Family>
77
+ <Bold>false</Bold>
78
+ <Italic>false</Italic>
79
+ </Font>
80
+ <ClippingBox>
81
+ <!-- x = bleed + 4 + (text box width / 2) - -->
82
+ <!-- y = textbox baseline - (0.25 * height of textbox) -->
83
+ <Centre x="27.5" y="7.4"/>
84
+ <Width>43</Width>
85
+ <Height>3.6</Height>
86
+ <Angle>0</Angle>
87
+ </ClippingBox>
88
+ <!-- 7 * (25.4/72) = 7pt -->
89
+ <PointSize>2.46944444</PointSize>
90
+ <Alignment>left</Alignment>
91
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
92
+ <Layout>
93
+ <zIndex>2</zIndex>
94
+ </Layout>
95
+ <Colour type="RGB">
96
+ <Red>0</Red>
97
+ <Green>0</Green>
98
+ <Blue>0</Blue>
99
+ </Colour>
100
+ <Text/>
101
+ </Text>
102
+ <Text>
103
+ <LinkId>back_line_2</LinkId>
104
+ <Font>
105
+ <Family>Helvetica</Family>
106
+ <Bold>false</Bold>
107
+ <Italic>false</Italic>
108
+ </Font>
109
+ <ClippingBox>
110
+ <Centre x="27.5" y="11"/>
111
+ <Width>43</Width>
112
+ <Height>3.6</Height>
113
+ <Angle>0</Angle>
114
+ </ClippingBox>
115
+ <!-- 7 * (25.4/72) = 7pt -->
116
+ <PointSize>2.46944444</PointSize>
117
+ <Alignment>left</Alignment>
118
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
119
+ <Layout>
120
+ <zIndex>3</zIndex>
121
+ </Layout>
122
+ <Colour type="RGB">
123
+ <Red>0</Red>
124
+ <Green>0</Green>
125
+ <Blue>0</Blue>
126
+ </Colour>
127
+ <Text/>
128
+ </Text>
129
+ <Text>
130
+ <LinkId>back_line_3</LinkId>
131
+ <Font>
132
+ <Family>Helvetica</Family>
133
+ <Bold>false</Bold>
134
+ <Italic>false</Italic>
135
+ </Font>
136
+ <ClippingBox>
137
+ <Centre x="27.5" y="14.6"/>
138
+ <Width>43</Width>
139
+ <Height>3.6</Height>
140
+ <Angle>0</Angle>
141
+ </ClippingBox>
142
+ <!-- 7 * (25.4/72) = 7pt -->
143
+ <PointSize>2.46944444</PointSize>
144
+ <Alignment>left</Alignment>
145
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
146
+ <Layout>
147
+ <zIndex>4</zIndex>
148
+ </Layout>
149
+ <Colour type="RGB">
150
+ <Red>0</Red>
151
+ <Green>0</Green>
152
+ <Blue>0</Blue>
153
+ </Colour>
154
+ <Text/>
155
+ </Text>
156
+ <Text>
157
+ <LinkId>back_line_4</LinkId>
158
+ <Font>
159
+ <Family>Helvetica</Family>
160
+ <Bold>false</Bold>
161
+ <Italic>false</Italic>
162
+ </Font>
163
+ <ClippingBox>
164
+ <Centre x="27.5" y="18.2"/>
165
+ <Width>43</Width>
166
+ <Height>3.6</Height>
167
+ <Angle>0</Angle>
168
+ </ClippingBox>
169
+ <!-- 7 * (25.4/72) = 7pt -->
170
+ <PointSize>2.46944444</PointSize>
171
+ <Alignment>left</Alignment>
172
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
173
+ <Layout>
174
+ <zIndex>5</zIndex>
175
+ </Layout>
176
+ <Colour type="RGB">
177
+ <Red>0</Red>
178
+ <Green>0</Green>
179
+ <Blue>0</Blue>
180
+ </Colour>
181
+ <Text/>
182
+ </Text>
183
+ <Text>
184
+ <LinkId>back_line_5</LinkId>
185
+ <Font>
186
+ <Family>Helvetica</Family>
187
+ <Bold>false</Bold>
188
+ <Italic>false</Italic>
189
+ </Font>
190
+ <ClippingBox>
191
+ <Centre x="27.5" y="21.8"/>
192
+ <Width>43</Width>
193
+ <Height>3.6</Height>
194
+ <Angle>0</Angle>
195
+ </ClippingBox>
196
+ <!-- 7 * (25.4/72) = 7pt -->
197
+ <PointSize>2.46944444</PointSize>
198
+ <Alignment>left</Alignment>
199
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
200
+ <Layout>
201
+ <zIndex>6</zIndex>
202
+ </Layout>
203
+ <Colour type="RGB">
204
+ <Red>0</Red>
205
+ <Green>0</Green>
206
+ <Blue>0</Blue>
207
+ </Colour>
208
+ <Text/>
209
+ </Text>
210
+ <Text>
211
+ <LinkId>back_line_6</LinkId>
212
+ <Font>
213
+ <Family>Helvetica</Family>
214
+ <Bold>false</Bold>
215
+ <Italic>false</Italic>
216
+ </Font>
217
+ <ClippingBox>
218
+ <Centre x="27.5" y="25.4"/>
219
+ <Width>43</Width>
220
+ <Height>3.6</Height>
221
+ <Angle>0</Angle>
222
+ </ClippingBox>
223
+ <!-- 7 * (25.4/72) = 7pt -->
224
+ <PointSize>2.46944444</PointSize>
225
+ <Alignment>left</Alignment>
226
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
227
+ <Layout>
228
+ <zIndex>7</zIndex>
229
+ </Layout>
230
+ <Colour type="RGB">
231
+ <Red>0</Red>
232
+ <Green>0</Green>
233
+ <Blue>0</Blue>
234
+ </Colour>
235
+ <Text/>
236
+ </Text>
237
+ </Items>
238
+ </Template>
239
+
@@ -0,0 +1,154 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- $Id: minicard_top_image_landscape.xml 26867 2010-01-14 18:33:19Z deployer $ -->
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>minicard_top_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="6.85"/>
59
+ <Width>74</Width>
60
+ <Height>13.7</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
+ <Text>
74
+ <LinkId>back_line_1</LinkId>
75
+ <Font>
76
+ <Family>Helvetica</Family>
77
+ <Bold>false</Bold>
78
+ <Italic>false</Italic>
79
+ </Font>
80
+ <ClippingBox>
81
+ <Centre x="37" y="18.6"/>
82
+ <Width>62</Width>
83
+ <Height>3.6</Height>
84
+ <Angle>0</Angle>
85
+ </ClippingBox>
86
+ <PointSize>2.46944444</PointSize>
87
+ <Alignment>left</Alignment>
88
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
89
+ <Layout>
90
+ <zIndex>2</zIndex>
91
+ </Layout>
92
+ <Colour type="RGB">
93
+ <Red>0</Red>
94
+ <Green>0</Green>
95
+ <Blue>0</Blue>
96
+ </Colour>
97
+ <Text/>
98
+ </Text>
99
+ <Text>
100
+ <LinkId>back_line_2</LinkId>
101
+ <Font>
102
+ <Family>Helvetica</Family>
103
+ <Bold>false</Bold>
104
+ <Italic>false</Italic>
105
+ </Font>
106
+ <ClippingBox>
107
+ <Centre x="37" y="22.2"/>
108
+ <Width>62</Width>
109
+ <Height>3.6</Height>
110
+ <Angle>0</Angle>
111
+ </ClippingBox>
112
+ <!-- 7 * (25.4/72) = 7pt -->
113
+ <PointSize>2.46944444</PointSize>
114
+ <Alignment>left</Alignment>
115
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
116
+ <Layout>
117
+ <zIndex>3</zIndex>
118
+ </Layout>
119
+ <Colour type="RGB">
120
+ <Red>0</Red>
121
+ <Green>0</Green>
122
+ <Blue>0</Blue>
123
+ </Colour>
124
+ <Text/>
125
+ </Text>
126
+ <Text>
127
+ <LinkId>back_line_3</LinkId>
128
+ <Font>
129
+ <Family>Helvetica</Family>
130
+ <Bold>false</Bold>
131
+ <Italic>false</Italic>
132
+ </Font>
133
+ <ClippingBox>
134
+ <Centre x="37" y="25.8"/>
135
+ <Width>62</Width>
136
+ <Height>3.6</Height>
137
+ <Angle>0</Angle>
138
+ </ClippingBox>
139
+ <!-- 7 * (25.4/72) = 7pt -->
140
+ <PointSize>2.46944444</PointSize>
141
+ <Alignment>left</Alignment>
142
+ <Constraints fontFixed="false" colourFixed="false" pointSizeFixed="false" alignmentFixed="false"/>
143
+ <Layout>
144
+ <zIndex>4</zIndex>
145
+ </Layout>
146
+ <Colour type="RGB">
147
+ <Red>0</Red>
148
+ <Green>0</Green>
149
+ <Blue>0</Blue>
150
+ </Colour>
151
+ <Text/>
152
+ </Text>
153
+ </Items>
154
+ </Template>
@@ -0,0 +1,77 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <Template xmlns="http://www.moo.com/xsd/template-1.0">
4
+ <Code>postcard_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>152</Width>
11
+ <Height>109</Height>
12
+ </PrintArea>
13
+ <BleedBox>
14
+ <Centre x="76" y="54.5" />
15
+ <Width>152</Width>
16
+ <Height>109</Height>
17
+ <Angle>0</Angle>
18
+ </BleedBox>
19
+ <CutBox>
20
+ <Centre x="76" y="54.5" />
21
+ <Width>148</Width>
22
+ <Height>105</Height>
23
+ <Angle>0</Angle>
24
+ </CutBox>
25
+ <SafeAreaBox>
26
+ <!-- assume safe area matches bleed for now @ 2mm -->
27
+ <Centre x="76" y="54.5" />
28
+ <Width>144</Width>
29
+ <Height>101</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="76" y="54.5" />
40
+ <Width>152</Width>
41
+ <Height>109</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="76" y="54.5" />
59
+ <Width>152</Width>
60
+ <Height>109</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"
67
+ insideSafe="true" />
68
+ <RightEdge outside="true" betweenBleedAndCut="true" betweenCutAndSafe="true"
69
+ insideSafe="true" />
70
+ </Constraints>
71
+ <Layout>
72
+ <zIndex>1</zIndex>
73
+ </Layout>
74
+ </Image>
75
+ </Items>
76
+ </Template>
77
+