Skip to content

Commit

Permalink
Add sql query for email
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mao authored Jan 3, 2022
1 parent 8a0eec0 commit 256a381
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions EMAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ to be able to use it. (`add consult` only works when running through bash, for s

Get a list of emails, and convert it to the format as specified by mmblanche's `-f` argument: one email per line. (For example, if you're working with a Google Form, you can get a Google Sheet of responses. Create a new tab -- **not** the tab where form responses are being collected!. Convert it into only one column of values such that all the values are emails -- strip out timestamps, header row, and the like. Then download this as a csv. If you'd like to export emails from our database, you can use a nice interface to download a table as a csv, and work with it.)

If you have a terminal database client, you can instead run a command like `\copy (select email from api_user) to './emails.csv' with csv;`.

Move this file to your Athena locker; you can use `scp` for this (example [here](https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh)).

Finally run mmblanche! For example, `mmblanche [mailman-list-name] -al [path/to/file]`. Likely you'll want to use `-al`, as it simply adds any emails in the file to the list, skips over duplicates for you, and doesn't delete anything otherwise.
Expand Down

0 comments on commit 256a381

Please sign in to comment.