mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-19 07:36:53 +01:00
option to use venv or not per module, added tts
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import dotenv
|
||||
|
||||
from nostr_dvm.interfaces.dvmtaskinterface import DVMTaskInterface
|
||||
from nostr_dvm.utils.admin_utils import AdminConfig
|
||||
from nostr_dvm.utils.backend_utils import keep_alive
|
||||
from nostr_dvm.utils.definitions import EventDefinitions
|
||||
from nostr_dvm.utils.dvmconfig import DVMConfig, build_default_config
|
||||
from nostr_dvm.utils.nip89_utils import NIP89Config, check_and_set_d_tag
|
||||
@@ -102,8 +97,7 @@ def build_example(name, identifier, admin_config):
|
||||
}
|
||||
|
||||
nip89config = NIP89Config()
|
||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||
nip89config.CONTENT = json.dumps(nip89info)
|
||||
|
||||
|
||||
return MediaConverter(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
||||
admin_config=admin_config)
|
||||
@@ -115,21 +109,6 @@ def process_venv():
|
||||
result = dvm.process(json.loads(args.request))
|
||||
DVMTaskInterface.write_output(result, args.output)
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# process_venv()
|
||||
|
||||
#env_path = Path('.env')
|
||||
#if env_path.is_file():
|
||||
# print(f'loading environment from {env_path.resolve()}')
|
||||
# dotenv.load_dotenv(env_path, verbose=True, override=True)
|
||||
#else:
|
||||
# raise FileNotFoundError(f'.env file not found at {env_path} ')
|
||||
|
||||
#admin_config = AdminConfig()
|
||||
#admin_config.REBROADCAST_NIP89 = False
|
||||
#admin_config.UPDATE_PROFILE = False
|
||||
|
||||
#dvm = build_example("Media Bringer", "media_converter", admin_config)
|
||||
#dvm.run()
|
||||
|
||||
#keep_alive()
|
||||
if __name__ == '__main__':
|
||||
process_venv()
|
||||
Reference in New Issue
Block a user