{"id":1445,"date":"2015-05-07T19:20:49","date_gmt":"2015-05-07T19:20:49","guid":{"rendered":"https:\/\/www.courses.tegabrain.com\/SS15\/?p=1445"},"modified":"2018-09-04T17:06:05","modified_gmt":"2018-09-04T17:06:05","slug":"processingref-update","status":"publish","type":"post","link":"https:\/\/www.courses.tegabrain.com\/SS15\/?p=1445","title":{"rendered":"processingReference update"},"content":{"rendered":"<p>So for my final project I decided to go along with my original idea to take the references from the processing.org page and to tweet them to my twitter account. The twitter bot works completely and i have fixed the text file with all the references and all of the urls associated with it. Every reference on that processing 2 page will eventually be tweeted to the twitter account. I chose to tweet Processing references due to the fact that Processing will always be my favorite language. Also i know when i was learning it that \u00a0the processing page was my homepage to all of my computers. So everything is working the way i want it to be working. I had a few problems figuring out how to implementing the url into my JavaScript i could of coded it in a few ways but the easiest way was to put all the references in a text file and have it randomly choose a word.\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1446\" src=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.13.36-PM.png\" alt=\"Screen Shot 2015-05-07 at 3.13.36 PM\" width=\"578\" height=\"250\" srcset=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.13.36-PM.png 578w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.13.36-PM-300x130.png 300w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.13.36-PM-535x231.png 535w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>the function Sentences(text){<\/p>\n<p>is where i concentrated the most on. The perfect way to tweet the post in the order i wanted first the word and then the url. below is a screen shot of order how it posts on twitter.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1447\" src=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.15.56-PM.png\" alt=\"Screen Shot 2015-05-07 at 3.15.56 PM\" width=\"861\" height=\"549\" srcset=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.15.56-PM.png 861w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.15.56-PM-300x191.png 300w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.15.56-PM-535x341.png 535w\" sizes=\"(max-width: 861px) 100vw, 861px\" \/><\/p>\n<p>to do this i have the text file with hundred and hundred of references. And to out put the correct form i wanted i split each string with -# at the end.<\/p>\n<p>So the program if you look above line 54 listSentences= text.split(&#8216;-#&#8221;); is the line that does all of this correctly.<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1448\" src=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.16.11-PM.png\" alt=\"Screen Shot 2015-05-07 at 3.16.11 PM\" width=\"560\" height=\"527\" srcset=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.16.11-PM.png 560w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.16.11-PM-300x282.png 300w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.16.11-PM-535x503.png 535w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>But i am experiencing problems putting it up on the server where it can run automatically and update on it own randomly every six to 12\u00a0hours as the code is implemented.\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"  wp-image-1452 aligncenter\" src=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.26.07-PM.png\" alt=\"Screen Shot 2015-05-07 at 3.26.07 PM\" width=\"625\" height=\"90\" srcset=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.26.07-PM.png 1061w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.26.07-PM-300x43.png 300w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.26.07-PM-1024x147.png 1024w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-07-at-3.26.07-PM-535x77.png 535w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>I downloaded all of the applications and most of the toolbelts github and heroku and when i went into the command line it didnt allow me to due to the fact that it wasnt able to install the certain toolbelt i needed<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1453\" src=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-03-at-1.37.09-PM.png\" alt=\"Screen Shot 2015-05-03 at 1.37.09 PM\" width=\"1440\" height=\"824\" srcset=\"https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-03-at-1.37.09-PM.png 1440w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-03-at-1.37.09-PM-300x172.png 300w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-03-at-1.37.09-PM-1024x586.png 1024w, https:\/\/www.courses.tegabrain.com\/SS15\/wp-content\/uploads\/2015\/05\/Screen-Shot-2015-05-03-at-1.37.09-PM-535x306.png 535w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/p>\n<p>this is what popped up when i did it \u00a0i this this a few times but i guess it was acting weird and just did not like me at that moment. I did it again a few days later and i got it to work !!!!!!!!! woohooo i got it up and running on the heroku Server.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So for my final project I decided to go along with my original idea to take the references from the processing.org page and to tweet them to my twitter account. The twitter bot works completely and i have fixed the text file with all the references and all of the urls associated with it. Every [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/posts\/1445"}],"collection":[{"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1445"}],"version-history":[{"count":4,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/posts\/1445\/revisions"}],"predecessor-version":[{"id":1454,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=\/wp\/v2\/posts\/1445\/revisions\/1454"}],"wp:attachment":[{"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/SS15\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}