| Line 192... |
Line 192... |
| 192 |
workbook = xlrd.open_workbook(filename)
|
192 |
workbook = xlrd.open_workbook(filename)
|
| 193 |
sheet = workbook.sheet_by_index(0)
|
193 |
sheet = workbook.sheet_by_index(0)
|
| 194 |
num_rows = sheet.nrows
|
194 |
num_rows = sheet.nrows
|
| 195 |
|
195 |
|
| 196 |
writer = csv.writer(open("junglee.csv", "wb"), delimiter='\t', quoting=csv.QUOTE_MINIMAL)
|
196 |
writer = csv.writer(open("junglee.csv", "wb"), delimiter='\t', quoting=csv.QUOTE_MINIMAL)
|
| 197 |
writer.writerow("Amazon.com Product Ads Header","Purge-Replace=false","","","","","",\
|
197 |
writer.writerow(["Amazon.com Product Ads Header","Purge-Replace=false","","","","","",\
|
| 198 |
"","","","","","","",\
|
198 |
"","","","","","","",\
|
| 199 |
"","","","","","",\
|
199 |
"","","","","","",\
|
| 200 |
"","","","","","",\
|
200 |
"","","","","","",\
|
| 201 |
"","","","","","",\
|
201 |
"","","","","","",\
|
| 202 |
"","","","","","",\
|
202 |
"","","","","","",\
|
| 203 |
"","","","","","","",\
|
203 |
"","","","","","","",\
|
| 204 |
"","","","","",\
|
204 |
"","","","","",\
|
| 205 |
"","","","","","","", "","",\
|
205 |
"","","","","","","", "","",\
|
| 206 |
"","","","","","",\
|
206 |
"","","","","","",\
|
| 207 |
"","","","","",
|
207 |
"","","","","",\
|
| 208 |
"","","",""])
|
208 |
"","","",""])
|
| 209 |
writer.writerow(["SKU","Title","Link","Price","Delivery Time","Recommended Browse Node","Standard Product ID",\
|
209 |
writer.writerow(["SKU","Title","Link","Price","Delivery Time","Recommended Browse Node","Standard Product ID",\
|
| 210 |
"Product ID Type","Category","Description","Shipping Cost","Image","List Price","Availability",\
|
210 |
"Product ID Type","Category","Description","Shipping Cost","Image","List Price","Availability",\
|
| 211 |
"Brand","Manufacturer","Mfr part number","Model Number","Computer CPU speed","Hard disk size",\
|
211 |
"Brand","Manufacturer","Mfr part number","Model Number","Computer CPU speed","Hard disk size",\
|
| 212 |
"Included RAM size","Optical zoom","Digital zoom","Megapixels","Display size","Screen Resolution",\
|
212 |
"Included RAM size","Optical zoom","Digital zoom","Megapixels","Display size","Screen Resolution",\
|
| Line 219... |
Line 219... |
| 219 |
"Other image-url1","Other image-url2","Other image-url3","Other image-url4","Other image-url5",
|
219 |
"Other image-url1","Other image-url2","Other image-url3","Other image-url4","Other image-url5",
|
| 220 |
"Offer note","Is Gift Wrap Available","Registered Parameter","Update Delete"])
|
220 |
"Offer note","Is Gift Wrap Available","Registered Parameter","Update Delete"])
|
| 221 |
|
221 |
|
| 222 |
for rownum in range(2, num_rows): #2 is used as the starting index because first row is a test product with 12 years of warranty.
|
222 |
for rownum in range(2, num_rows): #2 is used as the starting index because first row is a test product with 12 years of warranty.
|
| 223 |
unused_categoryName, unused_entityName, entityID, image_url, unused_accessories, unused_softwareApplications, unused_pageTitle,\
|
223 |
unused_categoryName, unused_entityName, entityID, image_url, unused_accessories, unused_softwareApplications, unused_pageTitle,\
|
| 224 |
unused_metaDescription, metaKeywords, snippets, shortSnippet, tagline,\
|
224 |
unused_metaDescription, metaKeywords, unused_snippets, unused_shortSnippet, tagline,\
|
| 225 |
unused_skinSize, screenSize, unused_screenLeftUpperCornerDimension, unused_modelNameSynonyms, unused_modelNumberSynonyms,\
|
225 |
unused_skinSize, screenSize, unused_screenLeftUpperCornerDimension, unused_modelNameSynonyms, unused_modelNumberSynonyms,\
|
| 226 |
warranty, unused_warranty_type, unused_warranty_coverage, \
|
226 |
warranty, unused_warranty_type, unused_warranty_coverage, \
|
| 227 |
weight, size, formFactor, color, screenType, screenSize, screenResolution, numberOfColors, keyboardType,\
|
227 |
weight, size, formFactor, unused_color, screenType, screenSize, screenResolution, unused_numberOfColors, unused_keyboardType,\
|
| 228 |
navigation, touchscreenType, sideControls, multimediaKeys, multipleSIM, voip, network2G,\
|
228 |
unused_navigation, touchscreenType, unused_sideControls, unused_multimediaKeys, multipleSIM, unused_voip, unused_network2G,\
|
| 229 |
network3G, gprs, edge, g3, wifi, bluetooth, usb, musicFormats, earphone, speakerPhone,\
|
229 |
network3G, unused_gprs, unused_edge, unused_g3, unused_wifi, unused_bluetooth, unused_usb, unused_musicFormats, unused_earphone, unused_speakerPhone,\
|
| 230 |
fmRadio, internetRadio, ringtoneTypes, fileFormats, streaming, liveTV, hdVideoPlayback,\
|
230 |
unused_fmRadio, unused_internetRadio, unused_ringtoneTypes, unused_fileFormats, unused_streaming, unused_liveTV, unused_hdVideoPlayback,\
|
| 231 |
resolution, flash, imageFormats, numberOfCameras, secondaryCamera, additionalCameraFeatures,\
|
231 |
unused_resolution, unused_flash, unused_imageFormats, unused_numberOfCameras, unused_secondaryCamera, unused_additionalCameraFeatures,\
|
| 232 |
builtIn, ram, expansionType, expansionCapacity, batteryType, powerAdaptor, musicPlayback,\
|
232 |
builtIn, ram, unused_expansionType, unused_expansionCapacity, batteryType, unused_powerAdaptor, unused_musicPlayback,\
|
| 233 |
videoPlayback, tvPlayback, talktime2G, talktime3G, standy2G, standby3G, types, markupLanguages,\
|
233 |
unused_videoPlayback, unused_tvPlayback, talktime2G, unused_talktime3G, standy2G, unused_standby3G, unused_types, unused_markupLanguages,\
|
| 234 |
unused_http_protocols, unused_browser, unused_mail_protocols, opsys, unused_java, unused_flashPlayer, unused_drm, unused_securityFeatures, unused_gpsType, unused_mms, unused_sms, unused_ems,\
|
234 |
unused_http_protocols, unused_browser, unused_mail_protocols, opsys, unused_java, unused_flashPlayer, unused_drm, unused_securityFeatures, unused_gpsType, unused_mms, unused_sms, unused_ems,\
|
| 235 |
unused_instantMessaging, unused_email = sheet.row_values(rownum)[0:88]
|
235 |
unused_instantMessaging, unused_email = sheet.row_values(rownum)[0:88]
|
| 236 |
|
236 |
|
| 237 |
items = catalog_client.getItemsByCatalogId(entityID)
|
237 |
items = catalog_client.getItemsByCatalogId(entityID)
|
| 238 |
active_items = filter(is_active, items)
|
238 |
active_items = filter(is_active, items)
|