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