feat: add main entrypoint with skeleton code

This commit is contained in:
Julian Lobbes 2022-09-02 22:56:12 +02:00
parent 32ce865607
commit ebfc2ededc

27
dnsupdate.py Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env python3
"""A script which sends a Dynamic DNS update to the Ionos API."""
from pathlib import Path
import requests
from yaml import load
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
def main():
path_to_config_file = Path("config.yml").resolve()
# TODO Check if config file exists
# TODO parse config file
# TODO retrieve DNS update URL
# TODO send update
if __name__ == "__main__":
main()