GodsDevProject commited on
Commit
bc517db
·
verified ·
1 Parent(s): 88900ac

Create citations.py

Browse files
Files changed (1) hide show
  1. citations.py +11 -8
citations.py CHANGED
@@ -1,11 +1,14 @@
1
  from datetime import datetime
2
 
3
- def cite(result: dict) -> str:
4
- accessed = datetime.utcnow().strftime("%Y-%m-%d")
5
  return (
6
- f"> **Source:** {result['source']}\n"
7
- f"> **Title:** {result['title']}\n"
8
- f"> **URL:** {result['url']}\n"
9
- f"> **Accessed:** {accessed}\n"
10
- f"> **Mode:** {'Extended' if result.get('extended') else 'Standard'}"
11
- )
 
 
 
 
 
1
  from datetime import datetime
2
 
3
+ def bluebook_exhibit(r, exhibit_no):
 
4
  return (
5
+ f"Exhibit A-{exhibit_no}. {r['agency']}, "
6
+ f"{r['title']}, FOIA Electronic Reading Room, "
7
+ f"{r['url']} (retrieved {datetime.utcnow().strftime('%b %d, %Y')})."
8
+ )
9
+
10
+ def table_of_authorities(results):
11
+ return [
12
+ f"Exhibit A-{i+1}: {r['agency']} — {r['title']}"
13
+ for i, r in enumerate(results)
14
+ ]