{"id":26325,"date":"2019-08-19T15:25:41","date_gmt":"2019-08-19T19:25:41","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=26325"},"modified":"2019-08-20T16:35:22","modified_gmt":"2019-08-20T20:35:22","slug":"code-generation-via-curl-libcurl","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/08\/19\/code-generation-via-curl-libcurl\/","title":{"rendered":"Code Generation via &ldquo;curl --libcurl&rdquo;"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/guedou\/status\/1161637864737857538\">Guillaume Valadon<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/guedou\/status\/1161637864737857538\">\n<p>The <code>curl --libcurl<\/code> option generates a C file that mimics the used command line! #awesome<\/p>\n<\/blockquote>\n<p>I&rsquo;m a fan of this pattern. Some other examples:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2012\/03\/15\/paintcode-1-0\/\">PaintCode<\/a> lets you make a drawing and export it as Quartz code.<\/li>\n<li><a href=\"https:\/\/pfiddlesoft.com\/uibrowser\/\">UI Browser<\/a> lets you explore an app&rsquo;s accessibility features and generate code to reference them.<\/li>\n<li>This <a href=\"https:\/\/c-command.com\/scripts\/spamsieve\/import-export-rules\">SpamSieve script<\/a> lets you select some blocklist or whitelist rules and generate an AppleScript that creates them.<\/li>\n<\/ul>\n<p id=\"code-generation-via-curl-libcurl-update-2019-08-20\">Update (2019-08-20): <a href=\"https:\/\/twitter.com\/tofias\/status\/1163823075022032896\">Michael Tofias<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/tofias\/status\/1163823075022032896\">\n<p>I don&rsquo;t use it often these days, but one of things that made me fall in love with Stata was being able to copy the code generated by using the GUI. Super helpful when building graphs and such with non-intuitive APIs.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Guillaume Valadon: The curl --libcurl option generates a C file that mimics the used command line! #awesome I&rsquo;m a fan of this pattern. Some other examples: PaintCode lets you make a drawing and export it as Quartz code. UI Browser lets you explore an app&rsquo;s accessibility features and generate code to reference them. This SpamSieve [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-08-19T19:25:43Z","apple_news_api_id":"b2e76da1-724f-4b6b-9273-fc5790d0a77e","apple_news_api_modified_at":"2019-08-20T20:35:27Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AsudtoXJPS2uSc_xXkNCnfg","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,45,888,1506,562,476,526,656,887,71,372,1747],"class_list":["post-26325","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-applescript","tag-c","tag-code-generation","tag-curl","tag-keyboardmaestro","tag-networking","tag-omnifocus","tag-omnigraffle","tag-paintcode","tag-programming","tag-spamsieve","tag-ui-browser"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26325","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=26325"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26325\/revisions"}],"predecessor-version":[{"id":26336,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26325\/revisions\/26336"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=26325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=26325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=26325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}