Commit cf4f61ab authored by Richard Robert Sawoscinski's avatar Richard Robert Sawoscinski
Browse files

Merge branch 'newbranch' into 'main'

fixed up errors report

See merge request !12
parents 556e0b71 873999cf
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
id,payload
eraeraeraer,adsrasr
1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Book report'), ('id', '1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4'), ('link', 'https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-06-09T21:21:53.673Z')])"
1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,"OrderedDict([('owner', 'admin-rsauosci@collab.its.umich.edu'), ('name', 'Untitled presentation'), ('id', '1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo'), ('link', 'https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk'), ('parent', 'root'), ('created', '2020-05-18T16:14:14.257Z')])"
owner,name,id,link,parent,created
admin-rsauosci@collab.its.umich.edu,Book report,1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4,https://docs.google.com/document/d/1w6cerfkxtyfwkgsbZnAL7Xfqx9GH3dMBqitnu2j_S_4/edit?usp=drivesdk,root,2020-06-09T21:21:53.673Z
admin-rsauosci@collab.its.umich.edu,Untitled presentation,1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo,https://docs.google.com/presentation/d/1PYnTCwcudDrUVuUZibfLA5zfKgzYdF3vlFdoC-G37qo/edit?usp=drivesdk,root,2020-05-18T16:14:14.257Z
......@@ -132,41 +132,33 @@ class Mover:
target = ""
if len(file_errors) > 0:
target = '{}/{}_Drive_Transfer_file_errors {}.csv'.format(os.getcwd(),owner,timestamp)
print ("Creating Target CSV")
target = '{}/Drive Transfer Errors: {} {}.csv'.format(os.getcwd(),owner,timestamp)
with open(target, 'w+') as csvfile:
fieldnames = ['id', 'payload'] # NOQA 501
fieldnames = ['id', 'payload']
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writeheader()
for item in file_errors:
writer.writerow(item)
csvfile.close()
print ("Uploading Errors Sheet to Google")
#timestamp = datetime.now()
#timestamp = timestamp.strftime("%m/%d/%Y %H:%M")
#file_error_filename = "/{} file errors {}.csv".format(owner, timestamp)
#open ('test.csv', 'x')
#with open('test.csv', 'w', encoding='utf8', newline='') as output_file:
# fc = csv.DictWriter(output_file, fieldnames=keys,)
# fc.writeheader()
# fc.writerows(file_errors)
a = cmd([
self.config['google']['gam_command'],
'user',
'rsauosci@collab.its.umich.edu',
str(os.getlogin()),
'add',
'drivefile',
'localfile',
target
target,
'convert'
])
print (a.decode('utf-8', 'ignore'))
a = str(a)
a = (a[a.find('(')+1:a.find(')')])
a = ("https://docs.google.com/spreadsheets/d/{}").format(a)
print ("\n Drive Transfer Errors: {}".format(a))
os.remove(target)
def main():
helptext = '''examples:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment