PR-o-matic

Published April 27, 2015
Advertisement
Lemma is finally coming to Steam on May 12. Check out the new trailer:



For the first time ever, I shelled out for Adobe Premiere rather than hacking something together in Movie Maker and OpenShot. I didn't use any of the fancy features, but it was worth it just to avoid dealing with crashes all the time. Although it still did crash (it's Adobe after all).

Ashton Morris did a number on the trailer audio. I had something entirely different all ready to go before he came in with something way better.

I've been collecting contact info for some time. I mostly just went through the following lists, pulling out info for people who might be interested in my game:
Video Game Caster lists emails right there on the page. I pulled them out using a jQuery one-liner in the Chrome web console. I noticed a lot of them seemed to be inactive, so I used BeautifulSoup to query each YouTube page and determine when their last two videos were uploaded.

I spent today blasting out emails. I forked over $25 to increase the daily mail quota for a Google Sheets mail merge add-on, only to find out that a) the quota did not actually increase, and b) you can write your own mail merge in about 20 lines of Javascript. What a scam.

In Sheets, just hit Tools -> Script editor. Here's my script, I was blown away by this:[code=js:0]var EMAIL_SENT = "Yes";function onOpen(){ var spreadsheet = SpreadsheetApp.getActive(); var menuItems = [ {name: 'Go', functionName: 'mail_merge'} ]; spreadsheet.addMenu('Mail merge', menuItems);}function mail_merge(){ var draft = GmailApp.getDraftMessages()[0]; var subject = draft.getSubject(); var template_html = draft.getBody(); var template = draft.getPlainBody(); var sheet = SpreadsheetApp.getActiveSheet(); var data = sheet.getDataRange().getValues(); var column_map = {}; for (var i = 0; i < data[0].length; i++) { column_map[data[0]] = i; } for (var i = 1; i < data.length; i++) { var row = data; var email = row[column_map.Email]; if (email) { var sent = row[column_map.Sent]; if (sent != EMAIL_SENT) { var message = template; var message_html = template_html; for (var column in column_map) { message = message.replace('{{' + column + '}}', row[column_map[column]]); message_html = message_html.replace('{{' + column + '}}', row[column_map[column]]); } GmailApp.sendEmail(email, subject, message, { htmlBody: message_html }); Logger.log(email); sheet.getRange(i + 1, column_map.Sent + 1).setValue(EMAIL_SENT); // Make sure the cell is updated right away in case the script is interrupted SpreadsheetApp.flush(); } } }}
It marks rows that have been sent to by putting "Yes" in the "Sent" column. It pulls the email address from the "Email" column. Those are the only two hard-coded values. I wrote the email template as a draft in Gmail. The outgoing messages all appear in your Gmail "sent" folder.

The only downside is that Gmail also has a 100 email per day quota. In my scramble to get these emails out, I had to pay for and set up Google Apps for Work on my domain to increase the quota to 1500 per day. Turns out, the quota still didn't increase, but between my personal Gmail and the Google Apps account, I was able to hit most of my contact list. I'll get the rest tomorrow.

I had no idea PR would be so much fun! It's just like programming!

Just kidding, it's still horrible.

Thanks for reading!
10 likes 1 comments

Comments

Aardvajk
Heh, developer does PR with Javascript :) Best of luck with the launch.
April 28, 2015 03:58 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement