utils
filename_has_extension
Checks that a filename has at least one extension.
get_filename_from_url
Given a URL to a file, get only the filename itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL to a file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The filename. |
Source code in src/podcast_analyzer/utils.py
split_keywords
Given a list of keywords, check for delimiters that were missed, and split accordingly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keywords
|
list[str]
|
A list of keywords from podcastparser. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: A list of keywords split accordingly. |
Source code in src/podcast_analyzer/utils.py
update_file_extension_from_mime_type
Given the mime type and filename update the file extension.