From 594455ef614193fc19c5ebfcec24605109b2a81e Mon Sep 17 00:00:00 2001 From: ntoff Date: Tue, 29 Aug 2017 07:10:51 +1000 Subject: [PATCH] upload --- .editorconfig | 17 ++++ .gitignore | 10 ++ MANIFEST.in | 2 + README.md | 14 +++ babel.cfg | 6 ++ image/slider.JPG | Bin 0 -> 28348 bytes octoprint_fanspeedslider/__init__.py | 36 +++++++ .../static/js/fanslider.js | 49 +++++++++ requirements.txt | 9 ++ setup.py | 94 ++++++++++++++++++ 10 files changed, 237 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 babel.cfg create mode 100644 image/slider.JPG create mode 100644 octoprint_fanspeedslider/__init__.py create mode 100644 octoprint_fanspeedslider/static/js/fanslider.js create mode 100644 requirements.txt create mode 100644 setup.py diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..82c8e05 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[**.py] +indent_style = tab + +[**.js] +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..840565b --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +*.pyc +*.swp +.idea +*.iml +build +dist +*.egg* +.DS_Store +*.zip +.vscode \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0be8242 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +recursive-include octoprint_fanspeedslider * diff --git a/README.md b/README.md new file mode 100644 index 0000000..843ba8c --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# OctoPrint-FanSpeedSlider + +Adds a slider to control the speed of a parts cooling fan. + +![](./image/slider.JPG) + +*Note: Slider does __not__ follow the speed of the fan. If the fan speed is set via gcode or an LCD panel on the printer, the slider will not respond to the change.* + +## Setup + +Install manually using this URL: + + https://github.com/ntoff/OctoPrint-fanspeedslider/archive/master.zip + diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..b6f5945 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,6 @@ +[python: */**.py] +[jinja2: */**.jinja2] +extensions=jinja2.ext.autoescape, jinja2.ext.with_ + +[javascript: */**.js] +extract_messages = gettext, ngettext diff --git a/image/slider.JPG b/image/slider.JPG new file mode 100644 index 0000000000000000000000000000000000000000..9eb38b24ea70064303900c6022d249931cba2bd0 GIT binary patch literal 28348 zcmeIa2Urx#wl>^k1O!n)a#oO>a}>#vlpG~zhMaK#1rf=JC@4ASoCTC5C^<@wA|N@# zF!Q%N2=24bckVg&-20#J`S$p<({xu?ty;CJ>RoHSJ%};HEO13ZMqUO$LP7!_fd2r* z+?4@oPiqSRP*MVz006)QP?3ZIWbh32zOg;<#2P>a&ym0z3a{UM{{~9{SKhCZ0~p{b z4*0hicmU+9zux(N{@3R(4g95nzclcd2L95(UmEy-Py=XDD8C>G0uU*@j6(f!UJw)g z%Q=dG006|qoS&bg3CytX`uYn^{6AV^gn;59A%|scrc$GMm9Hq>ytmV9&&F_0FtDAb;nhKgR zh>Kmu67dxBw0E>OcQvN=w6}9`5%LtJ{iSvx@cjE_c3LqJXEO_-dv|1hD*^r`O8c8E z9v&WS9^7mYXG?ZYK|w)w4lZ^sE>^GvtBaR|tFb4mgA3hn72Gj*F?F_fbhU;!P=Bw` z*aYI{DoX3-W^E>9VQj%`VrIt6YGTZ7#>&ZQX3T1A#?8rU#?5WU&&w&mWx;7e`&;v7 zraxMDbaS@*rEN1)c5^#(dvga@7f>6V?6mB^3jObD6I9WUM*md(U?0IULQ>A=#;)df zz(ef&aI$g;uyP5i|31WQ0{r|U?0+aH!v0+u7XAyGHcGhBGsO{Izf#<)TfVF}qcj?k45%!A>{;dXnxdK`o_}mZs1fQh-U-^-pQwpDO&9b^Twau5*lQ?f?Q?4-mm3CIBe_0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zPR_8or>*2%sy8iYl@+QrRTF#7&QW3(ow!$Is}5yy&5k#2$UZe;dSn(Odj6F@Q)M}u z6b4y6*ZQ%CC3S>g!Mb>BJQx%%$4$-dG=^kL5ro_@vnJ-^68=D3|IByLOv0`EWK(@Sa!Pz^Q#L;K%1i( zO%FDaX_+*9YX4!;#VHlJ?XNCe3P*5t8nBk2y3@^Kv0jaR=z~#N_5(h zB$#bm@7qLmL^a%6Y!3ZS@5_ div.jog-panel").eq(0).addClass("controls"); + $("#control > div.jog-panel").eq(1).addClass("tools"); + $("#control > div.jog-panel").eq(2).addClass("general"); + + //add ID to buttons + $("#control > div.general").find("button").eq(0).attr("id", "motors-off"); + $("#control > div.general").find("button").eq(1).attr("id", "fan-on"); + $("#control > div.general").find("button").eq(2).attr("id", "fan-off"); + + //remove original fan on/off buttons + $("#fan-on").remove(); + $("#fan-off").remove(); + //add new fan controls + $("#control > div.jog-panel.general").find("button").eq(0).before("\ + \ + "); + + } + OCTOPRINT_VIEWMODELS.push([ + FanSliderPluginViewModel, + + ["printerStateViewModel", "loginStateViewModel", "controlViewModel"] + ]); +}); \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a1dc463 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +### +# This file is only here to make sure that something like +# +# pip install -e . +# +# works as expected. Requirements can be found in setup.py. +### + +. diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d92ead5 --- /dev/null +++ b/setup.py @@ -0,0 +1,94 @@ +# coding=utf-8 + +######################################################################################################################## +### Do not forget to adjust the following variables to your own plugin. + +# The plugin's identifier, has to be unique +plugin_identifier = "fanspeedslider" + +# The plugin's python package, should be "octoprint_", has to be unique +plugin_package = "octoprint_fanspeedslider" + +# The plugin's human readable name. Can be overwritten within OctoPrint's internal data via __plugin_name__ in the +# plugin module +plugin_name = "OctoPrint-FanSpeedSlider" + +# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module +plugin_version = "0.1.0" + +# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin +# module +plugin_description = """Slider to control the speed of the print cooling fan.""" + +# The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module +plugin_author = "ntoff" + +# The plugin's author's mail address. +plugin_author_email = "" + +# 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/ntoff/OctoPrint-FanSpeedSlider" + +# The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module +plugin_license = "AGPLv3" + +# Any additional requirements besides OctoPrint should be listed here +plugin_requires = [] + +### -------------------------------------------------------------------------------------------------------------------- +### More advanced options that you usually shouldn't have to touch follow after this point +### -------------------------------------------------------------------------------------------------------------------- + +# Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will +# already be installed automatically if they exist. +plugin_additional_data = [] + +# Any additional python packages you need to install with your plugin that are not contained 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 = {} + +######################################################################################################################## + +from setuptools import setup + +try: + import octoprint_setuptools +except: + print("Could not import OctoPrint's setuptools, are you sure you are running that under " + "the same python installation that OctoPrint is installed under?") + import sys + sys.exit(-1) + +setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( + identifier=plugin_identifier, + package=plugin_package, + name=plugin_name, + version=plugin_version, + description=plugin_description, + author=plugin_author, + mail=plugin_author_email, + 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) + +setup(**setup_parameters)