bettergov / foiamail Goto Github PK
View Code? Open in Web Editor NEWyet another foia automation service
License: MIT License
yet another foia automation service
License: MIT License
I forgot to init_labels before init_msg, leading to a couple hours of manual fixing. Let's protect against these sorts of brain farts.
Either:
See response report script
Mainly Sheets, but check other APIs too.
See auth.auth.test_cred
include some screenshots or something
Right now when shipping attachments, the app only publishes to Google Drive attachments on the whitelist.
Let's switch to using a blacklist of common image file formats.
confirmed
work this into msg.compose.distribute so you can follow a two-step process:
And maybe reorganize the readme
make a list of unsent agencies and try again
Google Doc? Email draft? These both seem like better options to me than a local file.
See alsip
typographical bug prevented NA from returning as an agency status
todo: verify contacts load correctly
(see race condition described in issue #18 )
Adding new contacts mid-project would not generate corresponding labels.
See MK/JG emails 10/31/19
Maybe init labels as contacts are loaded (currently via UI) or as drafts are prepped to ensure labels and agencies stay in sync.
Alternatively, quick fix could involve re-running init_labels(). (Untested)
I'm working on building a similar (but not identical) project to this one and came across this line in the get_cred
method of the auth.py
script:
if ... sorted([x for x in credentials.scopes]) != sorted([x for x in scopes]):
# create credentials
Is there a compelling reason to mandate that the list of scopes in the auth.py
file be exactly the same as the list of scopes you have permission for?
Changing this line to
if ... not credentials.has_scopes(scopes)
should take care of this if you only want to make sure that you have all of the permissions you need.
Currently, loads into Other Contacts in GMail interface
Verify this is does not block get_contacts()
todo automate
fixed in 7971e4d
So there's a place to save the response report buffer file
make sure that none of the new contacts are
and add this to the user manual
e.g. Deerfield Library, East Dundee
confirmed
xlsm, ods, xlt
and what about the handful that have no extension?
also, why didn't these attachments ship?
https://mail.google.com/mail/u/0/#inbox/162bfcca6867e702
https://mail.google.com/mail/u/0/#inbox/162bfcc995288a7e (note there's no ext on the xls file)
see the rest of "done" agencies in response report
confirmed
HttpError: <HttpError 429 when requesting https://www.googleapis.com/gmail/v1/users/me/labels?alt=json returned "User-rate limit exceeded. Retry after 2018-04-27T17:20:36.724Z">
The error hits on labels but it appears the root issue is greedy gmail.users.threads.list
TODO: optimize threads.list calls
see mgr.py line 16 (TODO: fix)
So far, only seems to affect attachment collection for a small number of agencies, e.g.
skipping Troy FPD
Governor's State University failed <HttpError 400 when requesting https://www.googleapis.com/drive/v3/files?q=name%3D%27Governor%27s+State+University%27&alt=json returned "Invalid Value">
skipping DeWitt County
TODO: fix
Conversely, kick this process over to the UI and skip the step in CLI.
TODO: Ask Patrick and Jared.
for things like file paths, subject lines, etc.
msg.compose.distribute assumes that we've created drafts using prep_agency_drafts. Decouple these so that we aren't forced to create drafts to send them.
If necessary (low priority)
e.g.., test contacts may get returned even after deleted and replaced
TODO: document this or find a code workaround
e.g. contacts
TODO: remove hardcoded parameters if possible, or else start a global config file to assign that
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.