refactor hardcoded paths.

This commit is contained in:
ed committed 2026-08-23 22:44:25 -04:00
1 parent 5b087286cf
commit da7733490f
5 files changed
+35 -19

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from twitter.models import load_thread
from twitter.paths import SCRATCH
from twitter.slug import slugify
from twitter.tree import branch_roots, by_id, children_map, descendants, spine_ids
@@ -99,7 +100,7 @@ def main(argv: list[str] | None = None) -> int:
thread = load_thread(path)
text = render_ssdl(thread) + "\n\n" + render_ascii(thread) + "\n"
out = args.input if args.input.is_dir() else args.input.parent
dest = Path(r"C:\projects\Threadwell-ai\scratch") / f"graph_{thread.root_post_id}.txt"
dest = SCRATCH / f"graph_{thread.root_post_id}.txt"
dest.parent.mkdir(parents=True, exist_ok=True)
dest.write_text(text, encoding="utf-8")
sys.stdout.buffer.write((str(dest) + "\n").encode("ascii", "replace"))