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

Mass copying tags in CLI? #31

Open
shillshocked opened this issue Dec 24, 2017 · 4 comments
Open

Mass copying tags in CLI? #31

shillshocked opened this issue Dec 24, 2017 · 4 comments

Comments

@shillshocked
Copy link

I would like to copy all tags from an MP4 to FLAC and MP3 of the same name. Can this be done via the command-line interface?

@Martchus
Copy link
Owner

Martchus commented Dec 24, 2017

I also like to have this feature, just never had the time to implement it.

So currently there are 2 options which are both a little bit inconvenient.

  1. Create a (bash) script which parses output of 'get' and passes it to the 'set' operation. Should be very easy with the help of some regex.
  2. Create a small "C++-Script" using the tagparser library directly.

To ease this in the future, I intend to allow specifying a file path as field value like it is already possible for the cover. A separate copy operation is also conceivable.


To support further tooling in gereral, it would also be interesting to have high-level bindings of the tagparser library to some scripting language, eg. Python. I just never started to develop such thing, because for me it is actually more straight forward to implement additional features in the tag editor itself. But it might make sense from the user perspective?

@shillshocked
Copy link
Author

Considering how many people use MP3 and FLAC files versus M4A, I would concur!

1 similar comment
@shillshocked
Copy link
Author

Considering how many people use MP3 and FLAC files versus M4A, I would concur!

@Martchus
Copy link
Owner

I extended the script API a little bit: 88989ff - This is of course not a simple "copy tags from file A to B" command-line option. It is actually more powerful but also more complicated to use. However, I could provide an example/bundled script to make it more easy to use. Actually, the script I adjusted in the change already does this for the cover and lyrics and the code could be extracted to a simpler script and generalized to cover all fields.

The script API approach has the advantage that locating the file(s) to copy tags from can be done from the script in the way that makes most sense for an existing directory structure. A dedicated copying command-line operation wouldn't be that flexible and supposedly one would have to manually specify the source file or resort to scripting after all (e.g. invoking the tag editor from a shell script).

The script API approach also gives one fine grained control over what tags/fields to copy and whether to override or append. This would also be doable via a dedicated copying command-line operation but it would become a bit complex.

The script API is also just part of the existing set operation which means it was easy to implement it. Maybe the same makes sense for a dedicated copying option, e.g. one could specify --values-from path [field1] [field2] (in addition to --values) and that would just add all values of the specified fields from the file under the specified path.

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

No branches or pull requests

2 participants