Fix configs
This commit is contained in:
parent
21f34726de
commit
5536dce8f8
@ -1 +1 @@
|
|||||||
2022.03.25-24
|
2022.03.25-25
|
||||||
|
@ -236,11 +236,11 @@ def downloader(args):
|
|||||||
fp.write("{}\n".format(url))
|
fp.write("{}\n".format(url))
|
||||||
|
|
||||||
|
|
||||||
def main(user, password, server, label, inout_file, path, live):
|
def main(user, password, server, label, inout_file, path, lib_user, lib_password, live):
|
||||||
|
|
||||||
if path:
|
if path:
|
||||||
path = '--with-library "{}" --username calibre --password pornoboobies'.format(
|
path = '--with-library "{}" --username {} --password {}'.format(
|
||||||
path)
|
path, lib_user, lib_password)
|
||||||
try:
|
try:
|
||||||
with open(devnull, 'w') as nullout:
|
with open(devnull, 'w') as nullout:
|
||||||
call(['calibredb'], stdout=nullout, stderr=nullout)
|
call(['calibredb'], stdout=nullout, stderr=nullout)
|
||||||
@ -346,7 +346,21 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
dest='live',
|
dest='live',
|
||||||
help='Include this if you want all the output to be saved and posted live. Useful when multithreading.')
|
help='Include this if you want all the output to be saved and posted live. Useful when multithreading.')
|
||||||
|
|
||||||
|
option_parser.add_option(
|
||||||
|
'-q',
|
||||||
|
'--libuser',
|
||||||
|
action='store',
|
||||||
|
dest='libuser',
|
||||||
|
help='Calibre User. Required.')
|
||||||
|
|
||||||
|
option_parser.add_option(
|
||||||
|
'-w',
|
||||||
|
'--libpassword',
|
||||||
|
action='store',
|
||||||
|
dest='libpassword',
|
||||||
|
help='Calibre Password. Required.')
|
||||||
|
|
||||||
(options, args) = option_parser.parse_args()
|
(options, args) = option_parser.parse_args()
|
||||||
|
|
||||||
if options.config:
|
if options.config:
|
||||||
@ -368,6 +382,20 @@ if __name__ == "__main__":
|
|||||||
'login', 'password').strip())
|
'login', 'password').strip())
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
options.libuser = updater(
|
||||||
|
options.libuser, config.get(
|
||||||
|
'login', 'libuser').strip())
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
options.libpassword = updater(
|
||||||
|
options.libpassword, config.get(
|
||||||
|
'login', 'libpassword').strip())
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
options.server = updater(
|
options.server = updater(
|
||||||
@ -413,4 +441,6 @@ if __name__ == "__main__":
|
|||||||
options.mailbox,
|
options.mailbox,
|
||||||
options.input,
|
options.input,
|
||||||
options.library,
|
options.library,
|
||||||
|
options.libuser,
|
||||||
|
options.libpassword,
|
||||||
options.live)
|
options.live)
|
||||||
|
@ -41,7 +41,7 @@ def touch(fname, times=None):
|
|||||||
def main(options):
|
def main(options):
|
||||||
try:
|
try:
|
||||||
res = check_output(
|
res = check_output(
|
||||||
"python3.9 fanficdownload.py -c config.ini",
|
f"python3.9 /app/fanficdownload.py -c {options.config}",
|
||||||
shell=True,
|
shell=True,
|
||||||
stderr=STDOUT)
|
stderr=STDOUT)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -3,6 +3,8 @@ user=
|
|||||||
password=
|
password=
|
||||||
server=
|
server=
|
||||||
mailbox=
|
mailbox=
|
||||||
|
libuser=
|
||||||
|
libpassword=
|
||||||
|
|
||||||
[locations]
|
[locations]
|
||||||
library=
|
library=
|
||||||
|
Loading…
Reference in New Issue
Block a user