#!/usr/bin/env python3
|
# -*- coding: utf-8 -*-
|
"""Retired Tagfeed watcher entry.
|
|
Tagfeed is now manual-first:
|
- use Obsidian Command Palette: Tagfeed:手动更新全局Tagfeed
|
- or run X2.Archived/scripts/sync_excalidraw_tagfeed.py manually
|
|
This script intentionally does not start a filesystem watcher and does not write
|
daily notes. It is kept only as a safe compatibility endpoint for old wrappers
|
or launch items.
|
"""
|
|
from datetime import datetime
|
from pathlib import Path
|
import os
|
|
|
LOG_PATH = Path(os.environ.get("EXCALIDRAW_TAGFEED_LOG", "/Users/ar/.excalidraw-tagfeed-watch.log"))
|
|
|
def log(message: str) -> None:
|
stamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
line = f"[{stamp}] {message}"
|
print(line, flush=True)
|
try:
|
with LOG_PATH.open("a", encoding="utf-8") as fh:
|
fh.write(line + "\n")
|
except OSError:
|
pass
|
|
|
def main() -> None:
|
log(
|
"excalidraw_tagfeed_watch.py is retired; "
|
"run Tagfeed:手动更新全局Tagfeed instead. No watcher started."
|
)
|
|
|
if __name__ == "__main__":
|
main()
|