-
-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathmkimp.pl
32 lines (28 loc) · 867 Bytes
/
mkimp.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl
# generate files to test import
## CSV import
open F,">testimport-csv.txt";
print F "email\tName\tAddr1\tAddr2\tTown\tPostcode\tforeign key\tsend this user HTML emails\n";
$start = 20;
$num = 50000;
for ($i=$start;$i<$start+$num;$i++) {
print F "$i\@mailinator.com\tTestUser $i\tAddr line 1\tAddr line2\tTown\tPostcode $i\tABC $i\t1\n";
}
close(F);
# Plain list of emails import
open F,">testimport-plain.txt";
$start = 0;
for ($i=$start;$i<$start+$num;$i++) {
print F "importtest-$i\@mailinator.com\n";
}
close(F);
open F,">testimport-admin.txt";
print F "email\tloginname\tpassword\tFirst Name\tLast Name\n";
$start = 20;
$num = 100;
for ($i=$start;$i<$start+$num;$i++) {
$pass = `pwgen -1`;
chomp($pass);
print F "$i\@reallynonexistentdomain.com\tTest Admin $i\t$pass\tTest admin First Name $i\tTest admin Last name$i\n";
}
close(F);