{"id":354,"date":"2020-03-30T20:09:59","date_gmt":"2020-03-31T01:09:59","guid":{"rendered":"https:\/\/sundrysites.com\/?page_id=354"},"modified":"2020-03-30T20:09:59","modified_gmt":"2020-03-31T01:09:59","slug":"create-web-pages","status":"publish","type":"page","link":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/","title":{"rendered":"Create Web Pages"},"content":{"rendered":"\n<p>Just for fun I wrote a Perl program to generate some html code to do a simple display of a series of flags sent to it by HCA as parameters.&nbsp; This program creates a file that contains the web page to be displayed.&nbsp; NcFTP is then used to transmit the file to the web server.&nbsp; You can see the resulting page at <a href=\"http:\/\/sundrysites.com\/weather\/ysst.htm\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/sundrysites.com\/weather\/ysst.htm.<\/a><\/p>\n\n\n\n<p>use warnings;<br>use strict;<br># use Time::Piece;<\/p>\n\n\n\n<p># major definitions<br>my $outfile = &#8220;ysst.htm&#8221;;&nbsp; #<br>my $outln = &#8220;&#8221;;<br># my $date = Time::Piece-&gt;new-&gt;strftime(&#8216;%m\/%d\/%Y&#8217;);<br>my $datestring = localtime();<br>use Getopt::Long;&nbsp; #pick up parms<\/p>\n\n\n\n<p>my $ti = sprintf(&#8220;%.1f&#8221;,$ARGV[0]);&nbsp;&nbsp; &nbsp;#temp indoor<br>my $to = sprintf(&#8220;%.1f&#8221;,$ARGV[1]);&nbsp;&nbsp; &nbsp;#temp office<br>my $tg = sprintf(&#8220;%.1f&#8221;,$ARGV[2]);&nbsp;&nbsp; &nbsp;#temp garage<br>my $tb = sprintf(&#8220;%.1f&#8221;,$ARGV[3]);&nbsp;&nbsp; &nbsp;#temp basement<br>my $tn = sprintf(&#8220;%.1f&#8221;,$ARGV[4]);&nbsp;&nbsp; &nbsp;#temp noaa<br>my $rb = sprintf(&#8220;%.1f&#8221;,$ARGV[5]);&nbsp;&nbsp; &nbsp;#rel humid basemnt<br>my $rn = sprintf(&#8220;%.1f&#8221;,$ARGV[6]);&nbsp;&nbsp; &nbsp;#rel humid noaa<br>my $pr = sprintf(&#8220;%.0f&#8221;,$ARGV[7]);&nbsp;&nbsp; &nbsp;# sump pump run<\/p>\n\n\n\n<p># print $page, &#8220;\\n&#8221;;<\/p>\n\n\n\n<p>open OUTPUT, &#8220;&gt; $outfile&#8221; or die &#8220;Output file open error: $!&#8221;;<\/p>\n\n\n\n<p>$outln = &#8216;&lt;HTML&gt;&lt;HEAD&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;META HTTP-EQUIV=&#8221;Content-Type&#8221; CONTENT=&#8221;text\/html; charset=windows-1252&#8243;&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;LINK REL=STYLESHEET HREF=&#8221;ysst-ss.css&#8221; TYPE=&#8221;text\/css&#8221;&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;TITLE&gt;YELLOW SPRINGS STATUS&lt;\/TITLE&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;\/HEAD&gt;&lt;body style=&#8221;width:800px&#8221;&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8220;&lt;center&gt;YS Current Status as of: $datestring&lt;br \/&gt;&#8221;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;table BORDER CLASS=&#8221;boldtable&#8221;&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;tr&gt;&lt;td&gt;TInd&lt;\/td&gt;&lt;td&gt;TOff&lt;\/td&gt;&lt;td&gt;TGar&lt;\/td&gt;&lt;td&gt;TBas&lt;\/td&gt;&lt;td&gt;TNoaa&lt;\/td&gt;&lt;td&gt;HBas&lt;\/td&gt;&lt;td&gt;HNoaa&lt;\/td&gt;&lt;td&gt;SP#&lt;\/td&gt;&lt;\/tr&gt;&#8217;;<br>print OUTPUT $outln;<br>$outln = &#8220;&lt;tr&gt;&lt;td&gt;$ti&lt;\/td&gt;&lt;td&gt;$to&lt;\/td&gt;&lt;td&gt;$tg&lt;\/td&gt;&lt;td&gt;$tb&lt;\/td&gt;&lt;td&gt;$tn&lt;\/td&gt;&lt;td&gt;$rb&lt;\/td&gt;&lt;td&gt;$rn&lt;\/td&gt;&lt;td&gt;$pr&lt;\/td&gt;&lt;\/tr&gt;&#8221;;<br>print OUTPUT $outln;<br>$outln = &#8216;&lt;\/table&gt;&lt;\/center&gt;&lt;\/body&gt;&lt;\/html&gt;&#8217;;<br>print OUTPUT $outln;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just for fun I wrote a Perl program to generate some html code to do a simple display of a series of flags sent to it by HCA as parameters.&nbsp; This program creates a file that contains the web page to be displayed.&nbsp; NcFTP is then used to transmit the file to the web server.&nbsp; &hellip; <a href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Create Web Pages<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":352,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-354","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Web Pages - Sundrysites<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Web Pages - Sundrysites\" \/>\n<meta property=\"og:description\" content=\"Just for fun I wrote a Perl program to generate some html code to do a simple display of a series of flags sent to it by HCA as parameters.&nbsp; This program creates a file that contains the web page to be displayed.&nbsp; NcFTP is then used to transmit the file to the web server.&nbsp; &hellip; Continue reading Create Web Pages &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/\" \/>\n<meta property=\"og:site_name\" content=\"Sundrysites\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/create-web-pages\\\/\",\"url\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/create-web-pages\\\/\",\"name\":\"Create Web Pages - Sundrysites\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#website\"},\"datePublished\":\"2020-03-31T01:09:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/create-web-pages\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/create-web-pages\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/create-web-pages\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home Info\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Arduino Projects\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Perl Programs\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/perl-programs\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Create Web Pages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#website\",\"url\":\"https:\\\/\\\/sundrysites.com\\\/\",\"name\":\"Sundrysites\",\"description\":\"As In Various and Sundry\",\"publisher\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#\\\/schema\\\/person\\\/1e11ce6af1587a3431e57dfc0797ab61\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sundrysites.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#\\\/schema\\\/person\\\/1e11ce6af1587a3431e57dfc0797ab61\",\"name\":\"Wayne Gulden\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"caption\":\"Wayne Gulden\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/sundrysites.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Web Pages - Sundrysites","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/","og_locale":"en_US","og_type":"article","og_title":"Create Web Pages - Sundrysites","og_description":"Just for fun I wrote a Perl program to generate some html code to do a simple display of a series of flags sent to it by HCA as parameters.&nbsp; This program creates a file that contains the web page to be displayed.&nbsp; NcFTP is then used to transmit the file to the web server.&nbsp; &hellip; Continue reading Create Web Pages &rarr;","og_url":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/","og_site_name":"Sundrysites","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/","url":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/","name":"Create Web Pages - Sundrysites","isPartOf":{"@id":"https:\/\/sundrysites.com\/#website"},"datePublished":"2020-03-31T01:09:59+00:00","breadcrumb":{"@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/create-web-pages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sundrysites.com\/"},{"@type":"ListItem","position":2,"name":"Home Info","item":"https:\/\/sundrysites.com\/index.php\/home-info\/"},{"@type":"ListItem","position":3,"name":"Arduino Projects","item":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/"},{"@type":"ListItem","position":4,"name":"Perl Programs","item":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/perl-programs\/"},{"@type":"ListItem","position":5,"name":"Create Web Pages"}]},{"@type":"WebSite","@id":"https:\/\/sundrysites.com\/#website","url":"https:\/\/sundrysites.com\/","name":"Sundrysites","description":"As In Various and Sundry","publisher":{"@id":"https:\/\/sundrysites.com\/#\/schema\/person\/1e11ce6af1587a3431e57dfc0797ab61"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sundrysites.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/sundrysites.com\/#\/schema\/person\/1e11ce6af1587a3431e57dfc0797ab61","name":"Wayne Gulden","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","caption":"Wayne Gulden"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g"},"sameAs":["https:\/\/sundrysites.com"]}]}},"_links":{"self":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":1,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/354\/revisions"}],"predecessor-version":[{"id":355,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/354\/revisions\/355"}],"up":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/352"}],"wp:attachment":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/media?parent=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}