36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
|
|
import os
|
|
import sys
|
|
|
|
# Add the project path to sys.path
|
|
project_path = '/Volumes/WD/Users/Work/python/ff_dev_plugins/gds_dviewer'
|
|
sys.path.append(project_path)
|
|
|
|
# Mocking and environment setup might be needed, but let's try to load the logic
|
|
from logic import LogicExplorer
|
|
|
|
class MockPlugin:
|
|
def __init__(self):
|
|
self.ModelSetting = MockSetting()
|
|
self.logger = MockLogger()
|
|
|
|
class MockSetting:
|
|
def get(self, key):
|
|
if key == 'root_path': return '/Volumes/WD/Users/Work/python/flaskfarm/data/video'
|
|
return None
|
|
def get_bool(self, key):
|
|
return False
|
|
|
|
class MockLogger:
|
|
def debug(self, msg): print(f"DEBUG: {msg}")
|
|
def info(self, msg): print(f"INFO: {msg}")
|
|
def error(self, msg): print(f"ERROR: {msg}")
|
|
|
|
# This might fail due to Flask context or DB initialization
|
|
# But we can try to see if it works with the existing app context if we can import it
|
|
# Since it's a plugin, it usually depends on the framework 'F'
|
|
|
|
print("Attempting to test list_directory...")
|
|
# In a real environment, we'd need to be careful about DB access.
|
|
# If I can't run this, I'll use another way.
|