jekhokie / raspberry-noaa-v2

V2 of the fantastic Raspberry Pi NOAA setup
GNU General Public License v3.0
531 stars 101 forks source link

FTP upload #68

Open colinluthier opened 3 years ago

colinluthier commented 3 years ago

It would be a big feature improvement to clone the local server, without the admin features, to a public server. This has been discussed on FB. wxtoimg had this feature but only in the GUI. I can easily write the code to do the FTP side nut the SQL side is beyond my experience level.

jekhokie commented 3 years ago

@colinluthier just want to make sure I understand how this would work - is the idea that this would essentially just be a clone of the "Captures" page with the ability to view the captures? Removing admin makes sense to me, but I would suggest we should probably also leave "Passes" out of it since that is dependent on the SDR being present, no?

So, let me ask it this way - would it be sufficient to generate a static site from the "Captures" page and ship that as part of the FTP operation along with the corresponding images? (basically, just transferring all the captures to a remote server to be viewed on the public internet like a photo viewer site)?

thecivvie commented 3 years ago

excellent idea of generating the html and uploading it along with the images

jekhokie commented 3 years ago

Could someone walk me through the actual pattern for this? There are obviously many different hosting sites and different structures for uploading files. Would it be sufficient to create a *.tgz (compressed) file that contained all of the image files in /srv/images and content in /var/www/wx-new and then have the file FTP'd to the remote site and the user would un-pack them manually? Or does the remote hosting typically have a directory for images and directory for web content that the files should be FTP'd to directly? Or something else?

thecivvie commented 3 years ago

I would say the easiest for you is to generate either .php or .html and the images in the same directory and then we can script an upload to our own websites. That way we could clear the existing files out once a new upload is required

jekhokie commented 3 years ago

Note to self - this is going to be HIGHLY complicated to try and generate static content from the existing site components based on the way pagination works with the SQL database, etc. It's likely preferred that a static content generator would do something like the following:

  1. Generate a static HTML page with static pagination (https://pagination.js.org/ or similar) built from the database records for decoded_passes and static links to local image files (transpose the /srv/images directory to ./assets/images for local reference).
  2. Copying of image files to local ./assets/images directory that is referred to by the static page image source links.

Item 2 is likely not a "copy" on the local Pi but, rather, construction of a .tgz file that aligns the source images within and would explode them into the subdirectory ./assets/images when unpacked.

@thecivvie and @colinluthier - is it reasonable to expect that this generator would produce a compressed .tgz file that contains the static site and respective images, or are you looking to have it do something like run an FTP command to transfer the static file and associated images directly to a remote source?

colinluthier commented 3 years ago

You can see the output of wxtoimg at designerinlight/wxdata. It makes no effort to compress the uploads. The index page is generated each time an pass ins completed. I changed a few things and added some weather things at the bottom. He has some premade templates that you can copy and change to suit your site.

jekhokie commented 3 years ago

Hey Colin - do you have a direct link to the example? I got a 404 when I tried to visit your site wxdata page.

colinluthier commented 3 years ago

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
--
  | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  | <head>
  | <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
  | <meta name="expires" content="Fri, 08 Jan 2021 02:56:48 GMT" />
  | <meta http-equiv="imagetoolbar" content="no" />
  | <meta name="keywords" content="weather, satellite, images, Napa, United States, WXtoImg" />
  | <meta property="og:type" content="website" />
  | <meta property="og:url" content="http://designerinlight.com/wxdata/" />
  | <meta property="og:title" content="Weather satellite images recorded at Napa, United States." />
  | <meta property="og:description" content="Latitude: 38.296, Longitude: -122.307" />
  | <meta property="og:image" content="http://designerinlight.com/wxdata/preview.jpg" />
  | <title>Weather Satellite Images for Napa, United States</title>
  | <style type="text/css">
  | <!--
  | #wx {
  | font-family: sans-serif, Helvetica, Arial, Geneva, Swiss, SunSans-Regular;
  | font-size: 88%;
  | color: #FFFFFF;
  | margin-left: 30px;
  | margin-right: 5px;
  | }
  | #wxwarning {
  | color: #e33;
  | font-weight: bold;
  | }
  |  
  | .wxflag {
  | width: 90%;
  | background-color: #000000;
  | padding: 10px 10px;
  | font-weight: bold;
  | margin-left: 10px;
  | }
  | .wxflag h1 {
  | color: #FFFFFF;
  | font-size: 171%;
  | padding-bottom: 3px;
  | margin-top: 0px;
  | margin-bottom: 0px;
  | }
  | .wxflag h2 {
  | color: #FFFFFF;
  | font-size: 143%;
  | padding-bottom: 3px;
  | margin-bottom: 0px;
  | }
  | .wxflag h3 {
  | color: #FFFFFF;
  | font-size: 124%;
  | padding-top: 2px;
  | margin-top: 0px;
  | }
  | .wxflag h4 {
  | color: #FFFFFF;
  | font-size: 100%;
  | padding-top: 2px;
  | margin-top: 0px;
  | padding-bottom: 2px;
  | margin-bottom: 0px;
  | }
  |  
  | .wximage {
  | display: block;
  | float: left;
  | background-color: #000000;
  | padding: 10px 10px;
  | margin: 10px;
  | }
  | .wximagetitle h2, .wximagetitle h3, .wximagetitle h4 {
  | margin-top: 0px;
  | margin-bottom: 3px;
  | }
  | .wximagetitle h2 {
  | font-size: 143%;
  | }
  | .wximagetitle h3 {
  | font-size: 124%;
  | }
  | .wximagetitle h4 {
  | font-size: 100%;
  | }
  | .wxinfo {
  | background-color: #000000;
  | border-collapse: collapse;
  | padding: 0px;
  | margin: 0px;
  | margin-top: 10px;
  | text-align: left;
  | }
  | .wxinfo td, .wxinfo th {
  | margin: 0px;
  | padding: 1px;
  | padding-right: 10px;
  | border: 0px;
  | }
  | .wxschedule {
  | display: block;
  | float: left;
  | background-color: #000000;
  | border-collapse: collapse;
  | padding: 10px 20px;
  | margin: 10px;
  | }
  | .wxschedule td {
  | padding: 10px;
  | }
  | .wxschedlist {
  | background-color: #000000;
  | border-collapse: collapse;
  | padding: 0px;
  | margin: 0px;
  | text-align: center;
  | }
  | .wxschedlist td, .wxschedlist th {
  | margin: 0px;
  | padding: 4px 8px;
  | border: 1px solid #888;
  | }
  |  
  | /* Added for Jetstream Slide Show*/
  |  
  |  
  | * {box-sizing: border-box;}
  | body {font-family: Verdana, sans-serif;}
  | .mySlides {display: none;}
  | img {vertical-align: left;}
  |  
  | /* Slideshow container */
  | .slideshow-container {
  | max-width: 1000px;
  | position: relative;
  | margin: 10;
  | }
  |  
  | /* Caption text */
  | .text {
  | color: #f2f2f2;
  | font-size: 15px;
  | padding: 8px 12px;
  | position: absolute;
  | bottom: 8px;
  | width: 100%;
  | text-align: center;
  | }
  |  
  | /* Number text (1/3 etc) */
  | .numbertext {
  | color: #f2f2f2;
  | font-size: 12px;
  | padding: 8px 12px;
  | position: absolute;
  | top: 0;
  | }
  |  
  | /* The dots/bullets/indicators */
  | .dot {
  | height: 15px;
  | width: 15px;
  | margin: 0 2px;
  | background-color: #bbb;
  | border-radius: 50%;
  | display: inline-block;
  | transition: background-color 0.6s ease;
  | }
  |  
  | .active {
  | background-color: #717171;
  | }
  |  
  |  
  |  
  | -->
  | </style>
  | </head>
  | <body style="background-color:black;">
  | <div id="wx">
  | <div class="wxflag">
  | <h1>Weather satellite images recorded at Napa, United States.</h1>
  | <h4>Latitude: 38.296, Longitude: -122.307</h4>
  | <h4>Receiver: RTL-SDR Blog v3</h4>
  | <h4>Antenna: QFH</h4>
  | <h4>LNA: SawBird NOAA</h4>
  | <h4><pre> Software: WXtoImg version 2.11.2 beta
  | Orbitron 3.71
  | SDR# v1.0.0.1732
  | Tracking DDE CLient v1.2
  | VBCABLE Driver Pack43</pre></h4>
  | <p>
  | Click on any image below for a full sized image.
  | Times are shown in Pacific Standard Time.
  | </p>
  | <noscript>
  | <p id="wxwarning">
  | You must enable javascript in your web browser to see all the images and more detailed information.
  | </p>
  | </noscript>
  | </div>
  | <p />
  | <script type="text/javascript">
  | /* <![CDATA[ */
  | var xlang = new Array();
  |  
  | // -----------------------------------------------------
  | // language transation for satellite info here.
  | // change only right-hand side, it must be surrounded
  | // by double quotes and end with a semicolon.
  | // You can add other projection translations as needed.
  | // You can also translate other enhancement names.
  | xlang['click']      = "click image for full-size image";
  | xlang['Composite Image']= "Composite Image";
  | xlang['on']     = "on";
  | xlang['at']     = "at";
  | xlang['southbound'] = "Southbound";
  | xlang['northbound'] = "Northbound";
  | xlang['E']      = "E";      // Abbrev. for East
  | xlang['W']      = "W";      // Abbrev. for West
  |  
  | xlang['Pass Start'] = "Pass Start";
  | xlang['Last Pass']  = "Last Pass";
  | xlang['Enhancement']    = "Enhancement";
  | xlang['Projection'] = "Projection";
  | xlang['Direction']  = "Direction";
  | xlang['Max Elevation']  = "Max Elevation";
  | xlang['Solar Elevation']= "Solar Elevation";
  | xlang['Pass Duration']  = "Pass Duration";
  | xlang['Frequency']  = "Frequency";
  | xlang['Channel A']  = "Channel A";
  | xlang['Channel B']  = "Channel B";
  |  
  | xlang['Normal']     = "Normal";
  | xlang['Mercator']   = "Mercator";
  | xlang['Orthographic']   = "Orthographic";
  |  
  | xlang['Pristine']   = "Pristine";
  | xlang['pris']       = "Pristine";
  | xlang['contrast']   = "Contrast Enhanced";
  | xlang['sea-day']    = "SST (sea)";
  | xlang['sea']        = "SST (sea)";
  | xlang['norm']       = "Normal";
  | xlang['therm']      = "Thermal";
  |  
  | // satellite channel info
  | xlang['1']      = "1 (Visible)";
  | xlang['2']      = "2 (Near Infrared)";
  | xlang['3']      = "3 (Mid Infrared)";
  | xlang['4']      = "4 (Thermal Infrared)";
  | xlang['5']      = "5 (Thermal Infrared)";
  | xlang['6']      = "3A (Mid Infrared)";
  |  
  | // -----------------------------------------------------
  |  
  | function xlate(s) {
  | if (xlang[s] == undefined \|\| xlang[s] == "")
  | return s;
  | return xlang[s];
  | }
  |  
  | function wxSetStatus(s) {
  | window.status = s;
  | return true;
  | }
  |  
  | var imgwindow = '';
  |  
  | function doImgPopup(img, title, info) {
  | if (imgwindow && !imgwindow.closed) {
  | imgwindow.document.clear();
  | } else {
  | width = (screen.width * 4) / 5;
  | height = (screen.height * 4) / 5;
  | if (!width \|\| width == '' \|\| width <= 100)
  | width = 800;
  | if (!height \|\| height == '' \|\| height <= 100)
  | height = 600;
  | imgwindow=window.open('','WXtoImg','width=' + width + ',height=' + height + ',resizable=1,scrollbars=1');
  | }
  | html = '<html><head><title>' + title + '</title></head><body>' +
  | '<img src="' + img + '" alt="" title="' + info + '" style="vertical-align: bottom;" /><p>' + info + '</p></body></html>';
  | imgwindow.document.write(html);
  | imgwindow.document.close();
  | imgwindow.focus();
  | }
  |  
  | function doImgPopdown() {
  | if (imgwindow.location && !imgwindow.closed) {
  | imgwindow.close();
  | }
  | }
  |  
  | var maxHeight = 0;
  | var maxWidth = 0;
  | function checkSize(width, height) {
  | if (width != '' && width > maxWidth)
  | maxWidth = width;
  | if (height != '' && height > maxHeight)
  | maxHeight = height;
  | }
  |  
  | function addCompImg(img, thumb, width, height, time, enh, enhname, proj) {
  | // we show only the latest set of composite images
  | if (img == '' \|\| img == 'noimage.jpg' \|\| thumb == '' \|\| thumb == 'nothumb.jpg')
  | return;
  | if (width <= 1 \|\| height <= 1 \|\| proj == '')
  | return;
  |  
  | at = ' ' + xlate('at') + ' ';
  | on = ' ' + xlate('on') + ' ';
  | proj = xlate(proj);
  | enhname = xlate(enhname);
  |  
  | title = xlate(enh) + ' ' + xlate('Composite Image');
  | info = title + at + time + ', ' + enhname + ', ' + proj + ' ' + xlate('Projection');
  |  
  | document.write('<div class="wximage" style="height: ' + maxHeight + 'px;">');
  | document.write('<span class="wximagetitle">');
  | document.write('<h3>' + title + '</h3>');
  | document.write('</span>');
  | document.write('<a href="javascript:doImgPopup(\'' + img + '\', \'' + title + '\', \'' + info + '\');"  OnMouseover="wxSetStatus(\'' + img + '\');" OnMouseout="wxSetStatus(\' \');" style="text-decoration: none;">');
  | document.write('<img src="' + thumb + '" alt="' + title + '" title="' + xlate('click') + '" width="' + width + '" height="' + height + '" style="border: 0px;" />');
  | document.write('</a><br />');
  |  
  | document.write('<table class="wxinfo">');
  | document.write('<tr><td>' + xlate('Last Pass')      + ':</td><td>' + time  + '</td></tr>');
  | document.write('<tr><td>' + xlate('Enhancement')    + ':</td><td>' + xlate(enh)   + '</td></tr>');
  | document.write('<tr><td>' + xlate('Projection')     + ':</td><td>' + proj   + '</td></tr>');
  | document.write('</table>');
  | document.write('</div>');
  | }
  |  
  | function addImg(img, thumb, width, height, time, enh, enhname, sat, dir, maxel, elaz, freq, proj, cha, chb, dur, solar) {
  | if (img == '' \|\| img == 'noimage.jpg' \|\| thumb == '' \|\| thumb == 'nothumb.jpg')
  | return;
  | if (width <= 1 \|\| height <= 1)
  | return;
  | if (cha != '' && chb != '' && cha == 0 && chb == 0) {
  | addCompImg(img, thumb, width, height, time, enh, enhname, proj);
  | return;
  | }
  |  
  | at = ' ' + xlate('at') + ' ';
  | on = ' ' + xlate('on') + ' ';
  | dir = xlate(dir);
  | proj = xlate(proj);
  | enhname = xlate(enhname);
  | elaz = xlate(elaz);
  | sena = xlate('Channel A') + ': ';
  | senb = xlate('Channel B') + ': ';
  | cha = xlate(cha);
  | chb = xlate(chb);
  |  
  | title = sat + at + time;
  | info = sat + ' ' + dir + ' ' + maxel + ' ' + elaz + on + freq + ', ' + enhname + ', ' + proj + ' ' + xlate('Projection') + ', ' + sena + cha + ', ' + senb + chb;
  |  
  | document.write('<div class="wximage" style="height: ' + maxHeight + 'px;">');
  | document.write('<span class="wximagetitle"><h3>' + sat + '</h3></span>');
  | document.write('<a href="javascript:doImgPopup(\'' + img + '\', \'' + title + '\', \'' + info + '\');" style="text-decoration: none;" OnMouseover="return wxSetStatus(\'' + img + '\');" OnMouseout="return wxSetStatus(\' \');">');
  | document.write('<img src="' + thumb + '" alt="' + title + '" title="' + xlate('click') + '" width="' + width + '" height="' + height + '" style="border: 0px;" /></a><br />');
  | document.write('<table class="wxinfo">');
  | document.write('<tr><td>' + xlate('Pass Start')     + ':</td><td>' + time  + '</td></tr>');
  | document.write('<tr><td>' + xlate('Enhancement')    + ':</td><td>' + xlate(enh)   + '</td></tr>');
  | document.write('<tr><td>' + xlate('Projection')     + ':</td><td>' + proj   + '</td></tr>');
  | document.write('<tr><td>' + xlate('Direction')      + ':</td><td>' + dir   + '</td></tr>');
  | document.write('<tr><td>' + xlate('Max Elevation')  + ':</td><td>' + maxel+' '+elaz + '</td></tr>');
  | document.write('<tr><td>' + xlate('Frequency')      + ':</td><td>' + freq  + '</td></tr>');
  | document.write('<tr><td>' + xlate('Channel A')      + ':</td><td>' + cha   + '</td></tr>');
  | document.write('<tr><td>' + xlate('Channel B')      + ':</td><td>' + chb   + '</td></tr>');
  | //document.write('<tr><td>' + xlate('Pass Duration')    + ':</td><td>' + dur   + '</td></tr>');
  | //document.write('<tr><td>' + xlate('Solar Elevation')  + ':</td><td>' + solar + '&deg;</td></tr>');
  | document.write('</table>');
  | document.write('</div>');
  | }
  |  
  | function makeImgSection() {
  | checkSize(181, 167);
  | checkSize(181, 167);
  | checkSize(181, 167);
  | checkSize(416, 167);
  | checkSize(181, 167);
  | checkSize(181, 296);
  | checkSize(181, 296);
  | checkSize(181, 296);
  | checkSize(416, 296);
  | checkSize(181, 296);
  | checkSize(181, 156);
  | checkSize(181, 156);
  | checkSize(181, 156);
  | checkSize(416, 156);
  | checkSize(181, 90);
  | checkSize(181, 271);
  | checkSize(181, 271);
  | checkSize(181, 271);
  | checkSize(416, 271);
  | checkSize(181, 234);
  | checkSize(181, 258);
  | checkSize(181, 258);
  | checkSize(181, 258);
  | checkSize(416, 258);
  | checkSize(181, 119);
  | checkSize(181, 119);
  | checkSize(181, 119);
  | checkSize(416, 119);
  | checkSize(181, 263);
  | checkSize(181, 263);
  | maxHeight += 200;
  |  
  | addImg('noaa-18-01071947-contrasta.jpg', 'noaa-18-01071947-contrasta-thumb.jpg', '181', '167', '07 Jan 2021 11:47', 'contrast', 'Contrast Enhanced', 'NOAA 18', 'southbound', '13&deg;', 'W', '137.9125MHz', 'Normal', '1', '4', '12:16', '16.0');
  | addImg('noaa-18-01071947-mcir.jpg', 'noaa-18-01071947-mcir-thumb.jpg', '181', '167', '07 Jan 2021 11:47', 'MCIR', 'MCIR Enhancement', 'NOAA 18', 'southbound', '13&deg;', 'W', '137.9125MHz', 'Normal', '1', '4', '12:16', '16.0');
  | addImg('noaa-18-01071947-mcir-precip.jpg', 'noaa-18-01071947-mcir-precip-thumb.jpg', '181', '167', '07 Jan 2021 11:47', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 18', 'southbound', '13&deg;', 'W', '137.9125MHz', 'Normal', '1', '4', '12:16', '16.0');
  | addImg('noaa-18-01071947-pris.jpg', 'noaa-18-01071947-pris-thumb.jpg', '416', '167', '07 Jan 2021 11:47', 'Pristine', 'Pristine Enhancement', 'NOAA 18', 'southbound', '13&deg;', 'W', '137.9125MHz', 'Normal', '1', '4', '12:16', '16.0');
  | addImg('noaa-18-01071947-hvct.jpg', 'noaa-18-01071947-hvct-thumb.jpg', '181', '167', '07 Jan 2021 11:47', 'HVCT', 'HVCT Enhancement', 'NOAA 18', 'southbound', '13&deg;', 'W', '137.9125MHz', 'Normal', '1', '4', '12:16', '16.0');
  | addImg('noaa-18-01071805-contrasta.jpg', 'noaa-18-01071805-contrasta-thumb.jpg', '181', '296', '07 Jan 2021 10:05', 'contrast', 'Contrast Enhanced', 'NOAA 18', 'southbound', '84&deg;', 'E', '137.9125MHz', 'Normal', '1', '4', '15:47', '21.1');
  | addImg('noaa-18-01071805-mcir.jpg', 'noaa-18-01071805-mcir-thumb.jpg', '181', '296', '07 Jan 2021 10:05', 'MCIR', 'MCIR Enhancement', 'NOAA 18', 'southbound', '84&deg;', 'E', '137.9125MHz', 'Normal', '1', '4', '15:47', '21.1');
  | addImg('noaa-18-01071805-mcir-precip.jpg', 'noaa-18-01071805-mcir-precip-thumb.jpg', '181', '296', '07 Jan 2021 10:05', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 18', 'southbound', '84&deg;', 'E', '137.9125MHz', 'Normal', '1', '4', '15:47', '21.1');
  | addImg('noaa-18-01071805-pris.jpg', 'noaa-18-01071805-pris-thumb.jpg', '416', '296', '07 Jan 2021 10:05', 'Pristine', 'Pristine Enhancement', 'NOAA 18', 'southbound', '84&deg;', 'E', '137.9125MHz', 'Normal', '1', '4', '15:47', '21.1');
  | addImg('noaa-18-01071805-hvct.jpg', 'noaa-18-01071805-hvct-thumb.jpg', '181', '296', '07 Jan 2021 10:05', 'HVCT', 'HVCT Enhancement', 'NOAA 18', 'southbound', '84&deg;', 'E', '137.9125MHz', 'Normal', '1', '4', '15:47', '21.1');
  | addImg('noaa-15-01071705-contrasta.jpg', 'noaa-15-01071705-contrasta-thumb.jpg', '181', '156', '07 Jan 2021 09:05', 'contrast', 'Contrast Enhanced', 'NOAA 15', 'southbound', '20&deg;', 'W', '137.62MHz', 'Normal', '3', '4', '13:11', '-0.1');
  | addImg('noaa-15-01071705-mcir.jpg', 'noaa-15-01071705-mcir-thumb.jpg', '181', '156', '07 Jan 2021 09:05', 'MCIR', 'MCIR Enhancement', 'NOAA 15', 'southbound', '20&deg;', 'W', '137.62MHz', 'Normal', '3', '4', '13:11', '-0.1');
  | addImg('noaa-15-01071705-mcir-precip.jpg', 'noaa-15-01071705-mcir-precip-thumb.jpg', '181', '156', '07 Jan 2021 09:05', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 15', 'southbound', '20&deg;', 'W', '137.62MHz', 'Normal', '3', '4', '13:11', '-0.1');
  | addImg('noaa-15-01071705-pris.jpg', 'noaa-15-01071705-pris-thumb.jpg', '416', '156', '07 Jan 2021 09:05', 'Pristine', 'Pristine Enhancement', 'NOAA 15', 'southbound', '20&deg;', 'W', '137.62MHz', 'Normal', '3', '4', '13:11', '-0.1');
  | addImg('noaa-15-01071705-hvct.jpg', 'noaa-15-01071705-hvct-thumb.jpg', '181', '90', '07 Jan 2021 09:07', 'HVCT', 'HVCT Enhancement', 'NOAA 15', 'southbound', '20&deg;', 'W', '137.62MHz', 'Normal', '2', '4', '13:11', '-0.1');
  | addImg('noaa-15-01071524-contrasta.jpg', 'noaa-15-01071524-contrasta-thumb.jpg', '181', '271', '07 Jan 2021 07:25', 'contrast', 'Contrast Enhanced', 'NOAA 15', 'southbound', '50&deg;', 'E', '137.62MHz', 'Normal', '2', '4', '15:03', '1.6');
  | addImg('noaa-15-01071524-mcir.jpg', 'noaa-15-01071524-mcir-thumb.jpg', '181', '271', '07 Jan 2021 07:25', 'MCIR', 'MCIR Enhancement', 'NOAA 15', 'southbound', '50&deg;', 'E', '137.62MHz', 'Normal', '2', '4', '15:03', '1.6');
  | addImg('noaa-15-01071524-mcir-precip.jpg', 'noaa-15-01071524-mcir-precip-thumb.jpg', '181', '271', '07 Jan 2021 07:25', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 15', 'southbound', '50&deg;', 'E', '137.62MHz', 'Normal', '2', '4', '15:03', '1.6');
  | addImg('noaa-15-01071524-pris.jpg', 'noaa-15-01071524-pris-thumb.jpg', '416', '271', '07 Jan 2021 07:25', 'Pristine', 'Pristine Enhancement', 'NOAA 15', 'southbound', '50&deg;', 'E', '137.62MHz', 'Normal', '2', '4', '15:03', '1.6');
  | addImg('noaa-15-01071524-hvct.jpg', 'noaa-15-01071524-hvct-thumb.jpg', '181', '234', '07 Jan 2021 07:26', 'HVCT', 'HVCT Enhancement', 'NOAA 15', 'southbound', '50&deg;', 'E', '137.62MHz', 'Normal', '2', '4', '15:03', '1.6');
  | addImg('noaa-19-01071508-contrasta.jpg', 'noaa-19-01071508-contrasta-thumb.jpg', '181', '258', '07 Jan 2021 07:10', 'contrast', 'Contrast Enhanced', 'NOAA 19', 'southbound', '75&deg;', 'W', '137.10MHz', 'Normal', '3', '4', '15:39', '-1.0');
  | addImg('noaa-19-01071508-mcir.jpg', 'noaa-19-01071508-mcir-thumb.jpg', '181', '258', '07 Jan 2021 07:10', 'MCIR', 'MCIR Enhancement', 'NOAA 19', 'southbound', '75&deg;', 'W', '137.10MHz', 'Normal', '3', '4', '15:39', '-1.0');
  | addImg('noaa-19-01071508-mcir-precip.jpg', 'noaa-19-01071508-mcir-precip-thumb.jpg', '181', '258', '07 Jan 2021 07:10', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 19', 'southbound', '75&deg;', 'W', '137.10MHz', 'Normal', '3', '4', '15:39', '-1.0');
  | addImg('noaa-19-01071508-pris.jpg', 'noaa-19-01071508-pris-thumb.jpg', '416', '258', '07 Jan 2021 07:10', 'Pristine', 'Pristine Enhancement', 'NOAA 19', 'southbound', '75&deg;', 'W', '137.10MHz', 'Normal', '3', '4', '15:39', '-1.0');
  | addImg('noaa-19-01071330-contrasta.jpg', 'noaa-19-01071330-contrasta-thumb.jpg', '181', '119', '07 Jan 2021 05:33', 'contrast', 'Contrast Enhanced', 'NOAA 19', 'southbound', '13&deg;', 'E', '137.10MHz', 'Normal', '3', '4', '12:28', '-1.0');
  | addImg('noaa-19-01071330-mcir.jpg', 'noaa-19-01071330-mcir-thumb.jpg', '181', '119', '07 Jan 2021 05:33', 'MCIR', 'MCIR Enhancement', 'NOAA 19', 'southbound', '13&deg;', 'E', '137.10MHz', 'Normal', '3', '4', '12:28', '-1.0');
  | addImg('noaa-19-01071330-mcir-precip.jpg', 'noaa-19-01071330-mcir-precip-thumb.jpg', '181', '119', '07 Jan 2021 05:33', 'MCIR-precip', 'MCIR with Precipitation Enhancement', 'NOAA 19', 'southbound', '13&deg;', 'E', '137.10MHz', 'Normal', '3', '4', '12:28', '-1.0');
  | addImg('noaa-19-01071330-pris.jpg', 'noaa-19-01071330-pris-thumb.jpg', '416', '119', '07 Jan 2021 05:33', 'Pristine', 'Pristine Enhancement', 'NOAA 19', 'southbound', '13&deg;', 'E', '137.10MHz', 'Normal', '3', '4', '12:28', '-1.0');
  | addImg('noaa-18-01070542-contrasta.jpg', 'noaa-18-01070542-contrasta-thumb.jpg', '181', '263', '06 Jan 2021 21:43', 'contrast', 'Contrast Enhanced', 'NOAA 18', 'northbound', '47&deg;', 'W', '137.9125MHz', 'Normal', '3', '4', '15:21', '-1.0');
  | addImg('noaa-18-01070542-mcir.jpg', 'noaa-18-01070542-mcir-thumb.jpg', '181', '263', '06 Jan 2021 21:43', 'MCIR', 'MCIR Enhancement', 'NOAA 18', 'northbound', '47&deg;', 'W', '137.9125MHz', 'Normal', '3', '4', '15:21', '-1.0');
  | }
  |  
  | window.onunload = doImgPopdown;
  | makeImgSection();
  | /* ]]> */
  | </script>
  | <noscript>
  | <table class="wxinfo" style="margin: 10px;">
  | <tr>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071947-contrasta.jpg">NOAA 18 contrast<br />
  | <img src="noaa-18-01071947-contrasta-thumb.jpg" alt="NOAA 18 contrast" title="NOAA 18 southbound 13&deg; W on 137.9125MHz, Contrast Enhanced, Normal Projection" width="181" height="167" /><br />
  | 07 Jan 2021 11:47</a><p />
  | </td>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071947-mcir.jpg">NOAA 18 MCIR<br />
  | <img src="noaa-18-01071947-mcir-thumb.jpg" alt="NOAA 18 MCIR" title="NOAA 18 southbound 13&deg; W on 137.9125MHz, MCIR Enhancement, Normal Projection" width="181" height="167" /><br />
  | 07 Jan 2021 11:47</a><p />
  | </td>
  | </tr>
  | <tr>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071947-mcir-precip.jpg">NOAA 18 MCIR-precip<br />
  | <img src="noaa-18-01071947-mcir-precip-thumb.jpg" alt="NOAA 18 MCIR-precip" title="NOAA 18 southbound 13&deg; W on 137.9125MHz, MCIR with Precipitation Enhancement, Normal Projection" width="181" height="167" /><br />
  | 07 Jan 2021 11:47</a><p />
  | </td>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071947-pris.jpg">NOAA 18 Pristine<br />
  | <img src="noaa-18-01071947-pris-thumb.jpg" alt="NOAA 18 Pristine" title="NOAA 18 southbound 13&deg; W on 137.9125MHz, Pristine Enhancement, Normal Projection" width="416" height="167" /><br />
  | 07 Jan 2021 11:47</a><p />
  | </td>
  | </tr>
  | <tr>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071947-hvct.jpg">NOAA 18 HVCT<br />
  | <img src="noaa-18-01071947-hvct-thumb.jpg" alt="NOAA 18 HVCT" title="NOAA 18 southbound 13&deg; W on 137.9125MHz, HVCT Enhancement, Normal Projection" width="181" height="167" /><br />
  | 07 Jan 2021 11:47</a><p />
  | </td>
  | <td style="width: 48%; padding-left: 10px;">
  | <a href="noaa-18-01071805-contrasta.jpg">NOAA 18 contrast<br />
  | <img src="noaa-18-01071805-contrasta-thumb.jpg" alt="NOAA 18 contrast" title="NOAA 18 southbound 84&deg; E on 137.9125MHz, Contrast Enhanced, Normal Projection" width="181" height="296" /><br />
  | 07 Jan 2021 10:05</a><p />
  | </td>
  | </tr>
  | </table>
  | </noscript>
  | <p />
  |  
  | <table class="wxschedule"><tr><td>
  | <h2>Next Scheduled Satellite Passes over Napa, United States</h2>
  | <table class="wxschedlist">
  | <thead>
  | <tr>
  | <th rowspan="2">Satellite<br />Name</th>
  | <th colspan="2">Start of Pass</th>
  | <th colspan="2">Time Available</th>
  | <th rowspan="2">Direction</th>
  | <th rowspan="2">Maximum Elevation<br />Degrees (East or West)</th>
  | <th rowspan="2">Frequency<br />MHz</th>
  | </tr>
  | <tr>
  | <th>UTC</th>
  | <th>Local Time*</th>
  | <th>UTC</th>
  | <th>Local Time*</th>
  | </tr>
  | </thead>
  | <tbody>
  | <tr>
  | <td>NOAA 19</td>
  | <td>08 Jan  02:33</td>
  | <td>07 Jan  18:33</td>
  | <td>08 Jan  02:56</td>
  | <td>07 Jan  18:56</td>
  | <td><script type="text/javascript">document.write(xlate('northbound'));</script><noscript><div>northbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('46&deg; W'));</script><noscript><div>46&deg; W</div></noscript></td>
  | <td>137.10</td>
  | </tr>
  | <tr>
  | <td>NOAA 15</td>
  | <td>08 Jan  02:42</td>
  | <td>07 Jan  18:42</td>
  | <td>08 Jan  02:58</td>
  | <td>07 Jan  18:58</td>
  | <td><script type="text/javascript">document.write(xlate('northbound'));</script><noscript><div>northbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('69&deg; E'));</script><noscript><div>69&deg; E</div></noscript></td>
  | <td>137.62</td>
  | </tr>
  | <tr>
  | <td>NOAA 18</td>
  | <td>08 Jan  03:51</td>
  | <td>07 Jan  19:51</td>
  | <td>08 Jan  04:02</td>
  | <td>07 Jan  20:02</td>
  | <td><script type="text/javascript">document.write(xlate('northbound'));</script><noscript><div>northbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('17&deg; E'));</script><noscript><div>17&deg; E</div></noscript></td>
  | <td>137.9125</td>
  | </tr>
  | <tr>
  | <td>NOAA 15</td>
  | <td>08 Jan  04:25</td>
  | <td>07 Jan  20:25</td>
  | <td>08 Jan  04:34</td>
  | <td>07 Jan  20:34</td>
  | <td><script type="text/javascript">document.write(xlate('northbound'));</script><noscript><div>northbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('13&deg; W'));</script><noscript><div>13&deg; W</div></noscript></td>
  | <td>137.62</td>
  | </tr>
  | <tr>
  | <td>NOAA 18</td>
  | <td>08 Jan  05:30</td>
  | <td>07 Jan  21:30</td>
  | <td>08 Jan  05:44</td>
  | <td>07 Jan  21:44</td>
  | <td><script type="text/javascript">document.write(xlate('northbound'));</script><noscript><div>northbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('61&deg; W'));</script><noscript><div>61&deg; W</div></noscript></td>
  | <td>137.9125</td>
  | </tr>
  | <tr>
  | <td>NOAA 19</td>
  | <td>08 Jan  13:19</td>
  | <td>08 Jan  05:19</td>
  | <td>08 Jan  13:27</td>
  | <td>08 Jan  05:27</td>
  | <td><script type="text/javascript">document.write(xlate('southbound'));</script><noscript><div>southbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('9&deg; E'));</script><noscript><div>9&deg; E</div></noscript></td>
  | <td>137.10</td>
  | </tr>
  | <tr>
  | <td>NOAA 19</td>
  | <td>08 Jan  14:57</td>
  | <td>08 Jan  06:57</td>
  | <td>08 Jan  15:12</td>
  | <td>08 Jan  07:12</td>
  | <td><script type="text/javascript">document.write(xlate('southbound'));</script><noscript><div>southbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('86&deg; E'));</script><noscript><div>86&deg; E</div></noscript></td>
  | <td>137.10</td>
  | </tr>
  | <tr>
  | <td>NOAA 15</td>
  | <td>08 Jan  14:59</td>
  | <td>08 Jan  06:59</td>
  | <td>08 Jan  15:14</td>
  | <td>08 Jan  07:14</td>
  | <td><script type="text/javascript">document.write(xlate('southbound'));</script><noscript><div>southbound</div></noscript></td>
  | <td><script type="text/javascript">document.write(xlate('29&deg; E'));</script><noscript><div>29&deg; E</div></noscript></td>
  | <td>137.62</td>
  | </tr>
  | </tbody>
  | </table>
  | <p>
  | * local time is Pacific Standard Time.
  | Record captures:
  | Farthest West: -148W,
  | Farthest North: 60.5N,
  | Farthest East: -81.1W,
  | Farthest South 18.5N
  | (updated by hand)
  | </p>
  | </td></tr></table>
  | </div>
  | <hr style="width:50%;text-align:left;margin-left:0;color:gray">
  | <h2 style="color:grey">Interactive Radar Map</h2>
  | <iframe width="650" height="450" src="https://arcg.is/1fSqGn" frameborder="0"></iframe>
  |  
  | <hr style="width:50%;text-align:left;margin-left:0;color:gray">
  | <h2 style="color:grey">Wind Map from Windy.com</h2>
  | <iframe width="650" height="450" src="https://embed.windy.com/embed2.html?lat=38.290&lon=-122.283&detailLat=38.290&detailLon=-122.283&width=650&height=450&zoom=5&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=default&metricTemp=default&radarRange=-1" frameborder="0"></iframe>
  |  
  | <hr style="width:50%;text-align:left;margin-left:0;color:gray">
  | <h2 style="color:grey">Bay Area Lightning Detection Network from Blitzortung.org</h2>
  | <img src="https://saratoga-weather.org/BO-new/BO/BOSFBay-ani.gif">
  |  
  | <hr style="width:50%;text-align:left;margin-left:0;color:gray">
  | <h2 style="color:grey">North America Surface Pressure Map.</h2>
  | <img src="https://www.wpc.ncep.noaa.gov/sfc/90fwbg.gif">
  |  
  | <hr style="width:50%;text-align:left;margin-left:0;color:gray">
  | <h2 style="color:grey">Jet Stream Animation</h2>
  |  
  |  
  | <div class="slideshow-container">
  |  
  | <div class="mySlides fade">
  | <img src="http://virga.sfsu.edu/gif/jetstream_pac_init_03.gif">
  | </div>
  |  
  | <div class="mySlides fade">
  | <img src="http://virga.sfsu.edu/gif/jetstream_pac_init_02.gif">
  | </div>
  |  
  | <div class="mySlides fade">
  | <img src="http://virga.sfsu.edu/gif/jetstream_pac_init_01.gif">
  | </div>
  |  
  | <div class="mySlides fade">
  | <img src="http://virga.sfsu.edu/gif/jetstream_pac_init_00.gif">
  | </div>
  |  
  | </div>
  | <br>
  |  
  | <div style="text-align:left">
  | <span class="dot"></span>
  | <span class="dot"></span>
  | <span class="dot"></span>
  | <span class="dot"></span>
  | </div>
  |  
  | <script>
  | var slideIndex = 0;
  | showSlides();
  |  
  | function showSlides() {
  | var i;
  | var slides = document.getElementsByClassName("mySlides");
  | var dots = document.getElementsByClassName("dot");
  | for (i = 0; i < slides.length; i++) {
  | slides[i].style.display = "none";
  | }
  | slideIndex++;
  | if (slideIndex > slides.length) {slideIndex = 1}
  | for (i = 0; i < dots.length; i++) {
  | dots[i].className = dots[i].className.replace(" active", "");
  | }
  | slides[slideIndex-1].style.display = "block";
  | dots[slideIndex-1].className += " active";
  | setTimeout(showSlides, 1000); // Change image every 1 seconds
  | }
  | </script>
  |  
  | <iframe  width="500" height="600" src="https://forecast.weather.gov/product.php?site=NWS&issuedby=MTR&product=AFD&format=txt&version=1&glossary=0" frameborder="0" scrolling="auto" allowfullscreen>
  | </iframe>
  |  
  |  
  |  
  | </body>
  | </html>
nomadixmedia commented 3 years ago

An easy way to do this is to run node-red and watch the image folder, get it to create the HTML and upload it to a webserver.

dom-robinson commented 2 years ago

I have put this on my to-do queue. Plan is to simply expose an 'ftp' option in settings.yml and to let the user create thier own curl command (with an example in the settings.yml comments) so they can work the ftp process in, but deal with all thier own nuances of security and ftp versions. Any other method will open RN2 up to a significant amoutn of engineering to manage all the PASV / binary / port settings - something that will be unique to each user. curl supports ftp well but the user will need to take a little responsibility to work out the setup they need for thier own workflow...