30 lines
1.0 KiB
Python
Executable File
30 lines
1.0 KiB
Python
Executable File
#!/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(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()
|