Add skipIfExists and crash-safe failure logging for large conversions#190
Open
mavgit1 wants to merge 1 commit into
Open
Add skipIfExists and crash-safe failure logging for large conversions#190mavgit1 wants to merge 1 commit into
mavgit1 wants to merge 1 commit into
Conversation
Defer OneNote page content fetch until after skip checks so re-runs can resume without RPC during config build. Add optional jsonl failure export and document resume workflow with skipIfExists.
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
Re-running large notebooks (5k+ pages) after a crash is way too slow. Even with 'usedocx=2', the script still pings the OneNote API for every single page and forces a .docx to Markdown conversion via Pandoc, even if the final .md file is already sitting there completed.
This PR fixes that by checking 'skipIfExists' first, completely bypassing the OneNote API call and the Pandoc conversion loop if the output file exists. On my 5,719-page notebook, this cut the resume time by about 95%.
Also, instead of letting a single corrupt page crash the entire run, the script now gracefully logs or ignores the error and moves to the next note.
Also added:
Test plan