Updated to add webgui
This commit is contained in:
parent
2979c9672b
commit
edabd932de
|
@ -1,13 +1,16 @@
|
|||
# EBook Downloader
|
||||
This script searches for books on libgen and then downloads them. It supports being run interactivly as well as running with options from the command line.
|
||||
This script searches for books on libgen and then downloads them. It supports being run interactivly as well as running with options from the command line. Additionally there is a simple WebUI that can be used for multiple users to request books.
|
||||
|
||||
### Installing
|
||||
1. Download/clone the repo
|
||||
2. `pip install -r requirments.txt`
|
||||
|
||||
### WebUI
|
||||
1. run `python gui.py`
|
||||
|
||||
### Interactive Mode
|
||||
1. Run `python main.py`
|
||||
1. Run `python bookrequest.py`
|
||||
2. Follow the prompts on screen
|
||||
|
||||
### Unattended Mode
|
||||
1. `python main.py -b <booktitle>`
|
||||
1. `python bookrequest.py -b <booktitle>`
|
BIN
__pycache__/bookrequest.cpython-310.pyc
Normal file
BIN
__pycache__/bookrequest.cpython-310.pyc
Normal file
Binary file not shown.
|
@ -47,7 +47,7 @@ def main(argv):
|
|||
opts, args = getopt.getopt(argv, "hb:",["help=","book="])
|
||||
for opt, arg in opts:
|
||||
if opt in ('-h', "--help"):
|
||||
print('main.py -b <booktitle>')
|
||||
print('bookrequest.py -b <booktitle>')
|
||||
elif opt in ('-b', '--book'):
|
||||
book = arg
|
||||
results = searchBook(book, unattended=True)
|
10
gui.py
Normal file
10
gui.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from nicegui import *
|
||||
from bookrequest import *
|
||||
def pass_command() -> None:
|
||||
if title.value != '':
|
||||
result = searchBook(title.value, unattended=True)
|
||||
ui.notify('Searching and Downloading Book!')
|
||||
downloadBook(result)
|
||||
with ui.card().classes('absolute-center'):
|
||||
title = ui.input('Title').on('keydown.enter', pass_command)
|
||||
ui.run()
|
|
@ -1 +1,2 @@
|
|||
libgen_api==1.0.0
|
||||
nicegui==1.2.2
|
Loading…
Reference in New Issue
Block a user