"beet version" command

This commit is contained in:
Adrian Sampson 2011-01-20 09:23:39 -08:00
parent 93594bac5a
commit bff9f2e808
3 changed files with 14 additions and 1 deletions

1
NEWS
View file

@ -33,6 +33,7 @@
* Fixed an UnboundLocalError when no matches are found during autotag.
* Fixed a Unicode encoding error when entering special characters into
the "manual search" prompt.
* New command "beet version" just shows the current version.
1.0b5
-----

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
__version__ = '1.0b6'
__author__ = 'Adrian Sampson <adrian@radbox.org>'
import beets.library
Library = beets.library.Library

View file

@ -735,3 +735,13 @@ def stats_func(lib, config, opts, args):
show_stats(lib, ui.make_query(args))
stats_cmd.func = stats_func
default_commands.append(stats_cmd)
# version: Show current beets version.
def show_version(lib, config, opts, args):
print 'beets version %s' % beets.__version__
version_cmd = ui.Subcommand('version',
help='output version information')
version_cmd.func = show_version
default_commands.append(version_cmd)