From 3e59fdfcdea8d8377225fe29fa3ea934035ca574 Mon Sep 17 00:00:00 2001 From: David Crook Date: Mon, 18 Nov 2019 20:07:13 -0700 Subject: [PATCH 01/14] update with python2/`keyring` caveat/workaround --- README.md | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4a34ef2..8fb8176 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,57 @@ -# OctoPrint-EmailNotifier +OctoPrint-EmailNotifier +======================= + +**UPDATE** *2019-Nov-18*: updated install as OctoPi 0.17 / OctoPrint 1.3.12 + +- OctoPrint 1.3.12 is still python2 based. `keyring` versions `19.0.0` or greater only support python>=3.5, so explicitly install older version of `keyring` (`18.0.1`\) + +--- Recieve email notifications when OctoPrint jobs are STARTED, COMPLETED, FAILED or CANCELLED. -* Forked from ericli1018/OctoPrint-EmailNotifier which is forked from anov/OctoPrint-EmailNotifier +- Forked from kotl/OctoPrint-EmailNotifier which is forked from ericli1018/OctoPrint-EmailNotifier which is forked from anov/OctoPrint-EmailNotifier ![Settings tab and email screenshot](extras/emailnotifier.png) -## Installation +Installation +------------ Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip): - https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip +``` +https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip +``` -## Configuration +Configuration +------------- -Your outgoing email account password is not stored with OctoPrint's settings. It is retrieved from your system [keyring](https://pypi.python.org/pypi/keyring#what-is-python-keyring-lib). Store your password from a Python prompt on your OctoPrint system using [`yagmail.register`](https://github.com/kootenpv/yagmail#username-and-password): +Your outgoing email account password is not stored with OctoPrint's settings. It is retrieved from your system [keyring](https://pypi.python.org/pypi/keyring#what-is-python-keyring-lib). Store your password from a Python prompt on your OctoPrint system using [`yagmail.register`](https://github.com/kootenpv/yagmail#username-and-password): - $ ~/oprint/bin/python - >>> import yagmail - >>> yagmail.register("SMTP username", "SMTP password") +``` +$ ~/oprint/bin/pip install keyring==18.0.1 + +$ ~/oprint/bin/python +>>> import yagmail +>>> import keyring +>>> yagmail.register("SMTP username", "SMTP password") +``` For some accounts, your SMTP username may be your complete `username@domain.com` address. To use yagmail (and thus OctoPrint-EmailNotifier) with Gmail, you may need to [allow less secure apps to access your account](https://support.google.com/accounts/answer/6010255?hl=en). -## Acknowledgements +- Server: `smtp.gmail.com` +- Serverport: `587` +- [X] Use TLS + +Acknowledgements +---------------- -Loosely based on [OctoPrint-Pushbullet](https://github.com/OctoPrint/OctoPrint-Pushbullet). +Loosely based on [OctoPrint-Pushbullet](https://github.com/OctoPrint/OctoPrint-Pushbullet). Uses [yagmail](https://github.com/kootenpv/yagmail) to send email. -## License +License +------- Licensed under the terms of the [AGPLv3](http://opensource.org/licenses/AGPL-3.0). From 33b30fb54c6b66b90fbbc619fcb7d181cd9f2822 Mon Sep 17 00:00:00 2001 From: David Crook Date: Mon, 18 Nov 2019 20:09:10 -0700 Subject: [PATCH 02/14] small format change --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fb8176..ac8b579 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,11 @@ OctoPrint-EmailNotifier Recieve email notifications when OctoPrint jobs are STARTED, COMPLETED, FAILED or CANCELLED. -- Forked from kotl/OctoPrint-EmailNotifier which is forked from ericli1018/OctoPrint-EmailNotifier which is forked from anov/OctoPrint-EmailNotifier +Forked from + +- kotl/OctoPrint-EmailNotifier which is forked from + - ericli1018/OctoPrint-EmailNotifier which is forked from + - anov/OctoPrint-EmailNotifier ![Settings tab and email screenshot](extras/emailnotifier.png) From 65e26bcc1d9aadb19f9a15e02d438a76e6134fc7 Mon Sep 17 00:00:00 2001 From: David Crook Date: Tue, 17 Dec 2019 21:23:18 -0700 Subject: [PATCH 03/14] update python2 supporting info --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac8b579..277817b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ OctoPrint-EmailNotifier ======================= +**UPDATE** *2019-Dec-15*: Another install on OctoPi 0.17 / OctoPrint 1.3.12 + +- For python2 support, along with `keyring` (`18.0.1`), also need to go with `keyrings.alt` (`3.1.1`\) + **UPDATE** *2019-Nov-18*: updated install as OctoPi 0.17 / OctoPrint 1.3.12 - OctoPrint 1.3.12 is still python2 based. `keyring` versions `19.0.0` or greater only support python>=3.5, so explicitly install older version of `keyring` (`18.0.1`\) @@ -20,6 +24,13 @@ Forked from Installation ------------ +**IMPORTANT**: On python2-based versions of OctoPrint, including 1.3.x, before attempting to install this plugin, first install python2-compatible version of some modules: + +``` +$ ~/oprint/bin/pip install keyring==18.0.1 +$ ~/oprint/bin/pip install keyrings.alt==3.1.1 +``` + Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip): ``` @@ -32,8 +43,6 @@ Configuration Your outgoing email account password is not stored with OctoPrint's settings. It is retrieved from your system [keyring](https://pypi.python.org/pypi/keyring#what-is-python-keyring-lib). Store your password from a Python prompt on your OctoPrint system using [`yagmail.register`](https://github.com/kootenpv/yagmail#username-and-password): ``` -$ ~/oprint/bin/pip install keyring==18.0.1 - $ ~/oprint/bin/python >>> import yagmail >>> import keyring From f76c73205d373f5ea401a37985b26cc5ed21123a Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 15:33:51 -0600 Subject: [PATCH 04/14] start on python3 migration --- .gitignore | 1 + octoprint_emailnotifier/__init__.py | 2 ++ setup.py | 10 +++++----- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9000907 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +OctoPrint_EmailNotifier.egg-info diff --git a/octoprint_emailnotifier/__init__.py b/octoprint_emailnotifier/__init__.py index b3ee9ca..52b57b8 100644 --- a/octoprint_emailnotifier/__init__.py +++ b/octoprint_emailnotifier/__init__.py @@ -12,6 +12,7 @@ from email.utils import formatdate from flask.ext.login import current_user +#from flask_login import current_user class EmailNotifierPlugin(octoprint.plugin.EventHandlerPlugin, octoprint.plugin.SettingsPlugin, @@ -175,6 +176,7 @@ def send_notification(self, subject="OctoPrint notification", body=[""], snapsho __plugin_name__ = "Email Notifier" +__plugin_pythoncompat__ = ">=2.7,<4" def __plugin_load__(): global __plugin_implementation__ diff --git a/setup.py b/setup.py index 3fcd794..708d656 100644 --- a/setup.py +++ b/setup.py @@ -14,20 +14,20 @@ plugin_name = "OctoPrint-EmailNotifier" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "0.1.1" +plugin_version = "0.2.0" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module -plugin_description = "Recieve email notifications when OctoPrint jobs are complete." +plugin_description = "Receive email notifications when OctoPrint jobs are complete." # The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module -plugin_author = "Jim DeVona" +plugin_author = "David Crook" # The plugin's author's mail address. -plugin_author_email = "jim@anoved.net" +plugin_author_email = "idcrook@users.noreply.github.com" # The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module -plugin_url = "https://github.com/kotl/OctoPrint-EmailNotifier" +plugin_url = "https://github.com/idcrook/OctoPrint-EmailNotifier" # The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module plugin_license = "AGPLv3" From a9b0e2d9e20c64a96e19178a9e60d0c468e75c5b Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 15:48:47 -0600 Subject: [PATCH 05/14] fix flask.ext error and update setup metadata --- octoprint_emailnotifier/__init__.py | 3 +- setup.py | 69 ++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/octoprint_emailnotifier/__init__.py b/octoprint_emailnotifier/__init__.py index 52b57b8..1171f31 100644 --- a/octoprint_emailnotifier/__init__.py +++ b/octoprint_emailnotifier/__init__.py @@ -11,8 +11,7 @@ from email.utils import formatdate from email.utils import formatdate -from flask.ext.login import current_user -#from flask_login import current_user +from flask_login import current_user class EmailNotifierPlugin(octoprint.plugin.EventHandlerPlugin, octoprint.plugin.SettingsPlugin, diff --git a/setup.py b/setup.py index 708d656..bf09a4a 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,27 @@ # already be installed automatically if they exist. plugin_additional_data = [] +# Any additional python packages you need to install with your plugin that are not contains in .* +plugin_additional_packages = [] + +# Any python packages within .* you do NOT want to install with your plugin +plugin_ignored_packages = [] + +# Additional parameters for the call to setuptools.setup. If your plugin wants to register additional entry points, +# define dependency links or other things like that, this is the place to go. Will be merged recursively with the +# default setup parameters as provided by octoprint_setuptools.create_plugin_setup_parameters using +# octoprint.util.dict_merge. +# +# Example: +# plugin_requires = ["someDependency==dev"] +# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]} +additional_setup_parameters = {} + +# README/long description file to use for PyPi uploads. Must be the full absolute path. If the filename ends on +# .md and pypandoc is installed a conversion from Markdown to ReStructured Text will be performed utilizing +# setuptools-markdown as additional setup requirement. +plugin_readme_file = "README.md" + ######################################################################################################################## from setuptools import setup @@ -51,8 +72,9 @@ import sys sys.exit(-1) -setup(**octoprint_setuptools.create_plugin_setup_parameters( +setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( identifier=plugin_identifier, + package=plugin_package, name=plugin_name, version=plugin_version, description=plugin_description, @@ -61,5 +83,50 @@ url=plugin_url, license=plugin_license, requires=plugin_requires, + additional_packages=plugin_additional_packages, + ignored_packages=plugin_ignored_packages, additional_data=plugin_additional_data )) + +if len(additional_setup_parameters): + from octoprint.util import dict_merge + setup_parameters = dict_merge(setup_parameters, additional_setup_parameters) + +if plugin_readme_file: + import os + + here = os.path.abspath(os.path.dirname(__file__)) + plugin_readme_file_path = os.path.join(here, plugin_readme_file) + + # make sure the file exists + if os.path.isfile(plugin_readme_file_path): + import codecs + + try: + with codecs.open(plugin_readme_file_path, "rb", "utf-8") as f: + plugin_readme_file_content = f.read() + + except Exception as e: + print("Error reading {} ({}), ignoring long description...".format(plugin_readme_file_path, str(e))) + + else: + # file exists, let's see if it's markdown or not + if plugin_readme_file.endswith(".md"): + print("File with long description apparently is in Markdown format, will convert to RST with pypandoc") + try: + import pypandoc + setup_requires = setup_parameters.get("setup_requires", []) + setup_parameters.update(dict( + setup_requires=setup_requires+["setuptools-markdown"], + long_description_markdown_filename=plugin_readme_file + )) + except: + print("No pypandoc installed, not using Markdown file as long description") + pass + else: + print("Using long description from {}...".format(plugin_readme_file_path)) + setup_parameters.update(dict( + long_description=plugin_readme_file_content + )) + +setup(**setup_parameters) \ No newline at end of file From 17e8848ffeb9db67ff1570c5e91b4be12a534d70 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 15:50:47 -0600 Subject: [PATCH 06/14] fix typo from refactor copy-paste --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bf09a4a..4876430 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ additional_packages=plugin_additional_packages, ignored_packages=plugin_ignored_packages, additional_data=plugin_additional_data -)) +) if len(additional_setup_parameters): from octoprint.util import dict_merge From 3269777c62d2c6610901890008ef81450cc2c1e6 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 16:02:25 -0600 Subject: [PATCH 07/14] add keyring as dependency --- octoprint_emailnotifier/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/octoprint_emailnotifier/__init__.py b/octoprint_emailnotifier/__init__.py index 1171f31..446650a 100644 --- a/octoprint_emailnotifier/__init__.py +++ b/octoprint_emailnotifier/__init__.py @@ -11,7 +11,7 @@ from email.utils import formatdate from email.utils import formatdate -from flask_login import current_user +from flask_login import current_user class EmailNotifierPlugin(octoprint.plugin.EventHandlerPlugin, octoprint.plugin.SettingsPlugin, diff --git a/setup.py b/setup.py index 4876430..39cb3d4 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ plugin_license = "AGPLv3" # Any additional requirements besides OctoPrint should be listed here -plugin_requires = ['yagmail', 'keyrings.alt'] +plugin_requires = ['yagmail', 'keyring', 'keyrings.alt'] # Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will # already be installed automatically if they exist. From 61573ccd4075b89d74a06aba0c2af4e091a80057 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 16:30:53 -0600 Subject: [PATCH 08/14] attempt 1: update for urllib python2/3 changes --- octoprint_emailnotifier/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/octoprint_emailnotifier/__init__.py b/octoprint_emailnotifier/__init__.py index 446650a..14578e5 100644 --- a/octoprint_emailnotifier/__init__.py +++ b/octoprint_emailnotifier/__init__.py @@ -160,8 +160,15 @@ def send_notification(self, subject="OctoPrint notification", body=[""], snapsho snapshot_url = self._settings.global_get(["webcam", "snapshot"]) if snapshot_url: try: - import urllib - filename, headers = urllib.urlretrieve(snapshot_url, tempfile.gettempdir()+"/snapshot.jpg") + try: + from urllib.parse import urlparse, urlencode + from urllib.request import urlretrieve, urlopen, Request + from urllib.error import HTTPError + except ImportError as e: + from urlparse import urlparse + from urllib import urlencode, urlretrieve + from urllib2 import urlopen, Request, HTTPError + filename, headers = urlretrieve(snapshot_url, tempfile.gettempdir()+"/snapshot.jpg") except Exception as e: self._logger.exception("Snapshot error (sending email notification without image): %s" % (str(e))) else: From 22d74b0f5265270382046205937009d9c5180405 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 16:37:28 -0600 Subject: [PATCH 09/14] whitespace silliness --- octoprint_emailnotifier/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/octoprint_emailnotifier/__init__.py b/octoprint_emailnotifier/__init__.py index 14578e5..a704d21 100644 --- a/octoprint_emailnotifier/__init__.py +++ b/octoprint_emailnotifier/__init__.py @@ -161,13 +161,13 @@ def send_notification(self, subject="OctoPrint notification", body=[""], snapsho if snapshot_url: try: try: - from urllib.parse import urlparse, urlencode + from urllib.parse import urlparse, urlencode from urllib.request import urlretrieve, urlopen, Request from urllib.error import HTTPError except ImportError as e: - from urlparse import urlparse + from urlparse import urlparse from urllib import urlencode, urlretrieve - from urllib2 import urlopen, Request, HTTPError + from urllib2 import urlopen, Request, HTTPError filename, headers = urlretrieve(snapshot_url, tempfile.gettempdir()+"/snapshot.jpg") except Exception as e: self._logger.exception("Snapshot error (sending email notification without image): %s" % (str(e))) From 919e8edeb442e26f58f92dc611cadb97247e5a36 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 16:56:57 -0600 Subject: [PATCH 10/14] updated with python3 support --- .gitignore | 3 ++- README.md | 31 ++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 9000907..ef037ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -OctoPrint_EmailNotifier.egg-info +*.egg-info/ +__pycache__/ \ No newline at end of file diff --git a/README.md b/README.md index 277817b..acc326e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ OctoPrint-EmailNotifier ======================= -**UPDATE** *2019-Dec-15*: Another install on OctoPi 0.17 / OctoPrint 1.3.12 +**UPDATE** *2020-Sep-30*: Version 0.2.0 updated **with python3 support** -- For python2 support, along with `keyring` (`18.0.1`), also need to go with `keyrings.alt` (`3.1.1`\) +- Tested on OctoPrint 1.4.x -**UPDATE** *2019-Nov-18*: updated install as OctoPi 0.17 / OctoPrint 1.3.12 - -- OctoPrint 1.3.12 is still python2 based. `keyring` versions `19.0.0` or greater only support python>=3.5, so explicitly install older version of `keyring` (`18.0.1`\) +- For python2 support, along with `keyring` (`18.0.1`), also need to go with `keyrings.alt` (`3.1.1`\) --- @@ -15,26 +13,37 @@ Recieve email notifications when OctoPrint jobs are STARTED, COMPLETED, FAILED o Forked from -- kotl/OctoPrint-EmailNotifier which is forked from - - ericli1018/OctoPrint-EmailNotifier which is forked from - - anov/OctoPrint-EmailNotifier +- `kotl/OctoPrint-EmailNotifier` which is forked from + - `ericli1018/OctoPrint-EmailNotifier` which is forked from + - `anov/OctoPrint-EmailNotifier` ![Settings tab and email screenshot](extras/emailnotifier.png) Installation ------------ -**IMPORTANT**: On python2-based versions of OctoPrint, including 1.3.x, before attempting to install this plugin, first install python2-compatible version of some modules: +If on Raspberry Pi, when you \[Send a test email\] you encounter this error: + + ImportError: libxslt.so.1: cannot open shared object file: No such file or directory + + +```console +$ sudo apt install libxslt-dev +# on later systems, if that does not work # $ sudo apt install libxslt1-dev ``` + +**IMPORTANT**: On python2-based versions of OctoPrint, including 1.3.x, before attempting to install this plugin, first install python2-compatible version of some modules: + +```console $ ~/oprint/bin/pip install keyring==18.0.1 $ ~/oprint/bin/pip install keyrings.alt==3.1.1 ``` -Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip): +Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/idcrook/OctoPrint-EmailNotifier/archive/python3.zip): ``` -https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip +https://github.com/idcrook/OctoPrint-EmailNotifier/archive/python3.zip ``` Configuration From e497b125c40da06edf6d41ae78ecc9bde196f341 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 17:05:52 -0600 Subject: [PATCH 11/14] minor changes to readme --- README.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index acc326e..7c8897b 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ OctoPrint-EmailNotifier **UPDATE** *2020-Sep-30*: Version 0.2.0 updated **with python3 support** -- Tested on OctoPrint 1.4.x +- Tested on OctoPrint `1.4.x` -- For python2 support, along with `keyring` (`18.0.1`), also need to go with `keyrings.alt` (`3.1.1`\) +For python2 support, see below for compatible `keyring` packages. --- @@ -22,17 +22,6 @@ Forked from Installation ------------ -If on Raspberry Pi, when you \[Send a test email\] you encounter this error: - - ImportError: libxslt.so.1: cannot open shared object file: No such file or directory - - - -```console -$ sudo apt install libxslt-dev -# on later systems, if that does not work # $ sudo apt install libxslt1-dev -``` - **IMPORTANT**: On python2-based versions of OctoPrint, including 1.3.x, before attempting to install this plugin, first install python2-compatible version of some modules: ```console @@ -66,6 +55,22 @@ To use yagmail (and thus OctoPrint-EmailNotifier) with Gmail, you may need to [a - Serverport: `587` - [X] Use TLS +Troubleshooting +--------------- + +If on Raspberry Pi, when you try to \[Send a test email\] and you encounter this error: + +``` +ImportError: libxslt.so.1: cannot open shared object file: No such file or directory +``` + +Install the system library: + +```console +$ sudo apt install libxslt-dev +# on later systems, if that does not work # $ sudo apt install libxslt1-dev +``` + Acknowledgements ---------------- From 4c29cefc3be40f88e3a423f1266148cfcfdb9540 Mon Sep 17 00:00:00 2001 From: David Crook Date: Wed, 30 Sep 2020 17:24:43 -0600 Subject: [PATCH 12/14] changes to reflect default branch -> main --- README.md | 4 ++-- extras/emailnotifier.md | 10 +++++----- setup.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7c8897b..1602c20 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ $ ~/oprint/bin/pip install keyring==18.0.1 $ ~/oprint/bin/pip install keyrings.alt==3.1.1 ``` -Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/idcrook/OctoPrint-EmailNotifier/archive/python3.zip): +Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip): ``` -https://github.com/idcrook/OctoPrint-EmailNotifier/archive/python3.zip +https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip ``` Configuration diff --git a/extras/emailnotifier.md b/extras/emailnotifier.md index 8f23d7c..7522841 100644 --- a/extras/emailnotifier.md +++ b/extras/emailnotifier.md @@ -8,11 +8,11 @@ author: Jim DeVona license: AGPLv3 # today's date in format YYYY-MM-DD, e.g. -date: 2015-09-23 +date: 2020-09-30 -homepage: https://github.com/kotl/OctoPrint-EmailNotifier -source: https://github.com/kotl/OctoPrint-EmailNotifier -archive: https://github.com/kotl/OctoPrint-EmailNotifier/archive/master.zip +homepage: https://github.com/idcrook/OctoPrint-EmailNotifier +source: https://github.com/idcrook/OctoPrint-EmailNotifier +archive: https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip # set this to true if your plugin uses the dependency_links setup parameter to include # library versions not yet published on PyPi. SHOULD ONLY BE USED IF THERE IS NO OTHER OPTION! @@ -31,7 +31,7 @@ featuredimage: /assets/img/plugins/emailnotifier/emailnotifier.png compatibility: # list of compatible versions, for example 1.2.0. If left empty no specific version requirement will be assumed octoprint: - - 1.2.4 + - 1.4.0 --- diff --git a/setup.py b/setup.py index 39cb3d4..d66a657 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ # # Example: # plugin_requires = ["someDependency==dev"] -# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]} +# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/main.zip#egg=someDependency-dev"]} additional_setup_parameters = {} # README/long description file to use for PyPi uploads. Must be the full absolute path. If the filename ends on From b2a1b1e987aa03cf94371fbb46caf65bb6857351 Mon Sep 17 00:00:00 2001 From: David Crook Date: Sun, 4 Jun 2023 11:37:54 -0600 Subject: [PATCH 13/14] update README --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1602c20..fb5de28 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ OctoPrint-EmailNotifier ======================= +**UPDATE** *2023-Jun-04*: Remove references to _python2_ + +- Tested to work on OctoPrint `1.9.0` + **UPDATE** *2020-Sep-30*: Version 0.2.0 updated **with python3 support** - Tested on OctoPrint `1.4.x` -For python2 support, see below for compatible `keyring` packages. - --- Recieve email notifications when OctoPrint jobs are STARTED, COMPLETED, FAILED or CANCELLED. @@ -22,14 +24,7 @@ Forked from Installation ------------ -**IMPORTANT**: On python2-based versions of OctoPrint, including 1.3.x, before attempting to install this plugin, first install python2-compatible version of some modules: - -```console -$ ~/oprint/bin/pip install keyring==18.0.1 -$ ~/oprint/bin/pip install keyrings.alt==3.1.1 -``` - -Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this [archive URL](https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip): +Install via the OctoPrint [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) manually using this [archive URL](https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip): ``` https://github.com/idcrook/OctoPrint-EmailNotifier/archive/main.zip From 78d057fbd40d3d6498d57c788de4e044b8a50b6b Mon Sep 17 00:00:00 2001 From: David Crook Date: Sun, 4 Jun 2023 12:11:02 -0600 Subject: [PATCH 14/14] add cryptography explicit version dependency avoids the problem found in #2 --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index d66a657..ec0ed26 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-EmailNotifier" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "0.2.0" +plugin_version = "0.2.1" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module @@ -33,7 +33,7 @@ plugin_license = "AGPLv3" # Any additional requirements besides OctoPrint should be listed here -plugin_requires = ['yagmail', 'keyring', 'keyrings.alt'] +plugin_requires = ['yagmail', 'keyring', 'keyrings.alt', 'cryptography==3.3.2'] # Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will # already be installed automatically if they exist. @@ -72,7 +72,7 @@ import sys sys.exit(-1) -setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( +setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( identifier=plugin_identifier, package=plugin_package, name=plugin_name, @@ -129,4 +129,4 @@ long_description=plugin_readme_file_content )) -setup(**setup_parameters) \ No newline at end of file +setup(**setup_parameters)