How to integrate a user command-based Pause/Resume script in Jupyter Notebook?
A quick update:- Haven't found the exact way for integrating pause/resume functionality to the script. But did a workaround i.e., Created a log file after downloading pdf file creating images of all the pages of the file and wrote the link in the log file. In the starting of the program, I am comparing the two files i.e., log file and the file containing links and then looping through the difference and downloading file. So, when I stop the function and start it again it will compare links which are in log file(For which the process is completed i.e., images of all the pages is created) and in the file containing all the links and start downloading from the link for which the process was interrupted. Please do let me know if there is a better approach or the pause/resume functionality is present.
I have written a program which reads a text file line by line containing links to pdf files which then downloads the file, split all the pages into another pdf and then covert it to jpeg format. I am now asked to add a pause/resume functionality to the same. The sequence is it first reads one line then download from the link then split the pdf to pdf of pages then makes images of all the pages then go to another loop, the problem is we don't know the data size and have to further work on the images so we have to pause the program in-between and have to resume after sometime, it can be an hour, 4 hours or even more, please help. It has to start and stop on user command at any point and time when user like.
Thanks in advance