{"id":236,"date":"2012-08-04T17:40:08","date_gmt":"2012-08-04T17:40:08","guid":{"rendered":"http:\/\/www.jontrinder.com\/blog\/?p=236"},"modified":"2012-08-04T17:40:08","modified_gmt":"2012-08-04T17:40:08","slug":"ph_lyrics-update-mechanism","status":"publish","type":"post","link":"https:\/\/www.jontrinder.com\/blog\/?p=236","title":{"rendered":"ph_lyrics update mechanism"},"content":{"rendered":"<p>A few weeks ago I wrote an application than randomly tweets lyrics by <a href=\"http:\/\/www.sofasound.com\">Peter Hammill<\/a> the twitter account is <a href=\"http:\/\/www.twitter.com\/ph_lyrics\">@ph_lyrics<\/a> and there is a website at <a href=\"http:\/\/www.ninelocks.com\/ph_lyrics\">www.ninelocks.com\/ph_lyrics<\/a><\/p>\n<p>During the testing phase the application sent a random songline every 3 hours which was too often and too regular, so the mechanism has been changed.<\/p>\n<p>This is currently undergoing some testing and should go live in the next few days. With the new version there should now be no more than 1 tweet per day and that will occur at a random time throughout the day.<\/p>\n<p>For those interested in the logic&#8230;.<\/p>\n<p>The main script is called by a cron job every 10 minutes.<\/p>\n<p>If it has been &gt; 24 hours since the last tweet there is a 1 in 10 chance a tweet will be sent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago I wrote an application than randomly tweets lyrics by Peter Hammill the twitter account is @ph_lyrics and there is a website at www.ninelocks.com\/ph_lyrics During the testing phase the application sent a random songline every 3 hours &hellip; <a href=\"https:\/\/www.jontrinder.com\/blog\/?p=236\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,79,26],"tags":[29,3,28,27],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-computing","category-linux","category-music","tag-coding","tag-computing","tag-ph_lyrics","tag-tweet"],"_links":{"self":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":6,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":242,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions\/242"}],"wp:attachment":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}