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

Accept multiple file/directory names on commandline #567

Merged
merged 1 commit into from Sep 24, 2021

Conversation

GeoffRichards
Copy link
Contributor

This allows running from programs such as cmus which expect a tagger to
be able to accept more than one filename or directory name. It also
makes it more convenient to launch puddletag from the command line for
ad-hoc editing of several files. Previously puddletag would simply
ignore any non-option arguments after the first one.

This allows running from programs such as cmus which expect a tagger to
be able to accept more than one filename or directory name. It also
makes it more convenient to launch puddletag from the command line for
ad-hoc editing of several files. Previously puddletag would simply
ignore any non-option arguments after the first one.
@@ -348,9 +348,11 @@ if __name__ == '__main__':

# Check if dirnames passed on command line.
if filenames:
dirname = filenames[0]
if dirname and os.path.exists(dirname):
win.openDir(dirname, False)
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you removed the functionality of specifying a directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, opening a directory still works. If you run "puddletag dirname" you end up with an array of filenames containing just ["dirname"], and that gets opened here:

win.openFiles(filenames, False)

It loads all the files under that directory, same as before.

@sandrotosi sandrotosi merged commit 0ca419b into puddletag:master Sep 24, 2021
@sandrotosi
Copy link
Member

thanks @GeoffRichards for your contribution to puddletag!

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.

None yet

2 participants