Commands live at bin/brain/{index,get,stats,eval,watch}.go and
bin/mail/import.go, bin/markdown/import.go, bin/postgres/query.go.
Python remains the Ladybug write worker. index_mail is a deprecation
shim that rebuilds via --with-mail.
28 lines
771 B
Python
Executable File
28 lines
771 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""mail/index_mail — deprecated. Use bin/brain/index.go --rebuild --with-mail.
|
|
|
|
Ladybug corrupts its WAL on bulk-insert into an already-indexed DB, so this
|
|
shim always rebuilds (repo corpus + var/mail). Conversion stays in mail/import.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def main(argv: list[str]) -> int:
|
|
print(
|
|
"bin/mail/index_mail is deprecated; use bin/brain/index.go --rebuild --with-mail",
|
|
file=sys.stderr,
|
|
)
|
|
index = ROOT / "bin" / "kb" / "index"
|
|
os.execv(sys.executable, [sys.executable, str(index), "--rebuild", "--with-mail", *argv])
|
|
return 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main(sys.argv[1:]))
|