-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from JGreenlee/admin-emails
Update admin emails, add `find_emails` script
- Loading branch information
Showing
5 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
.DS_Store | ||
.vscode/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"start_month": "06", | ||
"start_year": "2023", | ||
"mode_studied": "e-bike", | ||
"program_admin_contact": "Elijah Fenton: [email protected]. 4CORE office: 970-259-1916.", | ||
"program_admin_contact": "4CORE office: 970-259-1916.", | ||
"deployment_partner_name": "Four Corners Office for Resource Efficiency (4CORE)", | ||
"translated_text": { | ||
"en": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ | |
"trip_end_notification": false | ||
}, | ||
"admin_dashboard": { | ||
"admin_access": ["[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"], | ||
"admin_access": ["[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"], | ||
"overview_users": true, | ||
"overview_active_users": true, | ||
"overview_trips": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ | |
"trip_end_notification": false | ||
}, | ||
"admin_dashboard": { | ||
"admin_access": ["[email protected]", "[email protected]", "sebastian.barry@nrel.gov", "[email protected]", "Kosol.Kiatreungwattana@nrel.gov", "Dustin.Weigl@nrel.gov", "[email protected]", "[email protected]", "[email protected]"], | ||
"admin_access": ["[email protected]", "[email protected]", "Jack.Greenlee@nrel.gov", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"], | ||
"overview_users": true, | ||
"overview_active_users": true, | ||
"overview_trips": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# prints a comma-separated list of all email addresses found in the program configs | ||
|
||
import os | ||
import re | ||
|
||
# get a list of all programs from the configs directory | ||
programs = os.listdir('configs') | ||
|
||
# or, specify programs manually: | ||
# programs = [ | ||
# 'denver-casr.nrel-op.json', | ||
# 'nrel-commute.nrel-op.json', | ||
# 'open-access.nrel-op.json', | ||
# 'ride2own.nrel-op.json', | ||
# 'smart-commute-ebike.nrel-op.json', | ||
# # ... | ||
# ] | ||
|
||
print('Checking %d programs for email addresses...\n' % len(programs)) | ||
|
||
emails = [] | ||
for program in programs: | ||
with open('configs/'+program, 'r') as f: | ||
emails_for_program = re.findall(r'[\w.+-]+@[\w-]+\.[\w.-]+', f.read()) | ||
emails_for_program = [e.rstrip(' .,') for e in emails_for_program] | ||
print(program + ' has emails: ' + str(emails_for_program)) | ||
emails.extend(emails_for_program) | ||
|
||
emails = list(set([e.lower() for e in emails])) | ||
print('\nIn total, found ' + str(len(emails)) + ' emails:') | ||
print(', '.join(emails)) |