refactor: remove determine_content_type function in favor of plugin system

This commit is contained in:
Gigi
2025-04-04 22:15:58 +01:00
parent 806b5f72e9
commit cfb6055a4d

View File

@@ -24,16 +24,6 @@ logging.basicConfig(
logger = logging.getLogger('voice_memo_watcher')
def determine_content_type(transcript_text: str) -> str:
"""Determine the type of content in the transcript."""
text = transcript_text.lower()
if re.search(r'\bblog post\b', text) or re.search(r'\bdraft\b', text):
return "blog_post"
elif re.search(r'\bidea\b', text) and re.search(r'\bapp\b', text):
return "idea_app"
return "default"
def count_words(text: str) -> int:
"""Count the number of words in a text string."""
return len(text.split())