Skip to content

Commit

Permalink
Implement S3 upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hancush committed Oct 22, 2021
1 parent a030db0 commit 5c5735e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
SHELL := /bin/bash
ATTACHMENTS := $(shell python scripts/download_attachments.py)

clean :
find attachments -type f -not -name .gitkeep -delete
find merged -type f -not -name .gitkeep -delete

upload_% : merged/%.pdf
aws s3
aws s3 cp $< s3://$$S3_BUCKET_NAME

merged/%.pdf : $(addsuffix .pdf,$(basename $(ATTACHMENTS)))
pdfunite $^ $@
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ services:
volumes:
- .:/app
environment:
S3_BUCKET_NAME: datamade-metro-pdf-merger-testing
attachment_links: '["https://metro.legistar.com/ViewReport.ashx?M=R&N=TextL5&GID=557&ID=7916&GUID=LATEST&Title=Board+Report", "http://metro.legistar1.com/metro/attachments/d368424c-b80c-4f9a-aa1d-d353194ee733.pdf", "http://metro.legistar1.com/metro/attachments/f4031730-38c1-48a3-a789-09a3f5c5862a.pdf", "http://metro.legistar1.com/metro/attachments/53d3670b-3aa3-4823-ac17-51e032395641.pdf", "http://metro.legistar1.com/metro/attachments/53985307-4ce2-4688-83e0-42c4c7a17f0e.pdf", "http://metro.legistar1.com/metro/attachments/c96860a8-a26d-4022-9b6c-ca010c3d165e.docx"]'
command: make merged/2021-0530.pdf
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
awscli
scrapelib

0 comments on commit 5c5735e

Please sign in to comment.