From afb517649659b305aaf6e0e2e501d4f350e38195 Mon Sep 17 00:00:00 2001 From: Brian E Carpenter Date: Sun, 21 May 2023 16:58:12 +1200 Subject: [PATCH] Download RFC index if needed Now it's really a complete version, done for today. --- utilities/RFCbib6.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/utilities/RFCbib6.py b/utilities/RFCbib6.py index d7edb90..31ecb8f 100644 --- a/utilities/RFCbib6.py +++ b/utilities/RFCbib6.py @@ -3,7 +3,7 @@ """Build IPv6 RFC bibliography""" -# Version: 2023-05-21 - original +# Version: 2023-05-23 - original ######################################################## @@ -181,7 +181,16 @@ showinfo(title=T, try: whole = rf("C:/brian/docs/IETF stuff/rfc/rfc-index.xml") except: - crash("rfc-index.xml not found") + try: + if askyesno(title=T, message = "OK to download RFC index?/n(15 MB temp file)"): + import urllib.request + urllib.request.urlretrieve("http://www.rfc-editor.org/rfc/rfc-index.xml", "tempRx.xml") + whole = rf("tempRx.xml") + os.remove("tempRx.xml") + else: + crash("Cannot run without RFC index") + except: + crash("rfc-index.xml not found") timestamp = time.strftime("%Y-%m-%d %H:%M:%S UTC%z",time.localtime())