#!/usr/bin/python3 # Copyright 2020 Jamie McClelland # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # GPL import requests import random names1 = requests.get('http://names.drycodes.com/75?nameOptions=girl_names').json() names2 = requests.get('http://names.drycodes.com/75?nameOptions=boy_names').json() names2.extend(names1) random.shuffle(names1) street_number = 2400 street_name = 'Wallingford Rd' city = 'Winston Salem' state = 'NC' postal_code = '27101' index = 0 user = 1 print("User | Name | Address | Phone | Email ") print("----|------|------|------|-----") for name in names2: name_parts = name.split('_') if index % 5 == 0: user = user + 1 index = index + 1 street_number = street_number + 5 print("fun{user} | {first_name} {last_name} | {street_number} {street_name}, {city}, {state} {postal_code} | {email} | {phone}".format( user = user, first_name = name_parts[0], last_name = name_parts[1], street_number = street_number, street_name = street_name, city = city, state = state, postal_code = postal_code, email = name_parts[0].lower() + "." + name_parts[1].lower() + '@example.net', phone = "123-555-{0}{1}{2}{3}".format(random.randint(0,9), random.randint(0,9), random.randint(0,9), random.randint(0,9)) ))