Made a few changes to allow docker useage.
This commit is contained in:
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
FROM python:3
|
||||||
|
ADD main.py /
|
||||||
|
|
||||||
|
VOLUME /download/
|
||||||
|
|
||||||
|
RUN pip install manga-py
|
||||||
|
RUN pip install sqlalchemy
|
||||||
|
RUN pip install pymysql
|
||||||
|
|
||||||
|
|
||||||
|
CMD ["python", "./main.py"]
|
||||||
21
main.py
21
main.py
@@ -22,8 +22,9 @@ def download():
|
|||||||
url = []
|
url = []
|
||||||
base = []
|
base = []
|
||||||
name = []
|
name = []
|
||||||
PATH = 'Manga/'
|
#PATH = 'Manga/'
|
||||||
# PATH = 'smb://MediaServer._smb._tcp.local/Downloads/Manga/'
|
# PATH = 'smb://MediaServer._smb._tcp.local/Downloads/Manga/'
|
||||||
|
PATH = '/download/'
|
||||||
for x in result:
|
for x in result:
|
||||||
# print(result[y][0])
|
# print(result[y][0])
|
||||||
url.append(result[y][0])
|
url.append(result[y][0])
|
||||||
@@ -40,7 +41,8 @@ def download():
|
|||||||
|
|
||||||
if active[0] != 0:
|
if active[0] != 0:
|
||||||
print("""manga-py """ + base[y]+url[y] + """ -n \"""" + name[y] + """\" -d \"""" + PATH + """\" -z -g """)
|
print("""manga-py """ + base[y]+url[y] + """ -n \"""" + name[y] + """\" -d \"""" + PATH + """\" -z -g """)
|
||||||
execute = """manga-py """ + base[y]+url[y] + """ -n \"""" + name[y] + """\" -d \"""" + PATH + """\" -z -g """
|
|
||||||
|
execute = """manga-py """ + base[y]+url[y] + """ -n \"""" + name[y] + """\" -d \"""" + PATH + """\" -z"""
|
||||||
os.system(execute)
|
os.system(execute)
|
||||||
y = y+1
|
y = y+1
|
||||||
|
|
||||||
@@ -85,10 +87,11 @@ def upload_jason():
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
print("1. Download \n 2. Upload\n 3. Exit")
|
print("1. Download \n 2. Upload\n 3. Exit")
|
||||||
val = input(">>>")
|
download()
|
||||||
if val == "1":
|
# val = input(">>>")
|
||||||
download()
|
# if val == "1":
|
||||||
elif val == "2":
|
# download()
|
||||||
upload_jason()
|
# elif val == "2":
|
||||||
elif val == "3":
|
# upload_jason()
|
||||||
exit()
|
# elif val == "3":
|
||||||
|
# exit()
|
||||||
Reference in New Issue
Block a user