ADD abspath to the default path for testing
This commit is contained in:
parent
7278cb6883
commit
b0f2833662
@ -33,7 +33,7 @@ def call_parser():
|
||||
parser.add_argument('-V', '--version', action='version', version='{} {}'.format(os.path.split(__file__)[1],__version__))
|
||||
parser.add_argument('-v', '--verbose', action='append_const', const = 1)
|
||||
# Rufzeichenliste_AT_Stand_010624.pdf
|
||||
parser.add_argument('-p', '--path', default='afu/Rufzeichenliste_AT_Stand_010624.pdf', help= 'skip the download if the specified path to a PDF file exists')
|
||||
parser.add_argument('-p', '--path', default='Rufzeichenliste_AT_Stand_010624.pdf', help= 'skip the download if the specified path to a PDF file exists')
|
||||
# parser.add_argument('-t', '--type', default='' , help='specify the output, supported types are [ CSV | JSON ]') # not implemented yet
|
||||
parser.add_argument('-o', '--output', default='', help='specify the file where the data are written to, default stdout')
|
||||
parser.add_argument('-m', '--mariadb', help='SQL interface to MariaDB (MySql) format "<IP-Address>:<Port> <User> <Passwd>" or defined in .config')
|
||||
@ -41,6 +41,12 @@ def call_parser():
|
||||
|
||||
opt = parser.parse_args()
|
||||
opt.verbose = 0 if opt.verbose is None else sum(opt.verbose)
|
||||
ask = opt.path != ''
|
||||
base = os.path.basename(opt.path)
|
||||
dir = os.path.dirname(opt.path)
|
||||
if opt.path != '' and os.path.dirname(opt.path) == '':
|
||||
opt.path = os.path.join(os.path.dirname(os.path.abspath(__file__)), opt.path)
|
||||
|
||||
return opt
|
||||
|
||||
def call_website(url,verbose,path='',interactive=False,output='',mariadb=''):
|
||||
|
Loading…
Reference in New Issue
Block a user