Spaces:
Sleeping
Sleeping
Create pacer_naming.py
Browse files- pacer_naming.py +10 -0
pacer_naming.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def pacer_filename(exhibit_no, agency, title, circuit="GEN"):
|
| 2 |
+
"""
|
| 3 |
+
PACER-friendly filename:
|
| 4 |
+
Ex_01_CIA_AATIP_Memo.pdf
|
| 5 |
+
"""
|
| 6 |
+
safe_title = "".join(
|
| 7 |
+
c for c in title if c.isalnum() or c in (" ", "_")
|
| 8 |
+
).strip().replace(" ", "_")[:60]
|
| 9 |
+
|
| 10 |
+
return f"Ex_{exhibit_no:02d}_{agency}_{safe_title}.pdf"
|