Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.16 KB | None | 0 0
  1. PRICE_TYPE_CODE = (
  2. ('01', '01 - RRP excluding tax'),
  3. ('02', '02 - RRP including tax'),
  4. ('03', '03 - Fixed retail price excluding tax'),
  5. ('04', '04 - Fixed retail price including tax'),
  6. ('05', '05 - Supplier net price excluding tax'),
  7. ('06', '06 - Supplier net price excluding tax: rental goods'),
  8. ('07', '07 - Supplier net price including tax'),
  9. ('08', '08 - Supplier alternative net price excluding tax'),
  10. ('09', '09 - Supplier alternative net price including tax'),
  11. ('11', '11 - Special sale RRP excluding tax'),
  12. ('12', '12 - Special sale RRP including tax'),
  13. ('13', '13 - Special sale fixed retail price excluding tax'),
  14. ('14', '14 - Special sale fixed retail price including tax'),
  15. ('15', '15 - Supplier net price for special sale excluding tax'),
  16. ('17', '17 - Supplier net price for special sale including tax'),
  17. ('21', '21 - Pre-publication RRP excluding tax'),
  18. ('22', '22 - Pre-publication RRP including tax'),
  19. ('23', '23 - Pre-publication fixed retail price excluding tax'),
  20. ('24', '24 - Pre-publication fixed retail price including tax'),
  21. ('25', '25 - Supplier prepublication net price excluding tax'),
  22. ('27', '27 - Supplier prepublication net price including tax'),
  23. ('31', '31 - Freight-pass-through RRP excluding tax'),
  24. ('32', '32 - Freight-pass-through billing price excluding tax'),
  25. ('41', '41 - Publishers agency retail price excluding tax'),
  26. ('42', '42 - Publishers agency retail price including tax'),
  27. )
  28.  
  29. # LIST 33 Other text type code
  30. OTHER_TEXT_TYPE_CODE = (
  31. ('01', 'Main description'),
  32. ('02', 'Short description/annotation'),
  33. ('03', 'Long description'),
  34. ('04', 'Table of contents'),
  35. ('05', 'Review quote, restricted length'),
  36. ('06', 'Quote from review of previous edition'),
  37. ('07', 'Review text'),
  38. ('08', 'Review quote'),
  39. ('09', 'Promotional headline'),
  40. ('10', 'Previous review quote'),
  41. ('11', 'Author comments'),
  42. ('12', 'Description for reader'),
  43. ('13', 'Biographical note'),
  44. ('14', 'Description for Reading Group Guide'),
  45. ('15', 'Discussion question for Reading Group Guide'),
  46. ('16', 'Competing titles'),
  47. ('17', 'Flap copy'),
  48. ('18', 'Back cover copy'),
  49. ('19', 'Feature'),
  50. ('20', 'New feature'),
  51. ('21', 'Publishers Notice'),
  52. ('22', 'Index'),
  53. ('23', 'Excerpt from book'),
  54. ('24', 'First chapter'),
  55. ('25', 'Description for sales people'),
  56. ('26', 'Description for press or other media'),
  57. ('27', 'Description for subsidiary rights department'),
  58. ('28', 'Description for teachers/educators'),
  59. ('30', 'Unpublished endorsement'),
  60. ('31', 'Description for bookstore'),
  61. ('32', 'Description for library'),
  62. ('33', 'Introduction or preface'),
  63. ('34', 'Full text'),
  64. ('35', 'Promotional text'),
  65. ('40', 'Author interview / QandA'),
  66. ('41', 'Reading Group Guide'),
  67. ('42', 'Commentary / discussion'),
  68. ('43', 'Short description for series or set'),
  69. ('44', 'Long description for series or set'),
  70. ('45', 'Contributor event schedule'),
  71. ('46', 'License'),
  72. ('47', 'Open access statement'),
  73. ('98', 'Master brand name'),
  74. ('99', 'Country of final manufacture'),
  75. )
  76.  
  77. # LIST 46 Sales rights type code
  78. SALES_RIGHTS_TYPE_CODE = (
  79. ('00', 'Sales rights unknown'),
  80. ('01', 'For sale with exclusive rights in the specified countries or territories'),
  81. ('02', 'For sale with non-exclusive rights in the specified countries or territories'),
  82. ('03', 'Not for sale in the specified countries or territories (reason unspecified)'),
  83. ('04', 'Not for sale in the specified countries (but publisher holds exclusive rights in those countries or territories)'),
  84. ('05', 'Not for sale in the specified countries (publisher holds non-exclusive rights in those countries or territories)'),
  85. ('06', 'Not for sale in the specified countries (because publisher does not hold rights in those countries or territories)'),
  86. ('07', 'For sale with exclusive rights in the specified countries or territories (sales restriction applies)'),
  87. ('08', 'For sale with non-exclusive rights in the specified countries or territories (sales restriction applies)'),
  88. )
  89.  
  90. # LIST 54 availability status codes
  91. AVAILABILITY_CODE = (
  92. ('AB', 'Cancelled'),
  93. ('AD', 'Available direct from publisher only'),
  94. ('CS', 'Availability uncertain'),
  95. ('EX', 'No longer stocked by us'),
  96. ('IP', 'Available'),
  97. ('MD', 'Manufactured on demand'),
  98. ('NP', 'Not yet published'),
  99. ('NY', 'Newly catalogued, not yet in stock'),
  100. ('OF', 'Other format available'),
  101. ('OI', 'Out of stock indefinitely'),
  102. ('OP', 'Out of print'),
  103. ('OR', 'Replaced by new edition'),
  104. ('PP', 'Publication postponed indefinitely'),
  105. ('RF', 'Refer to another supplier'),
  106. ('RM', 'Remaindered'),
  107. ('RP', 'Reprinting'),
  108. ('RU', 'Reprinting, undated'),
  109. ('TO', 'Special order'),
  110. ('TP', 'Temporarily out of stock because publisher cannot supply'),
  111. ('TU', 'Temporarily unavailable'),
  112. ('UR', 'Unavailable, awaiting reissue'),
  113. ('WR', 'Will be remaindered as of (date)'),
  114. ('WS', 'Withdrawn from sale'),
  115. )
  116.  
  117. # LIST 59 price type qualifier
  118. PRICE_QUALIFIER_CODE = (
  119. ('00', 'Unqualified Price'),
  120. ('01', 'Member/subscriber price'),
  121. ('02', 'Export price'),
  122. ('03', 'Reduced price applicable when the item is purchased as part of a set'),
  123. ('04', 'Voucher price'),
  124. ('05', 'Consumer price'),
  125. ('06', 'Corporate price'),
  126. ('07', 'Reservation order price'),
  127. ('08', 'Promotional offer price'),
  128. ('09', 'Linked price'),
  129. )
  130.  
  131. # LIST 65 product availability
  132. PRODUCT_AVAILABILITY_CODE = (
  133. ('01', 'Cancelled'),
  134. ('10', 'Not yet available'),
  135. ('11', 'Awaiting stock'),
  136. ('12', 'Not yet available, will be POD'),
  137. ('20', 'Available'),
  138. ('21', 'In stock'),
  139. ('22', 'To order'),
  140. ('23', 'POD'),
  141. ('30', 'Temporarily unavailable'),
  142. ('31', 'Out of stock'),
  143. ('32', 'Reprinting'),
  144. ('33', 'Awaiting reissue'),
  145. ('34', 'Temporarily withdrawn from sale'),
  146. ('40', 'Not available (reason unspecified)'),
  147. ('41', 'Not available, replaced by new product'),
  148. ('42', 'Not available, other format available'),
  149. ('43', 'No longer supplied by us'),
  150. ('44', 'Apply direct'),
  151. ('45', 'Not sold separately'),
  152. ('46', 'Withdrawn from sale'),
  153. ('47', 'Remaindered'),
  154. ('48', 'Not available, replaced by POD'),
  155. ('49', 'Recalled'),
  156. ('50', 'Not sold as set'),
  157. ('51', 'Not available, publisher indicates OP'),
  158. ('52', 'Not available, publisher no longer sells product in this market'),
  159. ('97', 'No recent update received'),
  160. ('98', 'No longer receiving updates'),
  161. ('99', 'Contact supplier'),
  162. )
  163.  
  164. # LIST 71 sales restriction type code
  165. SALES_RESTRICTION_TYPE_CODE = (
  166. ('00', 'Unspecified'),
  167. ('01', 'Retailer exclusive / own brand'),
  168. ('02', 'Office supplies edition'),
  169. ('03', 'Internal publisher use only'),
  170. ('04', 'Retailer exclusive'),
  171. ('05', 'Retailer own brand'),
  172. ('06', 'Library edition'),
  173. ('07', 'Schools only edition'),
  174. ('08', 'Indiziert'),
  175. ('09', 'Not for sale to libraries'),
  176. ('10', 'News outlet edition'),
  177. ('11', 'Retailer exception'),
  178. )
  179.  
  180. # LIST 102 sales outlet identifier type
  181. SALES_OUTLET_ID_TYPE = (
  182. ('01', 'Proprietary'),
  183. ('02', 'BIC sales outlet ID'),
  184. ('03', 'ONIX sales outlet ID'),
  185. )
  186.  
  187. # LIST 139 ONIX sales outlets
  188. ONIX_SALES_OUTLET_ID = (
  189. ("ACM", "A C Moore"),
  190. ("AAP", "AandP"),
  191. ("ALB", "Albertson's"),
  192. ("AMZ", "Amazon"),
  193. ("ANR", "Angus and Robertson"),
  194. ("ANB", "Anobii"),
  195. ("APC", "Apple"),
  196. ("ASD", "Asda"),
  197. ("AUD", "Audible"),
  198. ("BDL", "B Dalton"),
  199. ("BNO", "Barnes and Noble"),
  200. ("BBB", "Bed Bath and Beyond"),
  201. ("BST", "Best Buy"),
  202. ("BIL", "Bilbary"),
  203. ("BJW", "BJ's Wholesale Club"),
  204. ("BLK", "Blackwell's"),
  205. ("BCA", "Book Club Associates"),
  206. ("BSH", "Bookish"),
  207. ("BKP", "Bookpeople"),
  208. ("BKM", "Books-A-Million"),
  209. ("BRD", "Borders"),
  210. ("BRB", "Borders/Books Etc"),
  211. ("BRT", "British Bookshops"),
  212. ("CDL", "Casa del Libro"),
  213. ("CHD", "Christianbook.com"),
  214. ("COP", "Copia"),
  215. ("CST", "Costco"),
  216. ("CRB", "Crate and Barrel"),
  217. ("CVS", "CVS Drug Stores"),
  218. ("CYB", "Cyberlibris"),
  219. ("DSG", "Dick's Sporting Goods"),
  220. ("DIL", "Dilicom"),
  221. ("DYM", "Dymocks"),
  222. ("ELC", "Early Learning Centre"),
  223. ("ESN", "Eason"),
  224. ("EBC", "Ebooks Corp"),
  225. ("ECH", "eChristian"),
  226. ("ECI", "El Corte Ingles"),
  227. ("ELE", "Electre"),
  228. ("ELB", "Elib.se"),
  229. ("EMP", "Empik"),
  230. ("ENH", "English Heritage"),
  231. ("FDB", "FeedBooks"),
  232. ("FNC", "Fnac"),
  233. ("FRY", "Fry's Electronics"),
  234. ("GMS", "Gamestop"),
  235. ("GOO", "Google Books"),
  236. ("GOS", "Blinkbo"),
  237. ("HST", "Hastings Entertainment"),
  238. ("HMV", "HMV"),
  239. ("HMD", "Home Depot"),
  240. ("IMM", "Immateriel.fr"),
  241. ("IND", "Indigo-Chapters"),
  242. ("IZN", "Izneo"),
  243. ("JSM", "John Smith and Son"),
  244. ("KMT", "K-Mart"),
  245. ("KNB", "KNFB/Blio"),
  246. ("KNO", "Kno Inc"),
  247. ("KBO", "Kobo"),
  248. ("KOO", "Koorong"),
  249. ("KRG", "Kroger"),
  250. ("LWE", "Lowe's"),
  251. ("MKS", "Marks and Spencer"),
  252. ("MAT", "Matras"),
  253. ("MMS", "Media Markt/Satur"),
  254. ("MCR", "Microcenter"),
  255. ("MRR", "Morrisons"),
  256. ("MTC", "Mothercare"),
  257. ("MYB", "MyBoox"),
  258. ("NTR", "National Trust"),
  259. ("NUM", "Numilog"),
  260. ("OFD", "Office Depot"),
  261. ("OFM", "Office Max"),
  262. ("OLF", "OLF"),
  263. ("PST", "Past Times"),
  264. ("PTS", "Pet Smart"),
  265. ("PTC", "Petco"),
  266. ("PLY", "Play.com"),
  267. ("PTB", "Pottery Barn"),
  268. ("RED", "RedShelf"),
  269. ("RDB", "Readbooks"),
  270. ("RCL", "ReadCloud"),
  271. ("RST", "Restoration Hardware"),
  272. ("RET", "Rethink"),
  273. ("RTZ", "Ritz Camera"),
  274. ("SFW", "Safeway"),
  275. ("SNS", "Sainsbury's"),
  276. ("SLF", "Selfridges"),
  277. ("SKB", "Skoobe"),
  278. ("SMW", "SmashWords"),
  279. ("SNY", "Sony"),
  280. ("STP", "Staples"),
  281. ("TEA", "The Ebook Alternative"),
  282. ("TRG", "Target"),
  283. ("TES", "Tesco"),
  284. ("TSR", "Toys 'R' Us"),
  285. ("TSO", "TSO (The Stationery Office)"),
  286. ("TXR", "Txtr"),
  287. ("VRG", "Virgin Megastores"),
  288. ("WHS", "W H Smith"),
  289. ("WTR", "Waitrose"),
  290. ("WLM", "Wal-Mart"),
  291. ("WST", "Waterstone's"),
  292. ("WHT", "Whitcoul's"),
  293. ("WLS", "Williams Sonoma"),
  294. ("WLW", "Woolworths"),
  295. ("ZVV", "Zavv"),
  296. ("ZZZ", "Other"),
  297. )
  298.  
  299.  
  300. class ONIXCodes(object):
  301.  
  302. def get_notification_type(self, code):
  303. codes = {
  304. '01': 'Early Notification',
  305. '02': 'Advance Notification',
  306. '03': 'Confirmed on Publication',
  307. '04': 'Update',
  308. '05': 'Delete',
  309. '08': 'Notice of sale',
  310. '09': 'Notice of acquisition',
  311. '12': 'Update (Supply only)',
  312. '13': 'Update (MarketRep only)',
  313. '14': 'Update (Supply and MarketRep)'
  314. }
  315.  
  316. return codes.get(code)
  317.  
  318. def get_product_id_type(self, code):
  319. codes = {
  320. '01': 'Proprietary',
  321. '02': 'ISBN-10',
  322. '03': 'GTIN-13',
  323. '04': 'UPC',
  324. '05': 'ISMN-10',
  325. '06': 'DOI',
  326. '13': 'LCCN',
  327. '14': 'GTIN-14',
  328. '15': 'ISBN-13',
  329. '17': 'Legal Deposit Number',
  330. '22': 'URN',
  331. '23': 'OCLC number',
  332. '24': 'Co-publisher ISBN-13',
  333. '25': 'ISMN-13',
  334. '26': 'ISBN-A'
  335. }
  336.  
  337. return codes.get(code)
  338.  
  339. def get_title_type(self, code):
  340. codes = {
  341. '01': 'Distinctive Title',
  342. '02': 'ISSN',
  343. '03': 'Title in original language',
  344. '04': 'Title acronym',
  345. '05': 'Abbrreviated title',
  346. '06': 'Title in other language',
  347. '07': 'Thematic title of journal issue',
  348. '08': 'Former title',
  349. '10': 'Distributers Title',
  350. '11': 'Alternative title on cover',
  351. '12': 'Alternative title on back',
  352. '13': 'Expanded title'
  353. }
  354.  
  355. return codes.get(code)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement