Skip to content

Commit

Permalink
Merge pull request #63 from geekygirldawn/csv_format
Browse files Browse the repository at this point in the history
changed csv output from comma separated to semicolon separated
  • Loading branch information
jberkus authored Jun 24, 2022
2 parents 7c73d4b + f7d7227 commit 4fff346
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/elekto_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
it attempts to find an email address from the most recent commit. If the
email contains the string 'noreply' it is not written to the csv file.
As output, a csv file of this format containing comma separated email addresses
is created:
As output, a csv file of this format containing semicolon separated email addresses
is created (semincolon separated allows for easy copy / paste into your email client):
elekto_emails_YYYYMMDD.csv
Each email address found is printed to the screen as a way to indicate progress,
Expand Down Expand Up @@ -215,11 +215,11 @@ def get_email(username, api_token):
today = datetime.today().strftime('%Y-%m-%d')
outfile_name = 'elekto_emails_' + today + '.csv'
f = open(outfile_name,'w')
csv_file = csv.writer(f)
csv_file = csv.writer(f, delimiter =';')

# Print status and write emails to the csv file.
print("Found emails for", found_count, "out of", len(voter_list), "voters")
print("Your results can be found in", outfile_name)

csv_file.writerow(email_list)
f.close()
f.close()

0 comments on commit 4fff346

Please sign in to comment.