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

export: Add additional export formats #3402

Closed
austinmm opened this issue Oct 11, 2019 · 0 comments
Closed

export: Add additional export formats #3402

austinmm opened this issue Oct 11, 2019 · 0 comments
Labels
feature features we would like to implement

Comments

@austinmm
Copy link
Contributor

austinmm commented Oct 11, 2019

Use case

I want the ability to export my music library in more ways than just the JSON format.

Solution

The export plugin has a factory method to allow for the easy addition of different formats. All that is needed is to create additional concrete factory classes for new formats such as XML or CSV. The only other main change is adding a new option such as -f and --format to be able to specify what type of format to export as, default is still JSON. For example...
beet export -f csv -i 'title,album' ACDC
I have updated the export plugin already to reflect these proposed enhancements, which can be viewed here. In the pull request linked to, I also created a unit test for the export plugin since there wasn't one already. I have never written a unit test in python before or for a beets plugin so I'm sure it will need updating.

Alternatives

I can't think of any better/another way.

@sampsyo sampsyo added the feature features we would like to implement label Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

2 participants