Skip to content

Instantly share code, notes, and snippets.

@andrewapperley
Forked from creaoy/extract-testflight.js
Last active April 19, 2016 12:57
Show Gist options
  • Save andrewapperley/9bee3fc321705ac6a4f8 to your computer and use it in GitHub Desktop.
Save andrewapperley/9bee3fc321705ac6a4f8 to your computer and use it in GitHub Desktop.
Extract TestFlight user email addresses from iTunes Connect
var text = '';
$('.col-email').each(function(index,el) {
if (index == 0) {
text = 'Email, First Name, Last Name, Status\n';
}
else {
//Email
text = text + $.trim($(el).find("a").text()) + ',';
//First Name
text = text + $.trim($($($($('.col-name')[index]).find("span")[0]).find("span")[0]).text()) + ',';
//Last Name
text = text + $.trim($($($($('.col-name')[index]).find("span")[0]).find("span")[1]).text()) + ',';
//Status and Date
text = text + $.trim($($($($('.col-status')[index]).find("div")[0]).find("span")[0]).text()) + ' ' + $.trim($($($($('.col-status')[index]).find("div")[1]).find("span")[0]).text()) + ',' + '\n';
}
});
var a = document.createElement("a");
var file = new Blob([text], {type: 'text/csv'});
a.href = URL.createObjectURL(file);
a.download = new Date() + ".csv";
a.click();
@andrewapperley
Copy link
Author

Updated to include status

@andrewapperley
Copy link
Author

Updated to include CSV file extension as Windows doesn't imply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment