File tree 2 files changed +6
-12
lines changed
2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ def addDictonary(columnName, vocab):
50
50
df ['title' ] = df ['title' ].str .rstrip ('/.' )
51
51
df ['description' ] = df ['description' ].str .replace ('|' , ' ' )
52
52
df ['description' ] = df ['description' ].str .replace (' ' , ' ' )
53
- df ['description' ] = df ['description' ].str .replace ('p. ' , 'page ' )
54
- df ['description' ] = df ['description' ].str .replace ('col. ' , 'color ' )
55
- df ['description' ] = df ['description' ].str .replace ('ill. ' , 'illlustration(s) ' )
53
+ df ['description' ] = df ['description' ].str .replace (' p. ' , ' page ' )
54
+ df ['description' ] = df ['description' ].str .replace (' col. ' , ' color ' )
55
+ df ['description' ] = df ['description' ].str .replace (' ill. ' , ' illlustration(s) ' )
56
56
df ['scale' ] = df ['scale' ].str .rstrip (':;,' )
57
- df ['scale' ] = df ['scale' ].replace ('ca.' , 'approximately' )
58
- df ['scale' ] = df ['scale' ].replace ('in.' , 'inch' )
57
+ df ['scale' ] = df ['scale' ].replace (' ca.' , ' approximately' )
58
+ df ['scale' ] = df ['scale' ].replace (' in.' , ' inch' )
59
59
df ['description' ] = df ['title' ]+ '. ' + df ['description' ]+ ' ' + df ['scale' ]
60
60
df ['rights' ] = 'Public'
61
61
df ['suppressed' ] = 'False'
Original file line number Diff line number Diff line change 8
8
parser = argparse .ArgumentParser ()
9
9
parser .add_argument ('-f' , '--file' )
10
10
parser .add_argument ('-p' , '--prov' )
11
- parser .add_argument ('-b' , '--baseURL' )
12
11
args = parser .parse_args ()
13
12
14
13
if args .file :
19
18
prov = args .prov
20
19
else :
21
20
prov = input ('Enter provenance information: ' )
22
- if args .baseURL :
23
- baseURL = args .baseURL
24
- else :
25
- baseURL = input ('Enter the baseURL of your GeoBlacklight instance: ' )
26
21
27
22
28
23
def fixGeom (json_file , key , value ):
@@ -97,9 +92,8 @@ def addIdentifierAndSlug(row):
97
92
id = row .get ('identifier' )
98
93
if id is None :
99
94
id = uuid .uuid4 ()
100
- slug = baseURL + id
101
95
json_file ['dc_identifier_s' ] = id
102
- json_file ['layer_slug_s' ] = slug
96
+ json_file ['layer_slug_s' ] = id
103
97
else :
104
98
addToDict (json_file , 'dc_identifier_s' , 'identifier' )
105
99
addToDict (json_file , 'layer_slug_s' , 'layer_slug' )
You can’t perform that action at this time.
0 commit comments