Skip to content

Instantly share code, notes, and snippets.

@evoxmusic
Created January 25, 2017 22:56
Show Gist options
  • Save evoxmusic/eb7c61c98e293a23ee3efef62d7f982b to your computer and use it in GitHub Desktop.
Save evoxmusic/eb7c61c98e293a23ee3efef62d7f982b to your computer and use it in GitHub Desktop.
Pour l'utiliser, vous devez avoir le fichier ios.csv (export du formulaire google form au format csv) au même niveau que ce script et faire ceci.
#!/usr/bin/env python3.5
import csv
if __name__=='__main__':
with open('ios.csv', 'r') as csvfile:
reader = csv.DictReader(csvfile, delimiter=',')
for l in reader:
x = l['Nom / Prénom']
first_name = ""
last_name = ""
if len(x.split()) >= 2:
first_name = x.split()[0]
last_name = x.split()[1]
else:
first_name = x
last_name = "Noname"
print("%s,%s,%s" % (first_name, last_name, l['Email associé à votre compte ITunes']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment