List commands in main.py; stop depending on entry points.
Entry points are a major hassle to deal with during distribution and this really isn't any worse than that. Could probably be automated further but I'd rather have something that works consistently.
This commit is contained in:
parent
8e48915a27
commit
789064aa0d
2 changed files with 38 additions and 4 deletions
39
dcc/main.py
39
dcc/main.py
|
@ -3,13 +3,50 @@ import sys
|
|||
from cliff.app import App
|
||||
from cliff.commandmanager import CommandManager
|
||||
|
||||
import dcc.concat
|
||||
import dcc.configure
|
||||
import dcc.dsda
|
||||
import dcc.eureka
|
||||
import dcc.extract
|
||||
import dcc.fabricate
|
||||
import dcc.fetch
|
||||
import dcc.ls
|
||||
import dcc.pb
|
||||
import dcc.play
|
||||
import dcc.put
|
||||
import dcc.record
|
||||
import dcc.rib
|
||||
import dcc.ss
|
||||
import dcc.text
|
||||
import dcc.thumb
|
||||
|
||||
class DCC(App):
|
||||
def __init__(self):
|
||||
cm = CommandManager(None)
|
||||
commands = {
|
||||
"concat": dcc.concat.Concat,
|
||||
"configure": dcc.configure.Configure,
|
||||
"dsda": dcc.dsda.DSDA,
|
||||
"eureka": dcc.eureka.Eureka,
|
||||
"extract": dcc.extract.Extract,
|
||||
"fabricate": dcc.fabricate.Fabricate,
|
||||
"fetch": dcc.fetch.Fetch,
|
||||
"ls": dcc.ls.List,
|
||||
"pb": dcc.pb.PB,
|
||||
"play": dcc.play.Play,
|
||||
"put": dcc.put.Put,
|
||||
"record": dcc.record.Record,
|
||||
"rib": dcc.rib.RIB,
|
||||
"ss": dcc.ss.SS,
|
||||
"text": dcc.text.Text,
|
||||
"thumb": dcc.thumb.Thumb,
|
||||
}
|
||||
for n, c in commands.items():
|
||||
cm.add_command(n, c)
|
||||
super().__init__(
|
||||
description="Doom Command Center",
|
||||
version="0.0.1",
|
||||
command_manager=CommandManager("dcc"),
|
||||
command_manager=cm,
|
||||
deferred_help=True,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue