X-Git-Url: https://git.wpitchoune.net/gitweb/?p=mp3tohtml.git;a=blobdiff_plain;f=scripts%2Fmp3tohtml;h=156c252697f90d7501172d579438977dd4e603f9;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=HEAD;hpb=6bda0a8b5d292ff19fa658744763b90bfddb8474 diff --git a/scripts/mp3tohtml b/scripts/mp3tohtml old mode 100644 new mode 100755 index e69de29..156c252 --- a/scripts/mp3tohtml +++ b/scripts/mp3tohtml @@ -0,0 +1,37 @@ +#!/usr/bin/python2 + +# usage: mp3tohtml.py [-h] [--config CONFIG] dir +# +# Generate an HTML containing information about the MP3 files. +# +# positional arguments: +# dir The directory containing the MP3 files +# +# optional arguments: +# -h, --help show this help message and exit +# --config CONFIG The directory containing the configuration +# +# Last version of this tool can be get from the GIT repository: +# http://wpitchoune.net/mp3tohtml +# +# http://wpitchoune.net/mp3tohtml +# Released under the terms of the GPLv2 license. +# (c) 2016 Jean-Philippe Orsini + +import argparse +import mp3tohtml +import os +import sys + +parser = argparse.ArgumentParser(description='Generate an HTML containing information about the MP3 files.') +parser.add_argument('dir', help='The directory containing the MP3 files') +parser.add_argument("--config", help="The directory containing the configuration") + +args = parser.parse_args() + +if (args.config is None): + cfg_dir = os.path.dirname(sys.argv[0]) +else: + cfg_dir = args.config + +mp3tohtml.generate(args.dir, cfg_dir)