diff options
author | Yuchen Pei <id@ypei.org> | 2023-10-03 01:14:51 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2023-10-03 01:14:51 +1100 |
commit | 4bfd3e011fabf486882174aaf86f462533877b22 (patch) | |
tree | 29049bb0585c4e4c9df141e244f0e19dc88a5580 /bom.el | |
parent | 79f45b51f74b2c8828bdc0d025b7253293054c76 (diff) |
Add ways to deploy
Diffstat (limited to 'bom.el')
-rw-r--r-- | bom.el | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -29,6 +29,7 @@ (require 'hierarchy) (require 'web-server) +(require 'ox-publish) (defvar bom-state-files '((act . "IDN11060") @@ -44,10 +45,11 @@ (defun bom-api (state) "Get weather forecast data of STATE from the BOM FTP." (if-let ((filename (alist-get (intern (downcase state)) bom-state-files))) - (with-current-buffer - (find-file-noselect - (format "/ftp:anonymous@ftp.bom.gov.au:/anon/gen/fwo/%s.xml" filename)) - (libxml-parse-xml-region (point-min) (point-max))) + (progn + (with-current-buffer + (find-file-noselect + (format "/ftp:anonymous@ftp.bom.gov.au:/anon/gen/fwo/%s.xml" filename)) + (libxml-parse-xml-region (point-min) (point-max)))) (user-error "State %s not found" state))) (defun bom-get-areas (resp) |