示例#1
0
def collectiongain_options():
    opts = common_options()

    opts.add_option("--ignore-cache", help="Don't trust implicit assumptions "
                    "about what was already done, instead check all files for "
                    "Replay Gain data explicitly.", dest="ignore_cache",
                    action="store_true")

    opts.set_defaults(ignore_cache=False)

    opts.set_usage("%prog [options] MUSIC_DIR")
    opts.set_description("Calculate Replay Gain for a large set of audio files "
                         "without asking many questions. This program "
                         "calculates an album ID for any audo file in "
                         "MUSIC_DIR. Then, album gain will be applied to all "
                         "files with the same album ID. The album ID is "
                         "created from file tags as follows: If an 'album' tag "
                         "is present, it is joined with the contents of an "
                         "'albumartist' tag, or, if that isn't set, the "
                         "contents of the 'artist' tag, or nothing if there is "
                         "no 'artist' tag as well. On the other hand, if no "
                         "'album' tag is present, the file is assumed to be a "
                         "single track without album; in that case, no album "
                         "gain will be calculated for that file.")
    
    return opts
示例#2
0
def rgain_options():
    opts = common_options()
    
    opts.add_option("--no-album", help="Don't write any album gain "
                    "information.", dest="album", action="store_false")
    opts.add_option("--show", help="Don't calculate anything, simply show "
                    "Replay Gain information for the specified files. In this "
                    "mode, all other options save for '--mp3-format' are "
                    "ignored, for they would make no sense.", dest="show",
                    action="store_true")
    
    opts.set_defaults(album=True, show=False)
    
    opts.set_usage("%prog [options] AUDIO_FILE [AUDIO_FILE ...]")
    opts.set_description("Apply or display Replay Gain information for audio "
                         "files. This program is similar to the likes of "
                         "'vorbisgain' or 'mp3gain': You pass in some files, "
                         "they are analyzed and receive their share of Replay "
                         "Gain. The difference is that '%prog' supports "
                         "several file formats, namely Ogg Vorbis (anything "
                         "you'd put into an Ogg container, actually), Flac, "
                         "WavPack and MP3. Also, it allows you to view "
                         "existing Replay Gain information in any of those "
                         "file types.")
    
    return opts