beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

Add --version flag #939

Closed gwern closed 10 years ago

gwern commented 10 years ago

Please add the common --version flag to beet, a flag which will print out the version of the running program. This assists debugging. Right now there seems to be no straightforward way to figure out which version you are actually running:

$ beet --version
Usage: 
  beet COMMAND [ARGS...]
  beet help COMMAND

beet: error: no such option: --version
$ beet help
Usage: 
  beet COMMAND [ARGS...]
  beet help COMMAND

Options:
  -l LIBRARY, --library=LIBRARY
                        library database file to use
  -d DIRECTORY, --directory=DIRECTORY
                        destination music directory
  -v, --verbose         print debugging information
  -c CONFIG, --config=CONFIG
                        path to configuration file
  -h, --help            how this help message and exit

Commands:
  config            show or edit the user configuration
  duplicates (dup)  List duplicate tracks or albums.
  fields            show fields available for queries and format strings
  fingerprint       generate fingerprints for items without them
  help (?)          give detailed help on a specific sub-command
  import (imp, im)  import new music
  lastgenre         fetch genres
  list (ls)         query the library
  lyrics            fetch song lyrics
  mbsync            update metadata from musicbrainz
  migrate           convert legacy config
  modify (mod)      change metadata fields
  move (mv)         move or copy items
  remove (rm)       remove matching items from the library
  replaygain        analyze for ReplayGain
  stats             show statistics about the library or a query
  submit            submit Acoustid fingerprints
  update (upd, up)  update the library
  version           output version information
  write             write tag information to files

In particular, this was a nuisance to me recently while installing: I had installed the Debian testing version but then I wanted the latest version and for whatever reason the sudo pip install beet incantation was throwing lots of runtime errors so I did permission-munging and was running into an error (issue 885) and wondering just which version I was running or if they were conflicting or something.

sampsyo commented 10 years ago

There's beet version, one from the bottom of that output. :smiley: Do you still think --version would be helpful?

gwern commented 10 years ago

Hm. I'm surprised I didn't notice that. I take it it wasn't added recently. I think a --version would still be useful since it's what everyone (or at least me) expects. At least it shouldn't be too hard if beet version is already written...

sampsyo commented 10 years ago

Done.