-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_flow_memory.py
More file actions
44 lines (31 loc) · 1.07 KB
/
init_flow_memory.py
File metadata and controls
44 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
from __future__ import annotations
import argparse
from pathlib import Path
from flow_memory_setup import initialize_flow_memory_project
DEFAULT_SOURCE_ROOT = Path(__file__).resolve().parent
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Initialize Flow Memory structure in a target project directory.")
parser.add_argument("target_root", type=Path, help="Target project directory.")
return parser.parse_args()
def main() -> int:
args = parse_args()
result = initialize_flow_memory_project(args.target_root, source_root=DEFAULT_SOURCE_ROOT)
print(f"Initialized Flow Memory in {args.target_root.resolve()}")
print("")
print("Created:")
if result.created:
for path in result.created:
print(f"- {path}")
else:
print("- (none)")
print("")
print("Skipped:")
if result.skipped:
for path in result.skipped:
print(f"- {path}")
else:
print("- (none)")
return 0
if __name__ == "__main__":
raise SystemExit(main())