Skip to content

Commit

Permalink
Get the new filename format
Browse files Browse the repository at this point in the history
Toward #114.
  • Loading branch information
waldoj committed Oct 31, 2016
1 parent 8601b16 commit 0e280b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crump
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,11 @@ def main():
# Import the data from YAML.
field_map = yaml.load(stream)

head, tail = os.path.split(csv_file)

map_id = tail[0]
filename = os.path.basename(csv_file)
map_id = filename.replace('.yaml', '')
field_maps[map_id] = {}
field_maps[map_id]["map"] = field_map
field_maps[map_id]["name"] = tail
field_maps[map_id]["name"] = map_id

# If an Elasticsearch mapping has been requested via command-line switch.
if elasticsearch_map:
Expand Down

0 comments on commit 0e280b9

Please sign in to comment.