[FEATURE] creator_sanitized source variable (#574)

This commit is contained in:
Benjamin Hsieh 2023-03-31 20:47:44 -07:00 committed by GitHub
parent fa6eae7423
commit e1f2e37858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -361,6 +361,16 @@ class EntryVariables(BaseEntryVariables):
"""
return self.kwargs_get(CREATOR, self.channel)
@property
def creator_sanitized(self: Self) -> str:
"""
Returns
-------
str
The creator name, sanitized
"""
return sanitize_filename(self.creator)
@property
def channel(self: Self) -> str:
"""

View file

@ -70,6 +70,7 @@ def mock_entry_to_dict(
"ext": ext,
"description": "",
"creator": "abc123",
"creator_sanitized": "abc123",
"channel": "abc123",
"channel_sanitized": "abc123",
"extractor": extractor,