-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharg_parser.py
26 lines (22 loc) · 1.2 KB
/
arg_parser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import argparse
from pathlib import Path
class ArgParser:
def __init__(self):
self.parser = argparse.ArgumentParser()
self.parser.add_argument('-i', '--input',
help='Full path to a directory. Default is wherever the script is. All folders will '
'be scanned recursively for \'song\' folders with *.ogg files inside.',
type=Path,
default='.')
self.parser.add_argument('-t', '--target-level',
help='Target loudness level in dB/LUFS (default: -11).',
type=float,
default=-11)
self.parser.add_argument('-ar', '--sample-rate',
help='Audio sample rate to use for output files in Hz. MM+ is 44100 and PDAFT is '
'48000. You should change it'
'depending on whether you work with AFT or MM+ files.',
type=int,
default=44100)
def parse_args(self):
return self.parser.parse_args()