diff --git a/.gitignore b/.gitignore index 9aabce7..a9bd19a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /printers.yaml /__pypackages__/ /.pdm.toml +__pycache__/ diff --git a/octoprint_reservations/__init__.py b/octoprint_reservations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/google_calendar.py b/octoprint_reservations/google_calendar.py similarity index 100% rename from google_calendar.py rename to octoprint_reservations/google_calendar.py diff --git a/main.py b/octoprint_reservations/main.py similarity index 96% rename from main.py rename to octoprint_reservations/main.py index 332435f..a397e6e 100755 --- a/main.py +++ b/octoprint_reservations/main.py @@ -5,7 +5,7 @@ from datetime import datetime, timedelta from octorest import OctoRest from ruamel.yaml import YAML -from google_calendar import CalendarService +from .google_calendar import CalendarService def get_printer_job(calendar, printer): diff --git a/pyproject.toml b/pyproject.toml index 5a0168c..956c42c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "Octoprint Reservations" +name = "octoprint_reservations" version = "0.1.0" description = "" authors = [{ name = "Adam Goldsmith", email = "adam@adamgoldsmith.name" }] @@ -12,6 +12,9 @@ dependencies = [ ] requires-python = ">=3.9" +[project.scripts] +octoreservations = "octoprint_reservations.main:main" + [tool.pdm] [[tool.pdm.source]] url = "https://pypi.org/simple"