aboutsummaryrefslogtreecommitdiff
path: root/bom.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-10-03 01:14:51 +1100
committerYuchen Pei <id@ypei.org>2023-10-03 01:14:51 +1100
commit4bfd3e011fabf486882174aaf86f462533877b22 (patch)
tree29049bb0585c4e4c9df141e244f0e19dc88a5580 /bom.el
parent79f45b51f74b2c8828bdc0d025b7253293054c76 (diff)
Add ways to deploy
Diffstat (limited to 'bom.el')
-rw-r--r--bom.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/bom.el b/bom.el
index eedc5ca..e818983 100644
--- a/bom.el
+++ b/bom.el
@@ -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)