#!/usr/bin/env python

# Client for submitting feature files to the AcousticBrainz project

# Copyright 2014 Music Technology Group - Universitat Pompeu Fabra
# acousticbrainz-client is available under the terms of the GNU
# General Public License, version 3 or higher. See COPYING for more details.

from __future__ import print_function
import sys
from abz import acousticbrainz

def main(paths):
    for path in paths:
        acousticbrainz.process(path)
    print()

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("usage: abzsubmit [submissionpath [morepath ...]]", file=sys.stderr)
        sys.exit(1)

    try:
        main(sys.argv[1:])
    except KeyboardInterrupt:
        acousticbrainz.cleanup()
        raise
