Skip to content

Commit 71769fd

Browse files
committed
updates
1 parent 1097a7f commit 71769fd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

allUppercaseValueCheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
filePath = secrets.filePath
66

7-
filename = filePath+raw_input('Enter filename (including \'.csv\'): ')
7+
fileName = filePath+raw_input('Enter fileName (including \'.csv\'): ')
88

99
f=csv.writer(open('uppercaseValues.csv','wb'))
1010
f.writerow(['orgTitle']+['modTitle']+['itemID'])
11-
with open(filename) as csvfile:
11+
with open(fileName) as csvfile:
1212
reader = csv.DictReader(csvfile)
1313
for row in reader:
1414
if row['value'].isupper() == True:

checkInventory.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def main():
1414
help='directory containing the data. if omitted, data will be read from the directory containing the inventory file')
1515

1616
parser.add_argument('-f', '--field',
17-
help='field in the csv containing the filenames. default: name')
17+
help='field in the csv containing the fileNames. default: name')
1818

1919
parser.add_argument('-v', '--verbose', action='store_true',
2020
help='increase output verbosity')
@@ -30,20 +30,20 @@ def main():
3030
if args.verbose:
3131
print('verbosity turned on')
3232
print('reading inventory from {}'.format(args.inventory))
33-
print('filenames read from field named {}'.format(args.field))
33+
print('fileNames read from field named {}'.format(args.field))
3434
print('searching for files in {}'.format(args.dataDir))
3535
# end: argument parsing
3636

3737
inventory = pd.read_csv(args.inventory, usecols=[args.field])
38-
filenames = inventory[args.field]
38+
fileNames = inventory[args.field]
3939
foundfiles = 0
4040
missingfiles = 0
41-
for filename in filenames:
42-
if os.path.isfile(args.dataDir + '/' + filename):
43-
if args.verbose: print('{} is not missing'.format(filename))
41+
for fileName in fileNames:
42+
if os.path.isfile(args.dataDir + '/' + fileName):
43+
if args.verbose: print('{} is not missing'.format(fileName))
4444
foundfiles += 1
4545
else:
46-
print('{} is missing'.format(filename))
46+
print('{} is missing'.format(fileName))
4747
missingfiles += 1
4848

4949
print('{} files found and {} files missing'.format(foundfiles, missingfiles))

0 commit comments

Comments
 (0)