cp.nvim/lua
Barrett Ruth c963728fe9 refactor(submit): pass file path instead of source via stdin
Problem: Submit read the source file in Lua, piped the full content as
stdin through to Python, then re-encoded it into an in-memory buffer
just to hand it back to the browser's file input. Unnecessary roundtrip
for AtCoder; CF also gains nothing from Lua owning the read.

Solution: Pass `source_file` path as a CLI arg to the scraper instead
of reading it in Lua and streaming via stdin. AtCoder calls
`page.set_input_files(file_path)` directly. Codeforces reads the file
with `Path(file_path).read_text()` before the browser session. Also
saves the buffer with `vim.cmd.update()` before submitting.
2026-03-05 11:26:29 -05:00
..
cp refactor(submit): pass file path instead of source via stdin 2026-03-05 11:26:29 -05:00