diff --git a/.gitignore b/.gitignore index ad96969..d19241f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ __pycache__/ /dist/ -/src/de.p1st.exec_notify.egg-info/ +/src/exec_notify.egg-info/ /build/ diff --git a/README.md b/README.md index cf0cf87..954d4df 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # exec-notify -* Send email notification if command fails with [exec-notify](src/de/p1st/exec_notify/exec_notify.py). -* Send unconditional notifications with [do-notify](src/de/p1st/exec_notify/do_notify.py). +* Send email notification if command fails with [exec-notify](src/exec_notify/exec_notify.py). +* Send unconditional notifications with [do-notify](src/exec_notify/do_notify.py). ## TODOs @@ -50,7 +50,6 @@ Then install with one of the following options: ```shell sudo python3 -m pip install --upgrade --force-reinstall git+https://codeberg.org/privacy1st/exec-notify sudo python3 -m pip install --upgrade --force-reinstall . -sudo python3 -m pip install --upgrade --index-url https://test.pypi.org/simple/ --no-deps de.p1st.exec-notify ``` ### Installation - venv @@ -78,9 +77,6 @@ python3 -m pip install git+https://codeberg.org/privacy1st/exec-notify # Install from local directory python3 -m pip install ~/Downloads/git/exec-notify/ - -# Install the module from TestPyPI -python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps --upgrade de.p1st.exec-notify ``` Note about usage of TestPyPI and `--no-deps`: diff --git a/setup.cfg b/setup.cfg index 6ca25c2..db9596f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,5 +32,5 @@ where = src [options.entry_points] ; https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html console_scripts= - exec-notify = de.p1st.exec_notify.exec_notify:main - do-notify = de.p1st.exec_notify.do_notify:main + exec-notify = exec_notify.exec_notify:main + do-notify = exec_notify.do_notify:main diff --git a/src/de/p1st/exec_notify/__init__.py b/src/de/p1st/exec_notify/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/de/p1st/exec_notify/lib/__init__.py b/src/de/p1st/exec_notify/lib/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/de/__init__.py b/src/exec_notify/__init__.py similarity index 100% rename from src/de/__init__.py rename to src/exec_notify/__init__.py diff --git a/src/de/p1st/exec_notify/do_notify.py b/src/exec_notify/do_notify.py similarity index 95% rename from src/de/p1st/exec_notify/do_notify.py rename to src/exec_notify/do_notify.py index a795f7d..da82b03 100755 --- a/src/de/p1st/exec_notify/do_notify.py +++ b/src/exec_notify/do_notify.py @@ -3,7 +3,7 @@ import sys # print(sys.path) import socket -from de.p1st.exec_notify.lib import mail +from exec_notify.lib import mail def main(): diff --git a/src/de/p1st/exec_notify/exec_notify.py b/src/exec_notify/exec_notify.py similarity index 96% rename from src/de/p1st/exec_notify/exec_notify.py rename to src/exec_notify/exec_notify.py index 6d733b9..8a52dfc 100755 --- a/src/de/p1st/exec_notify/exec_notify.py +++ b/src/exec_notify/exec_notify.py @@ -5,7 +5,7 @@ from sys import argv import socket from typing import List -from de.p1st.exec_notify.lib import exec, mail, util +from exec_notify.lib import exec, mail, util def main(): diff --git a/src/de/p1st/__init__.py b/src/exec_notify/lib/__init__.py similarity index 100% rename from src/de/p1st/__init__.py rename to src/exec_notify/lib/__init__.py diff --git a/src/de/p1st/exec_notify/lib/config.py b/src/exec_notify/lib/config.py similarity index 98% rename from src/de/p1st/exec_notify/lib/config.py rename to src/exec_notify/lib/config.py index e3a3b0b..0097379 100644 --- a/src/de/p1st/exec_notify/lib/config.py +++ b/src/exec_notify/lib/config.py @@ -4,7 +4,7 @@ from pathlib import Path, PosixPath import configparser from typing import Tuple -from de.p1st.exec_notify.lib import util +from exec_notify.lib import util class LazyConfig: diff --git a/src/de/p1st/exec_notify/lib/exec.py b/src/exec_notify/lib/exec.py similarity index 100% rename from src/de/p1st/exec_notify/lib/exec.py rename to src/exec_notify/lib/exec.py diff --git a/src/de/p1st/exec_notify/lib/mail.py b/src/exec_notify/lib/mail.py similarity index 98% rename from src/de/p1st/exec_notify/lib/mail.py rename to src/exec_notify/lib/mail.py index 7ad4d83..2c49066 100644 --- a/src/de/p1st/exec_notify/lib/mail.py +++ b/src/exec_notify/lib/mail.py @@ -6,7 +6,7 @@ import ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart -from de.p1st.exec_notify.lib import config, util +from exec_notify.lib import config, util def sendMailOrWriteToFile(SUBJECT: str, BODY: str, informAboutLocalMail: bool = True): diff --git a/src/de/p1st/exec_notify/lib/util.py b/src/exec_notify/lib/util.py similarity index 100% rename from src/de/p1st/exec_notify/lib/util.py rename to src/exec_notify/lib/util.py diff --git a/tests/util_test.py b/tests/util_test.py index cb60708..1366983 100644 --- a/tests/util_test.py +++ b/tests/util_test.py @@ -1,6 +1,6 @@ import unittest -import de.p1st.exec_notify.lib.util as util +import exec_notify.lib.util as util class MyTestCase(unittest.TestCase):