Restructure bin/ so the project reads at the comprehension floor
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import pathlib
|
||||
import typing
|
||||
|
||||
|
||||
def project_archive(checkout_root: str, home: pathlib.Path, env: typing.Mapping[str, str]) -> pathlib.Path:
|
||||
archive = pathlib.Path(env["LOOP_CLAUDE_TRANSCRIPTS"]).expanduser() if env.get("LOOP_CLAUDE_TRANSCRIPTS") else home / ".claude" / "loop-claude-transcripts"
|
||||
return archive / project_key(checkout_root, home)
|
||||
|
||||
|
||||
def project_key(checkout_root: str, home: pathlib.Path) -> str:
|
||||
"""The checkout's path relative to ~/code, or to / outside it."""
|
||||
return checkout_root.removeprefix(f"{home / 'code'}/").lstrip("/")
|
||||
Reference in New Issue
Block a user