Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. file = example.csv
  2. fileDone = os.path.abspath('/home/bw/temp/%s'%file1)
  3.  
  4. with open(fileDone, 'w+') as myFile:
  5. a = csv.writer(myFile, delimiter=',')
  6. a.writerow(['login report for %s from %s to %s:nn'%(name[0],start_date,end_date)])
  7. dato = ['Username','Logins','Platform']
  8. a.writerow(dato)
  9. for vizL in vizList:
  10. data =[str(vizL[0]),str(vizL[1]),"Viz"]
  11. a.writerow(data)
  12. for appL in appList:
  13. data =[str(appL[0]),str(appL[1]),"Analytics"]
  14. a.writerow(data)
  15.  
  16. #!/bin/bash
  17.  
  18. python scriptname.py
  19.  
  20. REPORT_MONTH=`/bin/date "+%d %B %Y"`
  21.  
  22. echo -e "Attached is the login reports for $REPORT_MONTHnnnnnnGenerated by: $0" | mutt -a /home/bw/temp/example.csv -c my@email.com -s "Daily Login Reports For $REPORT_MONTH"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement