{"id":556,"date":"2014-09-03T03:02:42","date_gmt":"2014-09-03T09:02:42","guid":{"rendered":"http:\/\/rrbits.com\/epb\/?p=556"},"modified":"2014-09-03T03:02:42","modified_gmt":"2014-09-03T09:02:42","slug":"a-script-a-day-0205","status":"publish","type":"post","link":"https:\/\/rrbits.com\/epb\/2014\/09\/03\/a-script-a-day-0205\/","title":{"rendered":"A Script A Day &#8211; Day 02\/05"},"content":{"rendered":"<p>Continuing along, day 2&#8217;s task was to get stock quotes.\u00a0 Usually a pretty simple task once you find a data source to use.\u00a0 I settled on using YQL to query Yahoo Finance.\u00a0 This one has a few requirements (wget, hexdump, xsltproc) as bash is a bit limited.<\/p>\n<p><!--more--><\/p>\n<p>Finishing up day 2&#8217;s script late just like day 1&#8217;s. I started this one pretty late, between perusing StackOverflow for code snippets (for things like URL escaping in bash) and actually setting up the final display was about 2 hours.\u00a0 The output is formatted with a pretty basic XSLT stylesheet.\u00a0 My XSLT is clearly rusty. As such, handling error messages could have been a little more elegant, but I also kinda want to sleep.\u00a0 As with the rest of the project, this has been added to the <a href=\"https:\/\/bitbucket.org\/epb9000\/script-a-day\">script-a-day repo<\/a>.<\/p>\n<a href=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/stockquote.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-558 size-full\" src=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/stockquote.png\" alt=\"Stock-Quote\" width=\"562\" height=\"514\" srcset=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/stockquote.png 562w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/stockquote-300x274.png 300w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/stockquote-200x182.png 200w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a>\n","protected":false},"excerpt":{"rendered":"<p>Continuing along, day 2&#8217;s task was to get stock quotes.\u00a0 Usually a pretty simple task once you find a data source to use.\u00a0 I settled on using YQL to query Yahoo Finance.\u00a0 This one has a few requirements (wget, hexdump, xsltproc) as bash is a bit limited.<\/p>\n","protected":false},"author":1,"featured_media":558,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,3999],"tags":[4256,4257],"class_list":["post-556","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-programming","tag-bash","tag-script-a-day"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/comments?post=556"}],"version-history":[{"count":1,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/556\/revisions"}],"predecessor-version":[{"id":559,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/556\/revisions\/559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media\/558"}],"wp:attachment":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media?parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/categories?post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/tags?post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}