{"id":560,"date":"2014-09-04T01:59:39","date_gmt":"2014-09-04T07:59:39","guid":{"rendered":"http:\/\/rrbits.com\/epb\/?p=560"},"modified":"2014-09-04T02:02:09","modified_gmt":"2014-09-04T08:02:09","slug":"script-a-day-day3-whatis","status":"publish","type":"post","link":"https:\/\/rrbits.com\/epb\/2014\/09\/04\/script-a-day-day3-whatis\/","title":{"rendered":"A Script A Day &#8211; WhatIs &#8211; Day 03\/05"},"content":{"rendered":"<p>Day 3&#8217;s script: `whatis`: A wikipedia summary lookup.\u00a0 It&#8217;s operation is pretty straightforward, you give it a search to do and it&#8217;ll perform the lookup for you.\u00a0 If you hit a redirect it should follow it, at least as of time of writing this. (Edit whatis_extract.xsl in the resources directory if it breaks.)<!--more-->Output isn&#8217;t word-wrapped, though I may fix that later.<\/p>\n<p>For example:<\/p>\n<pre>.\/sd1.sh whatis Touhou<\/pre>\n<p>At time of writing, the above command follows a redirect to Touhou Project and then displays the first section containing the overall description of the Touhou Project series. Often tables are included in the first section that end up looking kind of ugly, but I&#8217;ve not decided on whether or not I want to remove them.<\/p>\n<p>If there&#8217;s no exact title match, the script will instead perform a search and try to list some potential alternative searches. An example of this can be seen in the screenshot attached to this post. To check out the code, as with the other script-a-day projects, check out the <a href=\"https:\/\/bitbucket.org\/epb9000\/script-a-day\/\">repo<\/a>.<\/p>\n<a href=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-563\" src=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis.png\" alt=\"WhatIs\" width=\"842\" height=\"595\" srcset=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis.png 842w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis-300x211.png 300w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis-200x141.png 200w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/whatis-800x565.png 800w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/a>\n","protected":false},"excerpt":{"rendered":"<p>Day 3&#8217;s script: `whatis`: A wikipedia summary lookup.\u00a0 It&#8217;s operation is pretty straightforward, you give it a search to do and it&#8217;ll perform the lookup for you.\u00a0 If you hit a redirect it should follow it, at least as of time of writing this. (Edit whatis_extract.xsl in the resources directory if it breaks.)<\/p>\n","protected":false},"author":1,"featured_media":563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,3999],"tags":[4256,4257,4258,4259],"class_list":["post-560","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-programming","tag-bash","tag-script-a-day","tag-wikipedia","tag-xslt"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/560","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=560"}],"version-history":[{"count":4,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":565,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/560\/revisions\/565"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media\/563"}],"wp:attachment":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}