\n" % (var, os.environ[var])) def get_mnum(str, page, default): if str and "." in str: name, ext = str.rsplit(".",1) if name.startswith("%s-"%page): prefix, num, rest = name.split("-", 2) else: num = name[len(page):] return num else: return default content = "" item = "" if dirlist: item = args.get("item") if not item: # Handle urls of the form /wg/wgname/agenda.pyht/64 num = os.environ["PATH_TRANSLATED"].replace(filename, "")[1:] if num: for item in [ "%s%s.html" % (page, num), "%s%s.txt " % (page, num), "%s-%s-%s.html" % (page, num, wg), "%s-%s-%s.txt" % (page, num, wg) ]: if item in dirlist: break if not item: item = dirlist[-1] out("\n" % (item, )) if get_mnum(item, page, current_meeting) != current_meeting: item = "" if item: try: if item[-5:] == ".html" or item[-4:] == ".htm": file = open(item) else: file = urllib.urlopen("https://tools.ietf.org/tools/rfcmarkup/rfcmarkup.cgi?blurb=0&url=%s/%s" % (urlpath, item)) content = file.read() content = re.sub("(?i)<(!DOCTYPE|/?html|/?body)[^>]*>\n*", "", content) content = re.sub("(?si).*\n*", "", content) if re.search("

'%s %s

\n" % (num, page)) out(content) else: num = num or current_meeting out("""

IETF-%s %s %s

\n""" % (num, wg, page)) meetingmeta = get_meta(wg, num) if content: materialslist = "/www/tools.ietf.org/agenda/%s/slides/slides-%s-%s.html" % (num, num, wg) if not os.path.exists(materialslist): materialslist = "/www/tools.ietf.org/agenda/%s/slides/slides-%s.html" % (num, wg) if os.path.exists(materialslist): out("

Slides

\n These are also available from the materials page:
\n" % (num,wg)) for line in filetext(materialslist).splitlines(): slide_link = re.sub('href="[^"]+/slides/([^"]+)"', 'href="/agenda/%s/slides/\g<1>"'%(num,), line) slide_match = re.search('href="[^"]+/slides/([^"]+)"', line) if slide_match: slide_name = slide_match.group(1) base, ext = os.path.splitext(slide_name) if ext in [ ".ppt", ".pptx", ]: pdf_file = "/www/tools.ietf.org/agenda/%s/slides/%s.pdf" % (num, base) if os.path.exists(pdf_file): slide_link = re.sub(slide_name, base+".pdf", slide_link) out(slide_link) out("
\n") out("
\n") for session in meetingmeta["sessions"]: if ("date" in session and "time" in session and "room" in session): out("Session %(date)s %(time)s: %(room)s" % session) if "stream" in session: out(" - Audio stream" % session) if "jabber" in session: out(" - %(wg)s chatroom" % session) out("
") out("
") if os.path.exists("ietf-%(num)s-%(wg)s.ics" % meetingmeta): out("iCal: ietf-%(num)s-%(wg)s.ics
" % meetingmeta) out("
\n") out("

%s

\n" % page.capitalize()) out(content) else: if page == "minutes" and num==current_meeting and os.path.exists("agenda-%s-%s.html"%(num,wg)) and "roomid" in meetingmeta: # take the roomid from the stream name. Get rid of the extension, and take the last digit of the stream name. if int(num) >= 87: port = "9000" elif "roomid" in meta: port = "900%s" % meta["roomid"] if int(num) < 104: server = "etherpad.tools.ietf.org" else: server = "etherpad.ietf.org" out("""There are no %(wg)s minutes from IETF-%(num)s yet, but an interactive document which supports collaborative editing is provided below, for note-taking during the meeting. This will be replaced by the meeting minutes when they have been submitted.
\n
\n You can open the document without embedding if you prefer that over the embedded version below.
\n
\n""" % {"num":num, "wg":wg, "port":port, "server":server}) out("""