-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
32 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
__maintainer_contact__ = "[email protected]" | ||
__copyleft__ = '2023' | ||
__version__ = '1.0.19' | ||
__release__ = 'January 20 2023' | ||
__release__ = 'January 24 2023' | ||
__appname__ = "FFcuesplitter" | ||
__packagename__ = "ffcuesplitter" | ||
__license__ = "GPL3 (Gnu Public License)" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
Writer: jeanslack <[email protected]> | ||
license: GPL3 | ||
Copyright: (C) 2023 Gianluca Pernigotto <[email protected]> | ||
Rev: Dec 27 2022 | ||
Rev: Jan 24 2023 | ||
Code checker: flake8 and pylint | ||
#################################################################### | ||
|
@@ -37,11 +37,10 @@ def sanitize(string: str = 'string') -> str: | |
with the OS file system. | ||
- On Windows, removes the following illegal chars: " * : < > ? / \ | | ||
and replaces slash (/) character with hyphen (-). | ||
- On other operating systems, it replaces slash (/) character | ||
with hyphen (-). | ||
- On all operating systems, removes leading/trailing spaces | ||
and dots (.). | ||
- On all operating systems, it replaces slash (/) character | ||
with hyphen (-) and removes leading/trailing spaces | ||
and dots (.) | ||
Returns the new sanitized string. | ||
|
@@ -51,9 +50,7 @@ def sanitize(string: str = 'string') -> str: | |
|
||
if platform.system() == 'Windows': | ||
string = re.sub(r"[\"\*\:\<\>\?\|\\]", '', string) | ||
string = string.replace('/', '-') | ||
else: | ||
string = string.replace('/', '-') | ||
string = string.replace('/', '-') | ||
|
||
return string.strip().strip('.') # removes spaces and dots | ||
# ------------------------------------------------------------------------ | ||
|
@@ -101,7 +98,7 @@ def frames_to_seconds(frames): | |
|
||
def makeoutputdirs(outputdir): | ||
""" | ||
Makes the subfolders specified in the outpudir argument | ||
Makes the specified subfolders in the outpudir | ||
""" | ||
try: | ||
os.makedirs(outputdir, | ||
|
@@ -115,7 +112,7 @@ def makeoutputdirs(outputdir): | |
|
||
class Popen(subprocess.Popen): | ||
""" | ||
Inherit subprocess.Popen class to set _startupinfo. | ||
Inherit `subprocess.Popen` class to set `_startupinfo`. | ||
This avoids displaying a console window on MS-Windows | ||
using GUI's . | ||
""" | ||
|
@@ -190,7 +187,6 @@ def find_files_recursively(self, suffix: str = '') -> dict: | |
if os.path.exists(dirs): | ||
if os.path.isdir(dirs): | ||
for root, alldirs, allfiles in os.walk(dirs): | ||
# to disable some `for` variables put underscore _ | ||
fileswalk[root] = list(alldirs + allfiles) | ||
else: | ||
self.rejected.append(dirs) # only existing files | ||
|