Lucas ARRIESSE
commited on
Commit
·
595613d
1
Parent(s):
f3bf993
Fix
Browse files- api/docs.py +4 -2
api/docs.py
CHANGED
@@ -293,6 +293,8 @@ async def get_meeting_docs(req: GetMeetingDocsRequest, http_client: AsyncClient
|
|
293 |
Downloads the document list dataframe for a given meeting
|
294 |
"""
|
295 |
|
|
|
|
|
296 |
# Extracting WG
|
297 |
working_group = req.working_group
|
298 |
tsg = re.sub(r"\d+", "", working_group)
|
@@ -320,12 +322,12 @@ async def get_meeting_docs(req: GetMeetingDocsRequest, http_client: AsyncClient
|
|
320 |
|
321 |
df = pd.read_excel(str(url + "/" + files[0]).replace("#", "%23"))
|
322 |
filtered_df = df[~(
|
323 |
-
df["Uploaded"].isna())][["TDoc", "Title", "CR category", "Source", "Type", "Agenda item", "Agenda item description", "TDoc Status"]]
|
324 |
filtered_df["URL"] = filtered_df["TDoc"].apply(
|
325 |
lambda tdoc: f"{url}/{tdoc}.zip")
|
326 |
|
327 |
df = filtered_df.fillna("")
|
328 |
-
return GetMeetingDocsResponse(data=df[["TDoc", "Title", "Type", "TDoc Status", "Agenda item description", "URL"]].to_dict(orient="records"))
|
329 |
|
330 |
# ==================================================================================================================================
|
331 |
|
|
|
293 |
Downloads the document list dataframe for a given meeting
|
294 |
"""
|
295 |
|
296 |
+
# FIXME: extract the document URLS from the hyperlinks in the excelsheet using openpyxl?
|
297 |
+
|
298 |
# Extracting WG
|
299 |
working_group = req.working_group
|
300 |
tsg = re.sub(r"\d+", "", working_group)
|
|
|
322 |
|
323 |
df = pd.read_excel(str(url + "/" + files[0]).replace("#", "%23"))
|
324 |
filtered_df = df[~(
|
325 |
+
df["Uploaded"].isna())][["TDoc", "Title", "CR category", "For", "Source", "Type", "Agenda item", "Agenda item description", "TDoc Status"]]
|
326 |
filtered_df["URL"] = filtered_df["TDoc"].apply(
|
327 |
lambda tdoc: f"{url}/{tdoc}.zip")
|
328 |
|
329 |
df = filtered_df.fillna("")
|
330 |
+
return GetMeetingDocsResponse(data=df[["TDoc", "Title", "Type", "For", "TDoc Status", "Agenda item description", "URL"]].to_dict(orient="records"))
|
331 |
|
332 |
# ==================================================================================================================================
|
333 |
|