Centralize provider caching and rate-limit handling, then add Domain/URL/Hash IOC types and safer VT/IPInfo key resolution so lookups stay reliable on free-tier APIs.
29 lines
824 B
Python
29 lines
824 B
Python
"""
|
|
Local VisiData plugins.
|
|
|
|
VisiData (v3.3) imports the top-level `plugins` package early (before config.py)
|
|
when `options.imports` contains "plugins" (default). Import submodules here so
|
|
their commands/types are registered on startup.
|
|
"""
|
|
|
|
# Keep imports resilient: a missing optional plugin shouldn't prevent VisiData from starting.
|
|
for _mod in (
|
|
"hidecol",
|
|
"iptype",
|
|
"ioc",
|
|
):
|
|
try:
|
|
__import__(f"{__name__}.{_mod}")
|
|
except ModuleNotFoundError:
|
|
# Optional/missing plugin file.
|
|
continue
|
|
except Exception as e:
|
|
# Don't silently swallow unexpected import errors; surface them.
|
|
try:
|
|
from visidata import vd
|
|
|
|
vd.warning(f"plugin import failed: plugins.{_mod}")
|
|
vd.exceptionCaught(e)
|
|
except Exception:
|
|
raise
|