Skip to content

Commit

Permalink
Enhance ted create_ted_topics maint script
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Jul 15, 2024
1 parent 7e077ba commit 75d0f4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dispatcher/backend/maint-scripts/create_ted_topics_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_ted_topics():


def create_recipe(ted_topic_name: str, access_token):
clean_ted_topic_name = ted_topic_name.replace(" ", "-")
clean_ted_topic_name = ted_topic_name.replace(" ", "-").replace("'", "")
schedule_name = f"ted_topic_{clean_ted_topic_name}"
response = requests.get(
get_url(f"/schedules/{schedule_name}"),
Expand Down Expand Up @@ -125,7 +125,8 @@ def main(zf_username, zf_password):
access_token, refresh_token = get_token(zf_username, zf_password)

ted_topics = get_ted_topics()
logger.debug(ted_topics)
logger.debug(",".join((ted_topics)))
logger.debug(",".join(sorted(ted_topics)))
for topic in ted_topics:
if topic != "street art":
continue
Expand Down

0 comments on commit 75d0f4a

Please sign in to comment.