1234567891011121314151617181920212223242526272829303132333435 |
- import sqlite3
- import argparse
- def load_config():
- pass;
- def load_message_templates():
- pass
- def check_heartbeat():
- pass
- def update_heartbeat():
- print("Ba-duh")
- def initialize_sqlite():
- print("Initializing...")
- if __name__ == "__main__":
- # Initialize the CLI arguments
- parser = argparse.ArgumentParser(
- prog="DeadTrunkSwitch",
- description="A Mastodon-based deadman's switch",
- formatter_class=argparse.ArgumentDefaultsHelpFormatter
- )
- parser.add_argument("-d", "--database", default="./db.sqlite", help="The SQLite file to track the switch with")
- action_group = parser.add_mutually_exclusive_group()
- action_group.add_argument("--checkIn", action="store_true", help="Update the last check-in time")
- action_group.add_argument("--init", action="store_true", help="Initialize the database for the deadman's switch")
- args = parser.parse_args()
- # Begin option handling
- if args.init:
- initialize_sqlite()
- elif args.checkIn:
- update_heartbeat()
|