Spaces:
Runtime error
Runtime error
Update pdftotext.py
Browse files- pdftotext.py +9 -8
pdftotext.py
CHANGED
|
@@ -127,17 +127,18 @@ def texts_from_pdf(pdfshareablelinks, heading_to_search):
|
|
| 127 |
|
| 128 |
|
| 129 |
def apiFiltering(apitext):
|
|
|
|
|
|
|
|
|
|
| 130 |
for item in apitext:
|
| 131 |
project_template_details = item.get('projecttemplatedetails', [])
|
| 132 |
for detail in project_template_details:
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
# import fitz
|
| 142 |
|
| 143 |
# import tsadropboxretrieval
|
|
|
|
| 127 |
|
| 128 |
|
| 129 |
def apiFiltering(apitext):
|
| 130 |
+
|
| 131 |
+
filtered_items = []
|
| 132 |
+
|
| 133 |
for item in apitext:
|
| 134 |
project_template_details = item.get('projecttemplatedetails', [])
|
| 135 |
for detail in project_template_details:
|
| 136 |
+
filtered_items.append({
|
| 137 |
+
"id": detail.get('id'),
|
| 138 |
+
"projecttemplateid": detail.get('projecttemplateid'),
|
| 139 |
+
"bqcode": detail.get('bqcodelibrary', {}).get('bqcode')
|
| 140 |
+
})
|
| 141 |
+
return filtered_items
|
|
|
|
|
|
|
| 142 |
# import fitz
|
| 143 |
|
| 144 |
# import tsadropboxretrieval
|