-
Notifications
You must be signed in to change notification settings - Fork 230
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
added cbz unpacking functionality when adding cbz files using directoryButton #700
Conversation
added cbz unpacking functionality when adding cbz files using directoryButton
Why do they all end with S? def listFilesS(source): Also, use this syntax in first post to link PR to issue
Also, code doesn't run if 7z isn't installed and only using tar. |
… detects .cbz files and shows them as an input before clicking convert button
reversed previous changes and added directory unpacking feature
This time I took different approach with adding .cbz files via add directory button and decided .cbz files to appear exactly the same as adding files by drag and drop feature or selecting files after clicking add file button. @axu2 is something wrong with new changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this approach is much simpler.
But I'm not sure about this feature since it's only matching existing behavior.
The "Merge all files" feature could be interesting if you have a good way to name the output. I edited my post here with more details: #612 (comment)
That other feature might also affect how you approach this feature.
kindlecomicconverter/KCC_gui.py
Outdated
if file.lower().endswith('.cbz'): | ||
file_path = os.path.join(root, file) | ||
if sys.platform.startswith('win'): | ||
file_path = file_path.replace('/', '\\') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd do the research, but pretty sure this kind of code is a relic of older Python/Windows and can be removed in modern computers repo-wide. (maybe in a separate PR).
os.path.join handles any conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
kindlecomicconverter/KCC_gui.py
Outdated
|
||
for root, _, files in os.walk(dname): | ||
for file in files: | ||
if file.lower().endswith('.cbz'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only supporting CBZ and not other archives like zip/cbr isn't the best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
kindlecomicconverter/KCC_gui.py
Outdated
@@ -206,7 +206,7 @@ def clean(self): | |||
MW.addMessage.emit('<b>Conversion interrupted.</b>', 'error', False) | |||
MW.addTrayMessage.emit('Conversion interrupted.', 'Critical') | |||
MW.modeConvert.emit(1) | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't add random spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
…oblem with constructing file directories
Cbz dir button
removed random spaces
code of conduct added
Added code of conduct to repo by the way. It's (probably) good practice to have it. |
Closing based on discussion in #612, reopen as needed. That feature probably affects how you want to approach this. |
Related: