gmcapsule/gmcapsuled

26 lines
758 B
Plaintext
Raw Permalink Normal View History

2022-01-23 06:51:31 +00:00
#!/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
2022-01-23 06:51:31 +00:00
import argparse
2022-02-05 15:38:12 +00:00
import gmcapsule
2022-01-23 12:07:26 +00:00
from pathlib import Path
2022-01-23 06:51:31 +00:00
2022-02-05 15:38:12 +00:00
VERSION = gmcapsule.__version__
2022-01-23 06:51:31 +00:00
if __name__ == '__main__':
print(f"GmCapsule v{VERSION}")
2022-01-23 06:51:31 +00:00
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()
2022-01-23 06:51:31 +00:00
cfg = gmcapsule.Config(args.config_file)
capsule = gmcapsule.Capsule(cfg)
capsule.run()