Add professional CSV notes export - #22
Merged
Merged
Conversation
File > Export Notes as CSV... writes every comment and drawing to a flat CSV, one row per note: frame, timecode, type, content, color, x, y, done, timestamp. - utils/notescsv.py is pure (no Qt), so the row building is tested on its own. Rows are ordered by frame ascending; within a frame the comments come first, then the drawings in the order they were made. - Coordinates are the normalized 0-1 image-space values the annotations are already stored in, so a note stays meaningful regardless of the resolution it was made at. Blank means not applicable: a scribble has no text, a frame-level comment has no pin. - Text annotations carry their words into the content column; pencil strokes anchor on their first point, shapes on their start corner. - An unusable frame rate degrades the timecode to a frame label (f0042) rather than failing the export. Bad metadata must not cost a supervisor their notes. - The file is opened with an empty newline argument, else the csv module emits CRLF twice per row on Windows and every other line of the exported file comes out blank. 14 tests, including comma and quote escaping, malformed colours, a pencil with no points, and the blank-line regression. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TexnzYbmCjjTDB8zzZuUPb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why this replaces #19
PR #19 contains the earlier stacked test/timecode/comment commits and now conflicts with
main. This branch preserves the authored CSV commit, applies only its feature delta to currentmain, and adds the Windows/Unicode hardening above.Authored feature commit: @emlcpfx / #19.
Validation
pytest tests/test_notes_csv.py -q(16 passed)pytest -q(238 passed)git diff --checkReplaces #19.