GodsDevProject commited on
Commit
79aba7d
·
verified ·
1 Parent(s): 146e93e

Create reports/litigation_appendix.py

Browse files
Files changed (1) hide show
  1. reports/litigation_appendix.py +21 -0
reports/litigation_appendix.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from reportlab.platypus import Paragraph
2
+ from reportlab.lib.styles import getSampleStyleSheet
3
+
4
+ def build_litigation_appendix(results):
5
+ styles = getSampleStyleSheet()
6
+ content = []
7
+
8
+ content.append(Paragraph("FOIA Litigation Appendix", styles["Title"]))
9
+
10
+ for i, r in enumerate(results, 1):
11
+ content.append(
12
+ Paragraph(
13
+ f"<b>Exhibit {i}</b><br/>"
14
+ f"Agency: {r['source']}<br/>"
15
+ f"Title: {r['title']}<br/>"
16
+ f"FOIA Exemptions: {', '.join(r.get('exemptions', []))}<br/>"
17
+ f"Citation: {r['citation']}",
18
+ styles["Normal"],
19
+ )
20
+ )
21
+ return content