Skip to content

Commit 1212b27

Browse files
committed
fix: handle keywords and keywords-exclude as lists in CLI
1 parent 4138ca4 commit 1212b27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ktoolbox/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,12 @@ async def sync_creator(
355355
creator_path = path / sanitize_filename(creator_name)
356356
creator_path.mkdir(exist_ok=True)
357357

358+
keywords = [keywords] if isinstance(keywords, str) else keywords
358359
keyword_set = set(keywords) if keywords else config.job.keywords
359360
if keywords:
360361
logger.info(f"Filtering posts by keywords: {', '.join(keyword_set)}")
361362

363+
keywords_exclude = [keywords_exclude] if isinstance(keywords_exclude, str) else keywords_exclude
362364
keyword_exclude_set = set(keywords_exclude) if keywords_exclude else config.job.keywords_exclude
363365
if keywords_exclude:
364366
logger.info(f"Excluding posts by keywords: {', '.join(keyword_exclude_set)}")

0 commit comments

Comments
 (0)