Skip to content

Commit

Permalink
derive name from title
Browse files Browse the repository at this point in the history
  • Loading branch information
btylerburton committed Feb 6, 2024
1 parent 470fd4a commit 2a636c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions harvester/harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,10 @@ def create_ckan_resources(self, metadata: dict) -> list[dict]:
def simple_transform(self, metadata: dict) -> dict:
output = {
# "name": "-".join(str(metadata["title"]).lower().replace(".", "").split()),
"name": "".join([s for s in str(metadata["title"]).lower() if s.isalnum()])[
:99
], # TODO: need to add the random character suffix thing
# "name": "".join([s for s in str(metadata["title"]).lower() if s.isalnum()])[
# :99
# ], # TODO: need to add the random character suffix thing
"title": metadata["title"],
"owner_org": self.harvest_source.owner_org,
"identifier": metadata["identifier"],
"author": None, # TODO: CHANGE THIS!
Expand Down

0 comments on commit 2a636c9

Please sign in to comment.