From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: [metar.el] NOAA resource has moved Date: Tue, 27 Sep 2016 13:51:28 -0400 Message-ID: <20160927175128.GA14560@holos.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1474998754 19478 195.159.176.226 (27 Sep 2016 17:52:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2016 17:52:34 +0000 (UTC) User-Agent: Mutt/1.7+23 (87911ba95dae) (2016-08-17) Cc: Mario Lang To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 27 19:52:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bowYD-0003CA-U6 for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2016 19:52:18 +0200 Original-Received: from localhost ([::1]:52660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bowYC-0002tG-Di for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2016 13:52:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bowXY-0002t9-Gc for emacs-devel@gnu.org; Tue, 27 Sep 2016 13:51:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bowXT-0001lA-3I for emacs-devel@gnu.org; Tue, 27 Sep 2016 13:51:35 -0400 Original-Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:36849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bowXS-0001l1-W8 for emacs-devel@gnu.org; Tue, 27 Sep 2016 13:51:31 -0400 Original-Received: by mail-qt0-x241.google.com with SMTP id 11so617925qtc.3 for ; Tue, 27 Sep 2016 10:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=mWvQPniaSln2w+RY3tUHk7XwNHobRNlvCBEQBLwczxA=; b=MsqvZ6qmjHotIWoIoazbKOEwKgSCBAh9VIvfzmJOLpF3JQW4QkloRL7pLVI3KH1b3w 0xKctafAIWMLPP1kXIMppRAtvXj3iRqy7DJBjx5KGP0TY6EVTXOrY+aHa4pJw2iGfMob g7VXIEKu9rM7qKXHh2milaCIspX9zA9d2P3APQMn+slq+hlP0ancfgCRX9kzVd+0yAUg yXynJQlPQ9CpYAbthS7rsCLVc5m2QXeyfshB3QsfB8vkJJtSSIaSGt+ZVH/s/ElFQ4wQ CGkCIFCasDWTLWMikjmJwnTX+jTuHf9iRcFHCo8A6DbTdigivUZWsCIMrevjJIcS2sxm /COA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=mWvQPniaSln2w+RY3tUHk7XwNHobRNlvCBEQBLwczxA=; b=UMjM9h3njG+bvrme81bkovAlnVe59NJ+t3Ar2NTtW1meDY7IufEe27lWHMRbWnPcbt h91/OgflByRgx50iv34opvp4bGHqsh4PHR/PzN9BM0bMYP8IOA4ToLYLe7LTNvSf/3dX X5zxsQJROSa2JgVk58hnvUes3rY/xN4brE/oX5cEcSrupVjJqRpz46zXN+ZRzPOO4e24 0976w+BIw3vabpbI6sWVgMw4TSuMAfvq/Ifcgxptv+Mjz+TGjMJHFVNrhBvv4CLy/+TH zuBXqmY4iX+o6FlkyVFLTy7WLBH7CokMJrbiT3wzmMR6SCpRfTJr3rHfXgNFjUlo2oi0 /F8g== X-Gm-Message-State: AA6/9Rmhw3NsH7do+fa7HE5Tw9Wq0aV6NX8Tyhl5TCGnZhefbvOnBs95VBlTERpxDaqPyziO X-Received: by 10.200.56.250 with SMTP id g55mr28976875qtc.140.1474998690286; Tue, 27 Sep 2016 10:51:30 -0700 (PDT) Original-Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id y37sm1784339qta.22.2016.09.27.10.51.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2016 10:51:29 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 7DFA2658C5; Tue, 27 Sep 2016 13:51:28 -0400 (EDT) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::241 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207840 Archived-At: Hi, The resources for weather data have moved from to . Also, nsd_bbsss.txt doesn't appear to exist anymore, and the format of nsd_cccc.txt is apparently slightly different. The following patch fixes the aforementioned, AFAICT diff -u /home/mvo/downloads/metar.el /home/mvo/.emacs.d/elpa/metar-0.2/metar.el --- /home/mvo/downloads/metar.el 2016-09-27 13:26:33.722294223 -0400 +++ /home/mvo/.emacs.d/elpa/metar-0.2/metar.el 2016-09-27 13:27:37.442802035 -0400 @@ -83,7 +83,7 @@ (const :tag "Degree Kelvin" degK) (const :tag "Degree Fahrenheit" degF))))) -(defcustom metar-stations-info-url "http://weather.noaa.gov/data/nsd_bbsss.txt" +(defcustom metar-stations-info-url "http://tgftp.nws.noaa.gov/data/nsd_cccc.txt" "URL to use for retrieving station meta information." :group 'metar :type 'string) @@ -117,23 +117,21 @@ (split-string entry ";")) (split-string (buffer-string) "\n"))))) (setq metar-stations nil) - (while data - (when (and (nth 7 (car data)) (nth 8 (car data)) - (not (string= (nth 2 (car data)) "----"))) + (dolist (entry data) + (when (and (nth 7 entry) (nth 8 entry) + (not (string= (nth 0 entry) "----"))) (setq metar-stations (append - (let ((item (car data))) - (list - (list (cons 'code (nth 2 item)) - (cons 'name (nth 3 item)) - (cons 'country (nth 5 item)) - (cons 'latitude - (metar-station-convert-dms-to-deg (nth 7 item))) - (cons 'longitude - (metar-station-convert-dms-to-deg (nth 8 item))) - (cons 'altitude (string-to-number (nth 12 item)))))) - metar-stations))) - (setq data (cdr data))) + (list + (list (cons 'code (nth 0 entry)) + (cons 'name (nth 3 entry)) + (cons 'country (nth 5 entry)) + (cons 'latitude + (metar-station-convert-dms-to-deg (nth 7 entry))) + (cons 'longitude + (metar-station-convert-dms-to-deg (nth 8 entry))) + (cons 'altitude (string-to-number (nth 11 entry))))) + metar-stations)))) ;; (unless metar-timer ;; (setq metar-timer ;; (run-with-timer 600 nil (lambda () (setq metar-stations nil))))) @@ -281,7 +279,7 @@ pure)))) (defcustom metar-url - "http://weather.noaa.gov/pub/data/observations/metar/stations/%s.TXT" + "http://tgftp.nws.noaa.gov/data/observations/metar/stations/%s.TXT" "URL used to fetch station specific information. %s is replaced with the 4 letter station code." :group 'metar