1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 03:24:20 +00:00
royalnet/royalpack/__main__.py

34 lines
1.2 KiB
Python
Raw Normal View History

2021-04-03 16:43:34 +00:00
import royalnet.engineer as engi
import royalnet.scrolls as sc
2021-04-13 22:43:19 +00:00
import royalnet_console as rc
2021-04-03 16:43:34 +00:00
import pathlib
import logging
from . import commands
from .database import engine, base
2021-04-03 16:43:34 +00:00
logging.basicConfig(level="DEBUG")
config = sc.Scroll.from_file(namespace="ROYALPACK", file_path=pathlib.Path("royalpack.cfg.toml"))
2021-04-03 16:43:34 +00:00
2021-04-13 22:43:19 +00:00
engine_ = engine.lazy_engine.evaluate()
base.Base.metadata.create_all(engine_)
2021-04-03 16:43:34 +00:00
2021-04-13 22:43:19 +00:00
pda = engi.PDA(implementations=[
rc.ConsolePDAImplementation(name="1", extensions=[
engi.SQLAlchemyExtension(engine=engine_)
])
])
2021-04-13 22:43:19 +00:00
pda.implementations["console.1"].register_partialcommand(commands.ahnonlosoio, ["ahnonlosoio"])
# pda.implementations["console.1"].register_partialcommand(commands.answer, ["answer"])
# pda.implementations["console.1"].register_partialcommand(commands.cat, ["cat"])
# pda.implementations["console.1"].register_partialcommand(commands.color, ["color"])
# pda.implementations["console.1"].register_partialcommand(commands.ping, ["ping"])
# pda.implementations["console.1"].register_partialcommand(commands.ship, ["ship"])
# pda.implementations["console.1"].register_partialcommand(commands.rage_show, ["rage"])
# pda.implementations["console.1"].register_partialcommand(commands.rage_add, ["rage"])
2021-04-03 16:43:34 +00:00
2021-04-13 22:43:19 +00:00
pda.run()