mirror of
https://github.com/aljazceru/vibeline.git
synced 2026-01-14 12:04:30 +01:00
Add .or.md suffix convention for plugins that should match any word
This commit is contained in:
16
plugins/app_idea.or.md
Normal file
16
plugins/app_idea.or.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Based on the following transcript and its summary, create a detailed app idea specification. The specification should include:
|
||||
1. App name and tagline
|
||||
2. Problem statement
|
||||
3. Target audience
|
||||
4. Key features
|
||||
5. Technical considerations
|
||||
6. User flow
|
||||
7. Potential challenges
|
||||
|
||||
Transcript:
|
||||
{transcript}
|
||||
|
||||
Summary:
|
||||
{summary}
|
||||
|
||||
App Idea Specification:
|
||||
@@ -29,13 +29,19 @@ def determine_content_types(text: str, available_plugins: List[str]) -> List[str
|
||||
# Convert plugin name to search pattern (e.g., "blog_post" -> "blog post")
|
||||
search_pattern = plugin_name.replace('_', ' ')
|
||||
|
||||
# Special case for app_idea which needs both words
|
||||
if plugin_name == "app_idea":
|
||||
if re.search(r'\bidea\b', text) and re.search(r'\bapp\b', text):
|
||||
# Check if this is an "or" plugin (has .or.md suffix)
|
||||
is_or_plugin = plugin_name.endswith('.or')
|
||||
if is_or_plugin:
|
||||
# Remove the .or suffix for the actual plugin name
|
||||
plugin_name = plugin_name[:-3]
|
||||
# For or plugins, check if any of the words match
|
||||
words = search_pattern.split()
|
||||
if any(re.search(r'\b' + word + r'\b', text) for word in words):
|
||||
content_types.append(plugin_name)
|
||||
else:
|
||||
# For regular plugins, check for the exact pattern
|
||||
if re.search(r'\b' + search_pattern + r'\b', text):
|
||||
content_types.append(plugin_name)
|
||||
# For all other plugins, just search for the pattern
|
||||
elif re.search(r'\b' + search_pattern + r'\b', text):
|
||||
content_types.append(plugin_name)
|
||||
|
||||
return content_types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user