You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: