Add start of program and parser
This commit is contained in:
parent
6532f9c2a2
commit
a727fb9537
25
register.py
25
register.py
@ -1,6 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import os, sys
|
||||
import typing
|
||||
from pathlib import Path
|
||||
|
||||
XDG_DATA_HOME=os.getenv("XDG_DATA_HOME")
|
||||
XDG_DATA_HOME=(Path(XDG_DATA_HOME) if XDG_DATA_HOME is not None else
|
||||
Path('~').expanduser() / ".local/share")
|
||||
|
||||
MCSERVER_REGISTRY=XDG_DATA_HOME / "mcserver.json"
|
||||
|
||||
def insert_config(name: str, path: typing.Union[str, bytes, os.PathLike]=MCSERVER_REGISTRY):
|
||||
pass
|
||||
|
||||
def remove_config(name: str, path: typing.Union[str, bytes, os.PathLike]=MCSERVER_REGISTRY):
|
||||
pass
|
||||
|
||||
def get_config(name: str, path: typing.Union[str, bytes, os.PathLike]=MCSERVER_REGISTRY):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
p = argparse.ArgumentParser
|
||||
p = argparse.ArgumentParser(description="manage/read mcserver directory list")
|
||||
subp = p.add_subparsers(help="mode")
|
||||
parser_insert = subp.add_parser("insert", help="insert entry into directory list")
|
||||
parser_remove = subp.add_parser("remove", help="remove entry from directory list")
|
||||
parser_get = subp.add_parser("get", help="get entry from directory list")
|
||||
p.parse_args()
|
||||
|
Loading…
x
Reference in New Issue
Block a user