tools: add --auto flag to replay and cabana for loading routes from auto source (#34863)
* add flag to auto load a route from the most suitable source * split to functions * early return * add --auto to replay * README * cleanup * remove prefix * parse datetime * cleanup * improve help * do not modify logreader.py * fix seg_num * cleanuppull/35134/head
parent
5a94d818bb
commit
b920e2a998
12 changed files with 91 additions and 29 deletions
@ -0,0 +1,17 @@ |
||||
#!/usr/bin/env python3 |
||||
import sys |
||||
from openpilot.tools.lib.logreader import LogReader |
||||
|
||||
|
||||
def main(): |
||||
if len(sys.argv) != 2: |
||||
print("Usage: python auto_source.py <log_path>") |
||||
sys.exit(1) |
||||
|
||||
log_path = sys.argv[1] |
||||
lr = LogReader(log_path, sort_by_time=True) |
||||
print("\n".join(lr.logreader_identifiers)) |
||||
|
||||
|
||||
if __name__ == "__main__": |
||||
main() |
Loading…
Reference in new issue