# Context: USER: the input types should include only the url, and the email adress of the user
23 lines
786 B
Python
23 lines
786 B
Python
class PublicGitRepo:
|
|
"""replaces the text in the given text string with a given other text at some key positions"""
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {
|
|
"url": ("STRING", {"multiline": False}), # Added url input
|
|
"email": ("STRING", {"multiline": False}) # Added email input
|
|
}
|
|
}
|
|
|
|
CATEGORY = "text"
|
|
RETURN_TYPES = ("STRING",)
|
|
FUNCTION = "prompt_template_handler"
|
|
|
|
def prompt_template_handler(self, text: str, replacement, key1, git_url):
|
|
"""
|
|
>>> PublicGitRepo().prompt_template_handler("hello world", "universe", "world", "https://github.com/example/repo.git")
|
|
'hello universe'
|
|
"""
|
|
return (text.replace(key1, replacement),)
|