This commit is contained in:
parent
86d4f8f1d3
commit
983969ed9e
BIN
dist/Zhurnal-1.4.37-py3-none-any.whl
vendored
BIN
dist/Zhurnal-1.4.37-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/zhurnal-1.3.37.tar.gz
vendored
BIN
dist/zhurnal-1.3.37.tar.gz
vendored
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
[metadata]
|
||||
name = Zhurnal
|
||||
name = zhurnal
|
||||
version = 1.4.37
|
||||
description = Web executor and logger
|
||||
author = retoor
|
||||
@ -15,7 +15,8 @@ package_dir =
|
||||
python_requires = >=3.7
|
||||
install_requires =
|
||||
aiohttp
|
||||
|
||||
app @ git+https://molodetz.nl/retoor/app.git
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
|
||||
|
@ -8,6 +8,7 @@ License: MIT
|
||||
Requires-Python: >=3.7
|
||||
Description-Content-Type: text/markdown
|
||||
Requires-Dist: aiohttp
|
||||
Requires-Dist: app@ git+https://molodetz.nl/retoor/app.git
|
||||
|
||||
# Zhurnal
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
aiohttp
|
||||
app@ git+https://molodetz.nl/retoor/app.git
|
||||
|
@ -4,7 +4,7 @@ import shlex
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
from app.app import Application as BaseApplication
|
||||
from aiohttp import web
|
||||
|
||||
from zhurnal import log
|
||||
@ -199,7 +199,7 @@ let scrollTop = window.scrollY; // Current scroll position
|
||||
"""
|
||||
|
||||
|
||||
class Zhurnal(web.Application):
|
||||
class Zhurnal(BaseApplication):
|
||||
|
||||
def __init__(self, commands: List[str], *args, **kwargs):
|
||||
self.commands = commands or []
|
||||
@ -307,18 +307,34 @@ def parse_args():
|
||||
"--host",
|
||||
type=str,
|
||||
default="localhost",
|
||||
required=False,
|
||||
help="Hostname or IP address (default: localhost).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--port", type=int, default=8080, help="Port number (default: 8080)."
|
||||
"--port",
|
||||
type=int,
|
||||
default=0,
|
||||
required=False,
|
||||
help="Port number (default: 8080).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--username", type=str, default=None, help="Username if auth is required."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--password", type=str, default=None, help="Password if auth is required."
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def cli():
|
||||
args = parse_args()
|
||||
app = Zhurnal(commands=args.commands)
|
||||
app = Zhurnal(
|
||||
commands=args.commands,
|
||||
basic_username=args.username,
|
||||
basic_password=args.password,
|
||||
)
|
||||
for command in args.commands:
|
||||
log.info(f"Preparing execution of {command}.")
|
||||
log.info(f"Host: {args.host} Port: {args.port}")
|
||||
web.run_app(app, host=args.host, port=args.port)
|
||||
|
||||
app.run(host=args.host, port=args.port)
|
||||
|
Loading…
Reference in New Issue
Block a user