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

Nested file support #226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Nested file support #226

wants to merge 2 commits into from

Conversation

TQZhang04
Copy link
Contributor

No description provided.

TQ Zhang added 2 commits January 10, 2025 18:57
Recursively searches nested folders for audio files to process. Extension and files to skip can be specified.
@TQZhang04 TQZhang04 linked an issue Jan 11, 2025 that may be closed by this pull request
@TQZhang04
Copy link
Contributor Author

TODO: allow entire directories to be ignored instead of individual files

Comment on lines +170 to +172
root_dir = os.path.abspath(root_dir)
audio_files = glob.glob(f"{root_dir}/**/*{extension}", recursive=True)
audio_files = [file for file in audio_files if file not in ignore]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also recommend using pathlib and/or rglob

Also consider whether lazy evaluation of the list evaluation is acceptable (use a generator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for nested file structures
2 participants