Package: metalfinder
metalfinderis a command-line tool that scans a music directory to find
concerts near a specified location.InstallationUsing pipYou can installmetalfinderusing pip:$ pip install metalfinderUsing the Debian packagemetalfinderis available in theDebian archive, starting with Debian 12
(Bookworm). You can install it by running:$ apt install metalfinderFrom sourceYou can installmetalfinderfrom source using flit:$ apt install flit
$ git clone https://gitlab.com/baldurmen/metalfinder
$ cd metafinder
$ flit installRun without installingIf you already have all the required dependencies, you can runmetalfinderdirectly from the source without installing it:$ python3 -m metalfinderAPI ProvidersBandsintownTo use theBandsintownAPI provider, you will need aBandsintown App ID.
This is your API key and it should be kept private.Other providersDo you know a good website that tracks concerts and has a somewhat public API?
If keys are not too hard to get, I’d be more than happy to implement it!CLI optionsHere is an example of how to usemetalfinder:$ export METALFINDER_BIT_APPID=mysecretapikey
$ metalfinder -d "/home/foo/Music" -o "/home/foo/metalfinder.atom" -l "Montreal"The complete CLI parameters can be found below and in the man page:Usage:
    metalfinder [-d <directory>] -o <output> -l <location> -b <app_id> [-c <cache>] [-m <date>] [--verbose]
    metalfinder (-h | --help)
    metalfinder --version

Options:
    -h  --help                   Show the help screen
    --version                    Output version information
    --verbose                    Run the program in verbose mode
    -d  --directory <directory>  Music directory to scan to create artist list
    -o  --output    <output>     Path to the desired output file. You can either
                                 chose a text file (foo.txt), a JSON file (foo.json)
                                 or an ATOM file (foo.atom)
    -l  --location  <location>   Name of the city to use when looking for concerts
    -b  --bit-appid <app_id>     Bandsintown App ID (API key). Optional when the
                                 METALFINDER_BIT_APPID environment variable is set.
    -c  --cache-dir <cache_dir>  Path to the cache directory. Defaults to
                                 $HOME/.cache/metalfinder/
    -m  --max-date  <date>       Max date in YYYY-MM-DD format (ISO 8601)Environment Variablesmetalfinderuses the following environment variables:METALFINDER_BIT_APPID: Bandsintown API key. Useful to keep your API key from
leaking when running metalfinder on the command line.Running without a local directoryEven thoughmetalfinderdefaults to scanning a local directory to create a
list of artists, it is possible to use an existing artist list created by some
other program.Using a subsonic serverThis feature has not yet been implemented. Seeissue #15.Using an MDP serverSince the--directoryoption is optional, if it is missing, only the cache
directory will be inspected. In this directory,metalfinderlooks for a file
namedartist_cachewhich consists of a list of artist names separated by
new lines.If you have anMPDserver, you can generate this file with the help of thempcclient:$ mpc list Artist > ~/.cache/metalfinder/artist_cacheDevelopmentRunning the test suiteYou can run the test suite locally usingpipandpytest:$ python3 -m venv metalfinder
$ cd metalfinder
$ source bin/activate
$ git clone https://gitlab.com/baldurmen/metalfinder
$ cd metafinder
$ python3 -m pip install .[test]
$ python3 -m pytestBuilding the man pageThe man page formetalfindercan be generated using therst2mancommand
line tool provided by thedocutilsproject:$ rst2man manpage.rst metalfinder.1LicenseThis project was written byLouis-Philippe Véronneauand is licensed under
the GNU GPLv3 or any later version.The code to query the Bandsintown API (metalfinder/api/bandsintown.py) and
the tests that accompany it (tests/test_api_bandsintown.py) come from thepython-bandsintownproject. These files were written by Chris Forrette and
are licensed under the MIT license. As such, specific license headers have been
added to them.