{"id":1782,"date":"2014-09-05T20:50:00","date_gmt":"2014-09-05T23:50:00","guid":{"rendered":"http:\/\/blog.generaleccentric.net\/?p=1782"},"modified":"2014-09-05T20:51:17","modified_gmt":"2014-09-05T23:51:17","slug":"razer-another-headline-cutup-program","status":"publish","type":"post","link":"https:\/\/blog.generaleccentric.net\/?p=1782","title":{"rendered":"RAzer: Another headline cutup program"},"content":{"rendered":"<figure id=\"attachment_1778\" aria-describedby=\"caption-attachment-1778\" style=\"width: 690px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1778\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2014\/08\/Screen-Shot-2014-08-30-at-11.01.23.png\" alt=\"RAzer results\" width=\"690\" height=\"453\" srcset=\"https:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2014\/08\/Screen-Shot-2014-08-30-at-11.01.23.png 690w, https:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2014\/08\/Screen-Shot-2014-08-30-at-11.01.23-300x196.png 300w, https:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2014\/08\/Screen-Shot-2014-08-30-at-11.01.23-624x409.png 624w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><figcaption id=\"caption-attachment-1778\" class=\"wp-caption-text\">Results using join word \u2018in\u2019 from headlines on Aug. 30, 2014<\/figcaption><\/figure>\n<p><a href=\"http:\/\/ahclem.is-leet.com\/razercgi.html\">RAzer<\/a> is\u00a0an\u00a0extra\u00a0Python gadget behind the rear end\u00a0of Media Circus.<\/p>\n<p>The source text for Media Circus are \u2018cutups\u2019 of headlines, retrieved from RSS feeds of news agencies. Up until this month, I have been using an online php program called \u001b\u201d<a href=\"http:\/\/www.nscadesign.ca\/cutup\/cutup.php\">cutup<\/a>\u201c that\u00a0accesses feeds from the Toronto Globe and Mail and the CBC, cuts them up and re-presents them on a web page. The strategy for this program is simple: count the words in headline 1 and split it through the middle, do the same with headline 2, then combine the front of headline 1 with the back of headline 2, and <em>vice versa<\/em>.<\/p>\n<p><a href=\"http:\/\/ahclem.is-leet.com\/razercgi.html\">RAzer<\/a> retrieves headlines from 12 world sources and re-combines them\u00a0by identifying\u00a0common \u201cjoin words\u201d, such as \u2019in\u2018, \u2018on\u2019, \u2018of\u2019, \u2018the\u2019, \u2018at\u2019, \u2018to\u2019, \u2018into\u2019, \u2018as\u2019, \u2018from\u2019 and \u2018over\u2019. Like cutup, the interface is through the web, but in this case the user has a choice of join word, the number of headlines to generate, and whether or not to retrieve a fresh set of headlines. The form data is sent through a post action to a Python script on my little RaspberryPi.<\/p>\n<p>I like number 8: <em>EGYPTIAN COURT SENTENCES BROTHERHOOD LEADER TO LIFE IN DIGITAL CURRENCY<\/em>.<\/p>\n<p>And by the way, here&#8217;s another reason to own an RPi: although I&#8217;m very happy with my web hosting\u00a0provider <a href=\"http:\/\/hostgator.com\">Hostgator<\/a>, shared hosting accounts have a defined set of Python libraries that are installed, and you can&#8217;t add new ones. In the case of RAzer, I needed the <a href=\"https:\/\/code.google.com\/p\/feedparser\/\">feedparser<\/a> library, which was not included, so I had to use my little guy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RAzer is\u00a0an\u00a0extra\u00a0Python gadget behind the rear end\u00a0of Media Circus. The source text for Media Circus are \u2018cutups\u2019 of headlines, retrieved from RSS feeds of news agencies. Up until this month, I have been using an online php program called \u001b\u201dcutup\u201c that\u00a0accesses feeds from the Toronto Globe and Mail and the CBC, cuts them up and &hellip; <a href=\"https:\/\/blog.generaleccentric.net\/?p=1782\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">RAzer: Another headline cutup program<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_links_to":"","_links_to_target":"","footnotes":""},"categories":[102,55,44],"tags":[95,94,91],"class_list":["post-1782","post","type-post","status-publish","format-standard","hentry","category-design","category-the-technology-of-good-intentions","category-world-wide-web","tag-cutup","tag-media-circus","tag-python"],"_links":{"self":[{"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1782"}],"version-history":[{"count":2,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1782\/revisions"}],"predecessor-version":[{"id":1795,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1782\/revisions\/1795"}],"wp:attachment":[{"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}