{"id":469,"date":"2025-10-19T10:53:21","date_gmt":"2025-10-19T14:53:21","guid":{"rendered":"https:\/\/scootercam.net\/notes\/?p=469"},"modified":"2025-10-22T15:17:32","modified_gmt":"2025-10-22T19:17:32","slug":"scootercam-verbose","status":"publish","type":"post","link":"https:\/\/scootercam.net\/blog\/scootercam-verbose\/","title":{"rendered":"Scootercam Weather Verbose Plugin"},"content":{"rendered":"\n<p>WordPress plugin for parsing and displaying NOAA weather forecasts with automatic alert detection.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automated NOAA Parsing<\/strong>: Downloads and parses weather forecasts hourly<\/li>\n\n\n\n<li><strong>Alert Detection<\/strong>: Automatically extracts warnings, watches, and advisories<\/li>\n\n\n\n<li><strong>Three Forecast Types<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Standard Forecast (miz071.txt)<\/li>\n\n\n\n<li>Marine Forecast (lmz845.txt)<\/li>\n\n\n\n<li>Extended Forecast<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Smart Caching<\/strong>: Efficient file-based caching system<\/li>\n\n\n\n<li><strong>Flexible Display<\/strong>: Multiple shortcodes with different formats<\/li>\n\n\n\n<li><strong>Emoji Support<\/strong>: Visual indicators for weather conditions and alert severity<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installation<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n\n\n\n<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress<\/li>\n\n\n\n<li>The plugin will automatically create <code>\/wp-content\/wx\/<\/code> directory for cache files<\/li>\n\n\n\n<li>Forecasts will be downloaded automatically every hour<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Alert System<\/h2>\n\n\n\n<p>The plugin automatically detects and categorizes weather alerts:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alert Types<\/h3>\n\n\n\n<p><strong>WARNING<\/strong> (\ud83d\udd34 Severe)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Highest severity<\/li>\n\n\n\n<li>Requires immediate action<\/li>\n\n\n\n<li>Examples: Gale Warning, Tornado Warning, Flood Warning<\/li>\n\n\n\n<li>Emoji indicators: \ud83c\udf2c\ufe0f\ud83d\udca8 (Gale), \u26c8\ufe0f (Storm), \ud83c\udf2a\ufe0f (Tornado), \u2744\ufe0f (Winter)<\/li>\n<\/ul>\n\n\n\n<p><strong>WATCH<\/strong> (\ud83d\udfe0 High)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Conditions are favorable for severe weather<\/li>\n\n\n\n<li>Be prepared to take action<\/li>\n\n\n\n<li>Examples: Tornado Watch, Flood Watch, Winter Storm Watch<\/li>\n\n\n\n<li>Emoji indicators: \ud83d\udc40\u26a0\ufe0f (Generic), \u26c8\ufe0f\ud83d\udc40 (Storm), \ud83c\udf2a\ufe0f\ud83d\udc40 (Tornado)<\/li>\n<\/ul>\n\n\n\n<p><strong>ADVISORY<\/strong> (\ud83d\udfe1 Moderate)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Less severe but still important<\/li>\n\n\n\n<li>Examples: Small Craft Advisory, Wind Advisory, Fog Advisory<\/li>\n\n\n\n<li>Emoji indicators: \u26f5\u26a0\ufe0f (Small Craft), \ud83d\udca8 (Wind), \ud83c\udf2b\ufe0f (Fog)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Shortcodes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Alert Shortcodes<\/h3>\n\n\n\n<p>Display weather alerts and warnings:<\/p>\n\n\n<p>[weather_alerts]<br \/>\n[marine_alerts]<br \/>\n[extended_alerts]<br \/>\n[all_weather_alerts]   <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_alerts]          - Standard forecast alerts\n&#91;marine_alerts]           - Marine forecast alerts (e.g., Gale Warnings)\n&#91;extended_alerts]         - Extended forecast alerts\n&#91;all_weather_alerts]      - All alerts from all forecast types\n<\/code><\/pre>\n\n\n\n<p><strong>Format Options:<\/strong><\/p>\n\n\n<p>[marine_alerts format=&#8221;banner&#8221;]<br \/>\n[marine_alerts format=&#8221;list&#8221;]    <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;marine_alerts format=\"banner\"]  - Large banner style (default)\n&#91;marine_alerts format=\"list\"]    - Compact list style\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Individual Forecast Periods<\/h3>\n\n\n\n<p>Display a specific forecast period:<\/p>\n\n\n<p>[weather_verbose index=&#8221;0&#8243;]    &#8211; Standard forecast, first period<br \/>\n[weather_marine index=&#8221;0&#8243;]     &#8211; Marine forecast, first period<br \/>\n[weather_extended index=&#8221;0&#8243;]   &#8211; Extended forecast, first period<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_verbose index=\"0\"]    - Standard forecast, first period\n&#91;weather_marine index=\"0\"]     - Marine forecast, first period\n&#91;weather_extended index=\"0\"]   - Extended forecast, first period\n<\/code><\/pre>\n\n\n\n<p>Index values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>0<\/code> = First period (e.g., &#8220;REST OF TODAY&#8221;)<\/li>\n\n\n\n<li><code>1<\/code> = Second period (e.g., &#8220;TONIGHT&#8221;)<\/li>\n\n\n\n<li><code>2<\/code> = Third period, etc.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">All Forecasts<\/h3>\n\n\n\n<p>Display all forecast periods:<\/p>\n\n\n<p>[weather_verbose_all]          &#8211; All standard forecasts<br \/>\n[weather_marine_all]           &#8211; All marine forecasts<br \/>\n[weather_extended_all]         &#8211; All extended forecasts<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_verbose_all]          - All standard forecasts\n&#91;weather_marine_all]           - All marine forecasts\n&#91;weather_extended_all]         - All extended forecasts\n<\/code><\/pre>\n\n\n\n<p><strong>Format Options:<\/strong><\/p>\n\n\n<p>[weather_marine_all format=&#8221;cards&#8221;]<br \/>\n[weather_marine_all format=&#8221;table&#8221;]<br \/>\n[weather_marine_all format=&#8221;simple&#8221;]<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Cards Format<\/strong> (default)<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_marine_all format=\"cards\"]\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Grid layout with styled cards<\/li>\n\n\n\n<li>Best for visual appeal<\/li>\n\n\n\n<li>Each period in its own card<\/li>\n<\/ul>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Table Format<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_marine_all format=\"table\"]\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Structured table layout<\/li>\n\n\n\n<li>Good for comparing periods<\/li>\n\n\n\n<li>Compact view<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Simple Format<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;weather_marine_all format=\"simple\"]\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Plain text with minimal styling<\/li>\n\n\n\n<li>Fastest to load<\/li>\n\n\n\n<li>Good for sidebar widgets<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example Usage<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Display Marine Alerts and Today&#8217;s Forecast<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- Show any marine warnings prominently --&gt;<\/code><\/pre>\n\n\n<p>[marine_alerts]<\/p>\n\n\n\n<p>&lt;!&#8211; Show current marine conditions &#8211;&gt; &lt;h3&gt;Current Marine Conditions&lt;\/h3&gt;<\/p>\n\n\n<p>[weather_marine index=&#8221;0&#8243;]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Complete Weather Page<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- All active alerts --&gt;\n&lt;div class=\"weather-alerts-section\"&gt;\n    &lt;h2&gt;Active Weather Alerts&lt;\/h2&gt;<\/code><\/pre>\n\n\n<p>[all_weather_alerts]<\/p>\n\n\n\n<p>&lt;\/div&gt; &lt;!&#8211; Standard forecast &#8211;&gt; &lt;div class=&#8221;standard-forecast&#8221;&gt; &lt;h2&gt;Local Forecast&lt;\/h2&gt;<\/p>\n\n\n<p>[weather_verbose_all format=&#8221;cards&#8221;]<\/p>\n\n\n\n<p>&lt;\/div&gt; &lt;!&#8211; Marine forecast &#8211;&gt; &lt;div class=&#8221;marine-forecast&#8221;&gt; &lt;h2&gt;Marine Forecast&lt;\/h2&gt;<\/p>\n\n\n<p>[weather_marine_all format=&#8221;cards&#8221;]<\/p>\n\n\n\n<p>&lt;\/div&gt;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sidebar Widget<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- Compact alert display --&gt;<\/code><\/pre>\n\n\n<p>[marine_alerts format=&#8221;list&#8221;]<\/p>\n\n\n\n<p>&lt;!&#8211; Today&#8217;s weather only &#8211;&gt;<\/p>\n\n\n<p>[weather_verbose index=&#8221;0&#8243;]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-World Alert Examples<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Gale Warning (Marine)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\ud83c\udf2c\ufe0f\ud83d\udca8 WARNING: GALE WARNING IN EFFECT THROUGH LATE TONIGHT\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Small Craft Advisory<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u26f5\u26a0\ufe0f ADVISORY: SMALL CRAFT ADVISORY IN EFFECT UNTIL 8 PM\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Winter Storm Watch<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2744\ufe0f\ud83d\udc40 WATCH: WINTER STORM WATCH FROM FRIDAY EVENING THROUGH SATURDAY\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Styling<\/h2>\n\n\n\n<p>The plugin includes comprehensive CSS classes for customization:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alert Styling<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.weather-alert-banner<\/code> &#8211; Banner format alerts<\/li>\n\n\n\n<li><code>.alert-severe<\/code> &#8211; Red styling for warnings<\/li>\n\n\n\n<li><code>.alert-high<\/code> &#8211; Orange styling for watches<\/li>\n\n\n\n<li><code>.alert-moderate<\/code> &#8211; Yellow styling for advisories<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Forecast Styling<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.weather-card<\/code> &#8211; Individual forecast cards<\/li>\n\n\n\n<li><code>.weather-table<\/code> &#8211; Table format styling<\/li>\n\n\n\n<li><code>.weather-type-marine<\/code> &#8211; Marine-specific colors<\/li>\n\n\n\n<li><code>.weather-type-extended<\/code> &#8211; Extended forecast colors<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Custom CSS Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Make marine warnings more prominent *\/\n.weather-type-marine .alert-severe {\n    border-left-width: 8px;\n    font-size: 1.2em;\n}\n\n\/* Change card colors *\/\n.weather-type-marine .weather-card-header {\n    background: linear-gradient(135deg, #005f73 0%, #0a9396 100%);\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Data Files<\/h2>\n\n\n\n<p>The plugin creates these files in <code>\/wp-content\/wx\/<\/code>:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Forecast Files<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>extracted_verbose.php<\/code> &#8211; Parsed standard forecasts<\/li>\n\n\n\n<li><code>extracted_marine.php<\/code> &#8211; Parsed marine forecasts<\/li>\n\n\n\n<li><code>extracted_extended.php<\/code> &#8211; Parsed extended forecasts<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Alert Files<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>alerts_verbose.php<\/code> &#8211; Standard forecast alerts<\/li>\n\n\n\n<li><code>alerts_marine.php<\/code> &#8211; Marine forecast alerts (warnings, advisories)<\/li>\n\n\n\n<li><code>alerts_extended.php<\/code> &#8211; Extended forecast alerts<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Raw Files<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>miz071.txt<\/code> &#8211; Raw standard forecast from NOAA<\/li>\n\n\n\n<li><code>lmz845.txt<\/code> &#8211; Raw marine forecast from NOAA<\/li>\n\n\n\n<li><code>extended.txt<\/code> &#8211; Raw extended forecast from NOAA<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Manual Updates<\/h2>\n\n\n\n<p>Use the admin page to manually trigger forecast updates:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Weather Verbose<\/strong> in WordPress admin<\/li>\n\n\n\n<li>Click <strong>Download &amp; Parse Forecasts Now<\/strong><\/li>\n\n\n\n<li>Check the status section to verify updates<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Alerts Not Appearing<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Check if alerts exist<\/strong>: View the raw forecast files in <code>\/wp-content\/wx\/<\/code><\/li>\n\n\n\n<li><strong>Verify parsing<\/strong>: Check that <code>alerts_marine.php<\/code> contains data<\/li>\n\n\n\n<li><strong>Manual update<\/strong>: Trigger a manual forecast download<\/li>\n\n\n\n<li><strong>Check shortcode<\/strong>: Ensure using correct shortcode (e.g., <code>[marine_alerts]<\/code> not <code>[weather_alerts]<\/code> for marine warnings)<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Example Alert Detection<\/h3>\n\n\n\n<p>The parser looks for lines like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...GALE WARNING IN EFFECT THROUGH LATE TONIGHT...\n...SMALL CRAFT ADVISORY UNTIL 8 PM EST...\n...WINTER STORM WATCH FROM FRIDAY EVENING...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Cache Issues<\/h3>\n\n\n\n<p>If forecasts seem outdated:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Delete files in <code>\/wp-content\/wx\/<\/code><\/li>\n\n\n\n<li>Trigger manual update from admin page<\/li>\n\n\n\n<li>Check file timestamps in admin page<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Technical Details<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Update Schedule<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automatic<\/strong>: Every hour via WordPress cron<\/li>\n\n\n\n<li><strong>Manual<\/strong>: Admin page button<\/li>\n\n\n\n<li><strong>Cron job<\/strong>: Can be triggered via <code>wp-cron.php<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Alert Detection Logic<\/h3>\n\n\n\n<p>The parser:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Identifies alert lines (starting with <code>...<\/code>)<\/li>\n\n\n\n<li>Extracts alert text<\/li>\n\n\n\n<li>Categorizes by type (WARNING, WATCH, ADVISORY)<\/li>\n\n\n\n<li>Assigns severity level<\/li>\n\n\n\n<li>Adds appropriate emoji<\/li>\n\n\n\n<li>Stores separately from forecasts<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Performance<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>File-based caching<\/strong>: No database queries<\/li>\n\n\n\n<li><strong>Efficient parsing<\/strong>: Regex-based extraction<\/li>\n\n\n\n<li><strong>Smart updates<\/strong>: Only downloads when scheduled<\/li>\n\n\n\n<li><strong>Minimal overhead<\/strong>: Cached PHP arrays<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>For issues or questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check <code>\/wp-content\/debug.log<\/code> for errors<\/li>\n\n\n\n<li>Verify NOAA URLs are accessible<\/li>\n\n\n\n<li>Ensure <code>\/wp-content\/wx\/<\/code> is writable<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Version<\/h2>\n\n\n\n<p>Current version: 1.0.0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Author<\/h2>\n\n\n\n<p>Rick Xaver, genius<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress plugin for parsing and displaying NOAA weather forecasts with automatic alert detection. Features Installation Alert System The plugin automatically detects and categorizes weather alerts: Alert Types WARNING (\ud83d\udd34 Severe) WATCH (\ud83d\udfe0 High) ADVISORY (\ud83d\udfe1 Moderate) Shortcodes Alert Shortcodes Display weather alerts and warnings: Format Options: Individual Forecast Periods Display a specific forecast period: Index &#8230; <a title=\"Scootercam Weather Verbose Plugin\" class=\"read-more\" href=\"https:\/\/scootercam.net\/blog\/scootercam-verbose\/\" aria-label=\"Read more about Scootercam Weather Verbose Plugin\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[38],"tags":[],"class_list":["post-469","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/posts\/469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/comments?post=469"}],"version-history":[{"count":8,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/posts\/469\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scootercam.net\/blog\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}