MetaBrainz Foundation

Add a $title script function to MusicBrainz Picard

MusicBrainz Picard offers a simple scripting language for manipulating the tags and file names of music files.

This scripting language currently has no function to convert a string so that the first character of every word gets capitalized. E.g. someone might prefer a song title to be written "Lost In The Supermarket" instead of "Lost in the Supermarket". There is already a Picard plugin called titlecase which does something similar, but it is not as flexible as having a scripting function included in Picard itself.

Steps:

  1. Create a function func_title, which is based on the title function of the titlecase plugin, to the file script.py
  2. Add unit tests to test that the function works as expected
  3. Register the func_title function as a scripting functon with register_script_function
  4. Document the func_title function in the code
  5. Test that the function works in Picard by adding a script in Picard's options using the $title() function

Once completed, submit a pull request with your changes to the Github repository, and respond to any suggestions and requests by the Picard developers until the pull request is approved (you do not need to wait until it gets merged).

Task tags

  • python
  • picard
  • git
  • scripting
  • github

Students who completed this task

virus

Task type

  • code Code
close

2018