{"id":31647,"date":"2021-02-12T20:45:38","date_gmt":"2021-02-13T01:45:38","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=31647"},"modified":"2021-02-12T20:46:51","modified_gmt":"2021-02-13T01:46:51","slug":"bad-applescript-fake-rss-real-newsletter","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/02\/12\/bad-applescript-fake-rss-real-newsletter\/","title":{"rendered":"Bad AppleScript: Fake RSS, Real Newsletter"},"content":{"rendered":"<p><a href=\"https:\/\/sixcolors.com\/post\/2021\/02\/bad-applescript-fake-rss-real-newsletter\/\">Jason Snell<\/a> (<a href=\"https:\/\/twitter.com\/jsnell\/status\/1356771661710729216\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/sixcolors.com\/post\/2021\/02\/bad-applescript-fake-rss-real-newsletter\/\"><p>Here was my bad idea: Just because MailChimp&rsquo;s RSS system didn&rsquo;t work the way I wanted it to didn&rsquo;t mean I couldn&rsquo;t <em>make<\/em> it work the way I wanted it to. I could set MailChimp to automatically mail out an email on Friday evenings to all Six Colors subscribers, based on an RSS feed.<\/p>\n<p>And then I could write a script that would generate an RSS feed with a single entry, containing exactly the newsletter I wanted to send.<\/p>\n<p>[&#8230;]<\/p>\n<p>Though there are some ways to parse RSS feed using the System Events app&rsquo;s built-in XML parsing, it&rsquo;s unreliable. Instead, I turned to the JSON format, which is much easier to work with, thanks to Mousedown Software&rsquo;s excellent app <a href=\"https:\/\/www.mousedown.net\/software\/JSONHelper.html\">JSON Helper<\/a>, which converts JSON feeds into AppleScript objects.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Jason Snell (tweet): Here was my bad idea: Just because MailChimp&rsquo;s RSS system didn&rsquo;t work the way I wanted it to didn&rsquo;t mean I couldn&rsquo;t make it work the way I wanted it to. I could set MailChimp to automatically mail out an email on Friday evenings to all Six Colors subscribers, based on an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-02-13T01:45:41Z","apple_news_api_id":"91a31c2b-f002-41d0-bf7c-e51024537f92","apple_news_api_modified_at":"2021-02-13T01:46:55Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AkaMcK_ACQdC_fOUQJFN_kg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[159,507,30,1891,1600,1172,71,52,740],"class_list":["post-31647","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-applescript","tag-json","tag-mac","tag-macos-11-0","tag-mailchimp","tag-mailing-lists","tag-programming","tag-rss","tag-wordpress"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=31647"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31647\/revisions"}],"predecessor-version":[{"id":31648,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31647\/revisions\/31648"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=31647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=31647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=31647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}