import fnmatch
import glob
import os
-import os.path
import re
import sys
return copyright
def copy_header(path):
- header_path = os.path.dirname(path) + "/header.tpl"
+ header_path = path + "/header.tpl"
header = open(header_path, "r")
for line in header:
sys.stdout.write(line)
def copy_footer(path):
- footer_path = os.path.dirname(path) + "/footer.tpl"
+ footer_path = path + "/footer.tpl"
footer = open(footer_path, "r")
for line in footer:
sys.stdout.write(line)
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()
-cfg_dir = sys.argv[0]
+if (args.config is None):
+ cfg_dir = os.path.dirname(sys.argv[0])
+else:
+ cfg_dir = args.config
copy_header(cfg_dir)