fields.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. const fields = module.exports = {};
  2. fields.feed = [
  3. ['author', 'creator'],
  4. ['dc:publisher', 'publisher'],
  5. ['dc:creator', 'creator'],
  6. ['dc:source', 'source'],
  7. ['dc:title', 'title'],
  8. ['dc:type', 'type'],
  9. 'title',
  10. 'description',
  11. 'author',
  12. 'pubDate',
  13. 'webMaster',
  14. 'managingEditor',
  15. 'generator',
  16. 'link',
  17. 'language',
  18. 'copyright',
  19. 'lastBuildDate',
  20. 'docs',
  21. 'generator',
  22. 'ttl',
  23. 'rating',
  24. 'skipHours',
  25. 'skipDays',
  26. ];
  27. fields.item = [
  28. ['author', 'creator'],
  29. ['dc:creator', 'creator'],
  30. ['dc:date', 'date'],
  31. ['dc:language', 'language'],
  32. ['dc:rights', 'rights'],
  33. ['dc:source', 'source'],
  34. ['dc:title', 'title'],
  35. 'title',
  36. 'link',
  37. 'pubDate',
  38. 'author',
  39. 'summary',
  40. ['content:encoded', 'content:encoded', {includeSnippet: true}],
  41. 'enclosure',
  42. 'dc:creator',
  43. 'dc:date',
  44. 'comments',
  45. ];
  46. var mapItunesField = function(f) {
  47. return ['itunes:' + f, f];
  48. }
  49. fields.podcastFeed = ([
  50. 'author',
  51. 'subtitle',
  52. 'summary',
  53. 'explicit'
  54. ]).map(mapItunesField);
  55. fields.podcastItem = ([
  56. 'author',
  57. 'subtitle',
  58. 'summary',
  59. 'explicit',
  60. 'duration',
  61. 'image',
  62. 'episode',
  63. 'image',
  64. 'season',
  65. 'keywords',
  66. 'episodeType'
  67. ]).map(mapItunesField);