gmcapsule/gmcapsuled

26 lines
758 B
Python
Executable File

#!/usr/bin/env python3
# GmCapsule: Extensible Server for Gemini and Titan
#
# Copyright (c) 2022 Jaakko Keränen <jaakko.keranen@iki.fi>
# License: BSD-2-Clause
import argparse
import gmcapsule
from pathlib import Path
VERSION = gmcapsule.__version__
if __name__ == '__main__':
print(f"GmCapsule v{VERSION}")
argp = argparse.ArgumentParser(description='GmCapsule is an extensible server for Gemini and Titan.')
argp.add_argument('-c', '--config',
dest='config_file',
default=Path.home() / '.gmcapsulerc',
help='Configuration file to load at startup')
args = argp.parse_args()
cfg = gmcapsule.Config(args.config_file)
capsule = gmcapsule.Capsule(cfg)
capsule.run()