Skip to main content

metalfinder is a command-line tool that scans a music directory to find concerts near a specified location.

Installation

Using pip

You can install metalfinder using pip:

$ pip install metalfinder

Using the Debian package

metalfinder is available in the Debian archive, starting with Debian 12 (Bookworm). You can install it by running:

$ apt install metalfinder

From source

You can install metalfinder from source using flit:

$ apt install flit
$ git clone https://gitlab.com/baldurmen/metalfinder
$ cd metalfinder
$ flit install

Run without installing

If you already have all the required dependencies, you can run metalfinder directly from the source without installing it:

$ python3 -m metalfinder

API Providers

Bandsintown

To use the Bandsintown API provider, you will need a Bandsintown App ID. This is your API key and it should be kept private.

Other providers

Do 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 options

Here is an example of how to use metalfinder:

$ export METALFINDER_BIT_APPID=mysecretapikey
$ metalfinder -d "/home/foo/Music" -o "/home/foo/metalfinder.atom" -l "Montreal" "Laval"

The complete CLI parameters can be found below and in the man page:

Usage:
    metalfinder [-d <directory>] -o <output> -l <location> [<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. Accepts one or more cities.
    -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 Variables

metalfinder uses 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 directory

Even though metalfinder defaults 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 server

This feature has not yet been implemented. See issue #15.

Using an MDP server

Since the --directory option is optional, if it is missing, only the cache directory will be inspected. In this directory, metalfinder looks for a file named artist_cache which consists of a list of artist names separated by new lines.

If you have an MPD server, you can generate this file with the help of the mpc client:

$ mpc list Artist > ~/.cache/metalfinder/artist_cache

Development

Running the test suite

You can run the test suite locally using pip and pytest:

$ python3 -m venv metalfinder
$ cd metalfinder
$ source bin/activate
$ git clone https://gitlab.com/baldurmen/metalfinder
$ cd metalfinder
$ python3 -m pip install .[test]
$ python3 -m pytest

Building the man page

The man page for metalfinder can be generated using the rst2man command line tool provided by the docutils project:

$ rst2man manpage.rst metalfinder.1

License

This project was written by Louis-Philippe Véronneau and 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 the python-bandsintown project. These files were written by Chris Forrette and are licensed under the MIT license. As such, specific license headers have been added to them.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metalfinder-2.2.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metalfinder-2.2.0-py2.py3-none-any.whl (24.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file metalfinder-2.2.0.tar.gz.

File metadata

  • Download URL: metalfinder-2.2.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for metalfinder-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9375d19c5fdd087a430d9e5c443250c7affab57f5bcd0a7339bd426d903f3fc4
MD5 a2a0cfd3d1cf00f33e0d42829eea8b6f
BLAKE2b-256 2dc7e3da0cf7aea98ad3925d897b40e12ebf19c66ab81222dced43093a79043f

See more details on using hashes here.

File details

Details for the file metalfinder-2.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: metalfinder-2.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for metalfinder-2.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1e30eb0b9f76b741b59680118cdeea8a2a609039373d9f8633c986340fa77630
MD5 67fa0620aafe61c4ec93947d87e8683b
BLAKE2b-256 6fbc3521a0b682fc45b6aa5028eeb1a1816501a930d70ccb0daf24d04fa78d6e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.3

2 files

2.1.0

2 files

2.0.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page