parser=argparse.ArgumentParser(description="Generate SSH keys for Gitea repositories and add them as secrets")
parser.add_argument("--org",required=True,type=str,help="The organization to generate keys for")
parser.add_argument("--token-path",metavar='PATH',required=True,type=Path,help="Path to a file containing the Gitea API token")
parser.add_argument("--api-url",metavar='URL',type=str,help="The URL of the Gitea API",default="https://git.pvv.ntnu.no/api/v1")
parser.add_argument("--key-dir",metavar='PATH',type=Path,help="The directory to store the generated keys in",default="/run/gitea-web-secret-provider")
parser.add_argument("--authorized-keys-path",metavar='PATH',type=Path,help="The path to the resulting authorized_keys file",default="/etc/ssh/authorized_keys.d/gitea-web-secret-provider")
parser.add_argument("--rrsync-script",metavar='PATH',type=Path,help="The path to a rrsync script, taking the destination path as its single argument")
parser.add_argument("--web-dir",metavar='PATH',type=Path,help="The directory to sync the repositories to",default="/var/www")