Have --restart pick up IDs from the output files#38
Open
katfang wants to merge 9 commits intoradiolarian:masterfrom
Open
Have --restart pick up IDs from the output files#38katfang wants to merge 9 commits intoradiolarian:masterfrom
katfang wants to merge 9 commits intoradiolarian:masterfrom
Conversation
added 9 commits
September 20, 2022 20:00
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.
PROBLEM STATEMENT
Sometimes my internet cuts out and then my script quits. It's annoying to go dig out the next fic id, verify it, and slap it as a parameter into
--restart. I just want to--resumeSOLUTION
These commits will skip fic ids that are in the output files (the csv fic file and the error file) IF
--resumeflag, no parameterPLEASE NOTE: THIS PR REMOVES
--restart ID. I had originally just used the same flag and gave it new functionality, but I decided to give it a new name.CAVEATS
A tad controversial in that
--resume. It will behave reasonably if you don't--resume. But also this is just straight up wonky anyways because you're using the same file as input and error output which is ... yeah, don't do that.NOTES
First, I recommend looking at the first commit by itself. I just really wanted the write path to be the same for whether you pass in a CSV list of ids or pass them all from the command line.
My best guess for this flag is that it's meant to kick the script when something has gone wrong in the middle and you Just Want More Fic From The List. If so, this is easier! Albeit a little more magic and therefore slightly less predictable.
If you can live with that, then this allows you to just run
--resumewithout finding what the next fic id is! Hooray!Hm, I could have it error out if you try to pass the error file as the input list.
Well, let me know if there are any bits I ought to revisit.
By the way, thanks for that fix in
ao3_work_idsin case there is no file! Can't give you kudos for it, so, here I am. Added that check here, too.