Allow user to manually pick each picture or merge all
(self, pictures)
| 41 | return pictures |
| 42 | |
| 43 | def selectPictures(self, pictures): |
| 44 | """Allow user to manually pick each picture or merge all""" |
| 45 | |
| 46 | listedPictures = {} |
| 47 | for index, pic in enumerate(pictures): |
| 48 | listedPictures[index + 1] = pic |
| 49 | print(f"{index + 1}: {pic}") |
| 50 | |
| 51 | userInput = ( |
| 52 | input( |
| 53 | "\n Enter the number(s) - (comma seperated/no spaces) or (A or a) to merge All \nChoice: " |
| 54 | ) |
| 55 | .strip() |
| 56 | .lower() |
| 57 | ) |
| 58 | |
| 59 | if userInput != "a": |
| 60 | # Convert user input (number) into corresponding (image title) |
| 61 | pictures = ( |
| 62 | listedPictures.get(int(number)) for number in userInput.split(",") |
| 63 | ) |
| 64 | |
| 65 | self.isMergePDF = False |
| 66 | |
| 67 | return pictures |
| 68 | |
| 69 | def convertPictures(self): |
| 70 | """ |