dirs = sorted([os.path.basename(d) for d in glob.glob('%s/*' % papers_dir) if os.path.isdir(d) and not any(e in d for e in excludes)]) ########NEW FILE######## __FILENAME__ = mail_authors #!/usr/bin/env python import _mailer as mailer args = mailer.parse_args() config = mailer.load_config('email.json') for author in config['authors']: to = mailer.email_addr_from(author) mailer.send_template(config['sender'], to, args.template, config) print "Mail for %d authors." % len(config['authors']) ########NEW FILE######## __FILENAME__ = mail_reviewers #!/usr/bin/env python import _mailer as mailer import os from conf import work_dir args = mailer.parse_args() config = mailer.load_config('email.json')
args = mailer.parse_args() config = mailer.load_config('email.json') for reviewer_info in config['reviewers']: for p in reviewer_info['papers']: if not os.path.isdir(os.path.join(work_dir, '../papers/', p)): raise RuntimeError( "Paper %s not found..refusing to generate emails." % p) for reviewer_info in config['reviewers']: reviewer_config = config.copy() reviewer_config.update(reviewer_info) reviewer = reviewer_info['email'] to = mailer.email_addr_from(reviewer_info) mailer.send_template(config['sender'], to + ', ' + config['cced'], 'reviewer-invite.txt', reviewer_config) # Generate a summary of emails sent paper_reviewers = {} for reviewer_info in config['reviewers']: for paper in reviewer_info['papers']: d = paper_reviewers.setdefault(paper, []) d.append(reviewer_info['name']) for paper in paper_reviewers: print "%s:" % paper for reviewer in paper_reviewers[paper]: print "->", reviewer print
#!/usr/bin/env python import _mailer as mailer args = mailer.parse_args() config = mailer.load_config('email.json') for author in config['authors']: to = mailer.email_addr_from(author) mailer.send_template(config['sender'], to, args.template, config) print "Mail for %d authors." % len(config['authors'])
#!/usr/bin/env python import _mailer as mailer args = mailer.parse_args() config = mailer.load_config('email.json') infile = open("data/esp2015_speakers.csv") authors = [] for line in infile: authors.append({"email": line.split(";")[1], "name": line.split(";")[0].decode("utf8"), "title": line.split(";")[2].strip()}) config["authors"] = authors for author_info in config['authors']: author_config = config.copy() author_config.update(author_info) author = author_info['email'] to = mailer.email_addr_from(author_info) mailer.send_template(config['sender'], to + ', ' + config['cced'], 'invite_authors_submission.txt', author_config) print "Mail for %d authors." % len(config['authors'])
#!/usr/bin/env python import os import _mailer as mailer from conf import work_dir, toc_conf, proc_conf import options args = mailer.parse_args() scipy_proc = options.cfg2dict(proc_conf) toc = options.cfg2dict(toc_conf) sender = scipy_proc['proceedings']['xref']['depositor_email'] template = 'doi-notification.txt' template_data = scipy_proc.copy() template_data['proceedings']['editor_email'] = ', '.join( template_data['proceedings']['editor_email']) for paper in toc['toc']: template_data.update(paper) recipients = ','.join(template_data['author_email']) template_data['author'] = mailer.author_greeting(template_data['author']) template_data['author_email'] = ', '.join(template_data['author_email']) template_data['committee'] = '\n '.join( template_data['proceedings']['editor']) mailer.send_template(sender, recipients, template, template_data)
#!/usr/bin/env python import os import _mailer as mailer from conf import work_dir, toc_conf, proc_conf import options args = mailer.parse_args() scipy_proc = options.cfg2dict(proc_conf) toc = options.cfg2dict(toc_conf) sender = scipy_proc['proceedings']['xref']['depositor_email'] template = 'doi-notification.txt' template_data = scipy_proc.copy() template_data['proceedings']['editor_email'] = ', '.join(template_data['proceedings']['editor_email']) for paper in toc['toc']: template_data.update(paper) recipients = ','.join(template_data['author_email']) template_data['author'] = mailer.author_greeting(template_data['author']) template_data['author_email'] = ', '.join(template_data['author_email']) template_data['committee'] = '\n '.join(template_data['proceedings']['editor']) mailer.send_template(sender, recipients, template, template_data)