77ignore_things = ['lib' , 'assets' , 'README.md' , 'badge' ]
88ignore_prefixes = ['.' , '_' ]
99sep = "\n \n ---\n \n "
10- auto_minutes_path = "auto-minutes/minutes /"
10+ auto_minutes_path = "auto-minutes/output /"
1111wgname = "httpbis"
1212
13+ summary_header = """
14+ # Meeting Summary
15+
16+ **NOTE**: this is a non-normative, AI-generated summary supplied only for convenience; it does not necessarily represent an accurate record of the meeting. See the minutes for the authoriative record.
17+ """
18+
1319def spider (directory , reverse = False ):
1420 index = []
1521 sys .stderr .write (f"* scanning { directory } ...\n " )
@@ -27,13 +33,6 @@ def spider(directory, reverse=False):
2733 extra .append (f"[agenda]({ dir_ .name } /agenda.md)" )
2834 if path .exists (f"{ dir_ .path } /minutes.md" ):
2935 extra .append (f"[minutes]({ dir_ .name } /minutes.md)" )
30- if path .exists (f"{ auto_minutes_path } /{ dir_ .name } /{ wgname } .txt" ):
31- if not path .exists (f"{ dir_ .name } /summary.md" ):
32- shutil .copyfile (
33- f"{ auto_minutes_path } /{ dir_ .name } /{ wgname } .txt" ,
34- f"{ dir_ .name } /summary.md"
35- )
36- extra .append (f"[summary]({ dir_ .name } /summary.md)" )
3736 extra_str = ""
3837 if extra :
3938 extra_str = f": { ', ' .join (extra )} "
@@ -45,6 +44,25 @@ def spider(directory, reverse=False):
4544 for dir_ in dirs :
4645 spider (path .join (directory , dir_ .name ))
4746
47+ def fetch_summary (meeting ):
48+ if path .exists (f"{ auto_minutes_path } /{ meeting } /.manifest.json" ):
49+ summary = [summary_header ]
50+ manifest = json .load (f"{ auto_minutes_path } /{ meeting } /.manifest.json" )
51+ sessions = [s .sessionId for s in manifest .sessionGroups
52+ if s ["sessionName" ] = wgname .upper ()]
53+ for session_id in sessions :
54+ session_time = "-" .join (session_id .rsplit ("-" , 2 )[- 2 :])
55+ summary .append (f"# Session: { session_time } " )
56+ with fh as os .open (f"{ auto_minutes_path } /{ session_id } " , "r" ):
57+ session_md = fh .read ()
58+ session_md = session_md .replace (f"# { wgname .upper ()} " , "" )
59+ summary .append (session_md )
60+ summary_md = "\n \n " .join (summary )
61+ with open (f"{ dir_ .name } /summary.md" , 'w' ) as fh :
62+ fh .write (summary_md )
63+ return f"[summary]({ dir_ .name } /summary.md)"
64+ return None
65+
4866def filter_thing (thing ):
4967 if thing .name in ignore_things : return False
5068 for ignore in ignore_prefixes :
0 commit comments