-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tune up time/timing/logs in reprostim-videocapture and QR parsing #102
Conversation
Parsing/parse_wQR.py
Outdated
return (f"QrRecord(frames=[{self.frame_start}, {self.frame_end}], " | ||
f"pos=[{self.start_pos_sec}, {self.end_pos_sec} sec], " | ||
f"start_time={self.start_time}, end_time={self.end_time}], " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's uniformize
return (f"QrRecord(frames=[{self.frame_start}, {self.frame_end}], " | |
f"pos=[{self.start_pos_sec}, {self.end_pos_sec} sec], " | |
f"start_time={self.start_time}, end_time={self.end_time}], " | |
return (f"QrRecord(frames=[{self.frame_start}, {self.frame_end}], " | |
f"times=[{self.start_pos_sec}, {self.end_pos_sec} sec], " | |
f"abs_times=[{self.start_time}, {self.end_time}], " |
and make it a json single line record
Parsing/parse_wQR.py
Outdated
logger.error(f"Path does not exist: {path}") | ||
return 1 | ||
|
||
do_parse(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
direct logs to stderr.
could this function yield those records as soon as figures out, and here have a loop
do_parse(path) | |
for rec in do_parse(path): | |
print(rec.model_dump_json()) |
this way we could use do_parse
programmatically later on if needed without going back and forth through json
Parsing/parse_wQR.py
Outdated
end_time: Optional[str] = Field(None, description="Time where QR code ends") | ||
start_pos_sec: Optional[float] = Field(None, description="Position in seconds " | ||
"where QR code starts") | ||
end_pos_sec: Optional[float] = Field(None, description="Position in seconds " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's uniformize into
❯ echo {frame,time,isotime}_{start,end}
frame_start frame_end time_start time_end isotime_start isotime_end
This is aggregated PR. Closes #99 . Closes #100 . Closes #98.