Skip to content
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

Add -skipsetup feature which allows webdriver script to resume uploading to saved projects #25

Merged
merged 1 commit into from
Aug 22, 2021

Conversation

candyapplecorn
Copy link
Contributor

@candyapplecorn candyapplecorn commented Jun 16, 2021

RE: #24

With this new -skipsetup feature, the user can use the web driver window to sign into their MPC account and select a project they'd previously been uploading cards for, but had stopped for whatever reason (script crashed, internet died, computer went to sleep, etc).

This allows larger orders to now be fulfilled successfully, even if the script crashes mid-way through.

There are two essential parts:

  1. A new function that checks slots to see if that slot's card has already been uploaded, and if so, skips over processing that card (as it's already been uploaded)
  2. A new command line argument, -skipsetup, which allows the user to sign in and select an existing project before resuming script execution. The script will then use the previously described function to skip over all the cards that have already been uploaded, and then continue wherever it left off.

@ndepaola plz LMK what you think!

added argument for skipping setup

fixed card not uploaded logic

Added new option which allows the web driver to wait for the user to sign in and select a project for continuation

added some printed instructions for resuming existing projects
@ndepaola
Copy link
Collaborator

this is pretty cool! I'm wondering how the end user would select this option though, given that the script is packaged w/ pyinstaller and distributed as executables?

@candyapplecorn
Copy link
Contributor Author

@ndepaola it's a Python command line argument (-skipsetup; the single hyphen makes it a flag, and the - is supposed to represent "without" or "turn this off" (I tried to follow Python command line conventions)); the executable can receive command line arguments.

I followed the instructions at the top of the autofill.py file, completely set up a dev environment, and packaged it into an executable. In the screenshot on the linked issue (not actually linked, I can't figure out how to link an issue on GitHub), I'm actually running the built executable - I never actually tried to run the Python code directly.

Here's a screenshot of my ls -lth autofill bash output, showing my local copy of autofill is a packaged executable that can accept command line flags:

image

(btw, I think maybe I just understood what you mean by "distributed as executables" - are you referring to the fact that some users may simply double-click the executable? Well, in that case, you're correct, no command line arguments would be passed in. The program would continue to function as it always has. That being said, it's certainly possible to run the program using the ./<executable-file> syntax available from any command-line in any unix-based environment, and it should be possible to do this on Windows as well using the built-in windows shell or the newer "shipped with windows" unix shells that exist now in 2020)

@candyapplecorn
Copy link
Contributor Author

@ndepaola I've seen users on the forum run into the same issues as me, which this fixes - can we get this in?

@ndepaola ndepaola merged commit 258661f into chilli-axe:master Aug 22, 2021
@ndepaola
Copy link
Collaborator

apologies for the delay with merging this!

almost all of my users run the tool by double clicking the exe so that's why i was wondering if running it from the command line would be a poor user experience. i might think about adding an option to the tool which allows the use of this feature without needing a command line argument. i have some more work in mind for the tool which i'll finish up before building & making another release.

@clayhan
Copy link

clayhan commented Jan 1, 2022

@candyapplecorn Would you be able to dumb down even further your instructions on, "Please sign in and select an existing project to continue editing. Once you've signed in, return to the script execution window and press ENTER."?

Right now I:

  1. run python3 autofill.py -skipsetup
  2. Log in
  3. Select a project to continue editing
    I have tried staying on the step 5 review screen (preview and add to cart) and also have tried navigating to step 1 (customize front) where the upload occurs

I eventually see some DL/UL in the CL. The UL will eventually reach 100% (while nothing happens on the page), and then the script finishes with some errors, nothing happens, and then I am navigated to "step 3 - customize back" and it ends.

Thanks a ton for your time on this!

@ndepaola ndepaola added the enhancement New feature or request label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants