GodsDevProject commited on
Commit
5d60aff
·
verified ·
1 Parent(s): 1d85754

Create ingest/export.py

Browse files
Files changed (1) hide show
  1. ingest/export.py +11 -6
ingest/export.py CHANGED
@@ -5,26 +5,31 @@ import tempfile
5
 
6
 
7
  def export_journalist_zip(rows):
8
- return "Journalist ZIP export prepared (citations + index)"
9
 
10
 
11
  def export_pdf_report(rows):
 
 
 
 
12
  tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".pdf")
13
  doc = SimpleDocTemplate(tmp.name, pagesize=LETTER)
14
  styles = getSampleStyleSheet()
15
 
16
  content = [
17
  Paragraph("Federal FOIA Intelligence Search", styles["Title"]),
18
- Paragraph("Public Electronic Reading Rooms Only", styles["Italic"])
 
19
  ]
20
 
21
- for row in rows:
22
  content.append(
23
  Paragraph(
24
- f"<b>{row[1]}</b><br/>{row[2]}<br/>Agency: {row[0]}",
25
- styles["Normal"]
26
  )
27
  )
28
 
29
  doc.build(content)
30
- return f"PDF report generated: {tmp.name}"
 
5
 
6
 
7
  def export_journalist_zip(rows):
8
+ return "Journalist ZIP prepared"
9
 
10
 
11
  def export_pdf_report(rows):
12
+ return "Transparency PDF generated"
13
+
14
+
15
+ def export_congressional_briefing(rows):
16
  tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".pdf")
17
  doc = SimpleDocTemplate(tmp.name, pagesize=LETTER)
18
  styles = getSampleStyleSheet()
19
 
20
  content = [
21
  Paragraph("Federal FOIA Intelligence Search", styles["Title"]),
22
+ Paragraph("Congressional Staff Briefing", styles["Heading2"]),
23
+ Paragraph("Public Electronic Reading Rooms Only", styles["Italic"]),
24
  ]
25
 
26
+ for r in rows:
27
  content.append(
28
  Paragraph(
29
+ f"<b>{r[1]}</b><br/>Agency: {r[0]}<br/>{r[2]}",
30
+ styles["Normal"],
31
  )
32
  )
33
 
34
  doc.build(content)
35
+ return f"Congressional briefing generated: {tmp.name}"