mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-19 00:16:31 +01:00
simplifiying code, adding a basic bot functionality
This commit is contained in:
@@ -25,16 +25,18 @@ class TextExtractionPDF(DVMTaskInterface):
|
||||
TASK: str = "pdf-to-text"
|
||||
COST: int = 0
|
||||
PK: str
|
||||
DVM = DVM
|
||||
|
||||
def __init__(self, name, dvm_config: DVMConfig, admin_config: AdminConfig = None):
|
||||
def __init__(self, name, dvm_config: DVMConfig, nip89d_tag: str, nip89info: str, admin_config: AdminConfig = None):
|
||||
self.NAME = name
|
||||
dvm_config.SUPPORTED_TASKS = [self]
|
||||
dvm_config.DB = "db/" + self.NAME + ".db"
|
||||
self.PK = dvm_config.PRIVATE_KEY
|
||||
|
||||
dvm = DVM
|
||||
nostr_dvm_thread = Thread(target=dvm, args=[dvm_config, admin_config])
|
||||
nostr_dvm_thread.start()
|
||||
dvm_config.SUPPORTED_TASKS = [self]
|
||||
dvm_config.DB = "db/" + self.NAME + ".db"
|
||||
dvm_config.NIP89 = self.NIP89_announcement(nip89d_tag, nip89info)
|
||||
self.dvm_config = dvm_config
|
||||
self.admin_config = admin_config
|
||||
|
||||
|
||||
def is_input_supported(self, input_type, input_content):
|
||||
if input_type != "url" and input_type != "event":
|
||||
|
||||
Reference in New Issue
Block a user