Created
February 20, 2019 16:58
-
-
Save ptrin/e38766c2e6578f5a74201851ff76acda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
import os | |
import re | |
import sys | |
print "Input file of pages to assess: "+sys.argv[1] | |
def slug(str): | |
"""Replace non-alphanumeric characters with hyphen""" | |
slug = re.sub(r'[^\w]+', '-', str) | |
return slug | |
with open(sys.argv[1]) as tsvfile: | |
reader = csv.reader(tsvfile, delimiter='|') | |
for row in reader: | |
print row | |
os.system("docker-compose run openassessit "+row[1]+" "+slug(row[0])+" chrome") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment