Skip to content

Commit 7fabec6

Browse files
committed
init
0 parents  commit 7fabec6

File tree

20 files changed

+562
-0
lines changed

20 files changed

+562
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
charset = utf-8
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[**.py]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[**.js]
17+
indent_style = space
18+
indent_size = 4

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.pyc
2+
*.swp
3+
.idea
4+
*.iml
5+
build
6+
dist
7+
*.egg*
8+
.DS_Store
9+
*.zip

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include README.md
2+
recursive-include octoprint_esp32camUI/templates *
3+
recursive-include octoprint_esp32camUI/translations *
4+
recursive-include octoprint_esp32camUI/static *

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OctoPrint-Esp32CamUI
2+
3+
**TODO:** Describe what your plugin does.
4+
5+
## Setup
6+
7+
Install via the bundled [Plugin Manager](https://docs.octoprint.org/en/master/bundledplugins/pluginmanager.html)
8+
or manually using this URL:
9+
10+
https://github.com/CyberSensei1/OctoPrint-Esp32CamUI/archive/master.zip
11+
12+
**TODO:** Describe how to install your plugin, if more needs to be done than just installing it via pip or through
13+
the plugin manager.
14+
15+
## Configuration
16+
17+
**TODO:** Describe your plugin's configuration options (if any).

babel.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[python: */**.py]
2+
3+
[jinja2: */**.jinja2]
4+
silent=false
5+
extensions=jinja2.ext.do, octoprint.util.jinja.trycatch
6+
7+
[javascript: */**.js]
8+
extract_messages = gettext, ngettext

extras/README.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Currently Cookiecutter generates the following helpful extras to this folder:
2+
3+
esp32camUI.md
4+
Data file for plugins.octoprint.org. Fill in the missing TODOs once your
5+
plugin is ready for release and file a PR as described at
6+
https://plugins.octoprint.org/help/registering/ to get it published.
7+
8+
github/bug_report.yml
9+
A GitHub issue form for bug reports. Adjust as desired & place in your
10+
repository as `.github/bug_report.yml` to activate.
11+
12+
github/feature_request.yml
13+
A GitHub issue form for feature requests. Adjust as desired and place in
14+
your repository as `.github/feature_request.yml` to activate.
15+
16+
This folder may be safely removed if you don't need it.

extras/esp32camUI.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
layout: plugin
3+
4+
id: esp32camUI
5+
title: OctoPrint-Esp32CamUI
6+
description: TODO
7+
authors:
8+
- CyberSensei
9+
license: AGPLv3
10+
11+
# TODO
12+
date: today's date in format YYYY-MM-DD, e.g. 2015-04-21
13+
14+
homepage: https://github.com/CyberSensei1/OctoPrint-Esp32CamUI
15+
source: https://github.com/CyberSensei1/OctoPrint-Esp32CamUI
16+
archive: https://github.com/CyberSensei1/OctoPrint-Esp32CamUI/archive/master.zip
17+
18+
# TODO
19+
# Set this to true if your plugin uses the dependency_links setup parameter to include
20+
# library versions not yet published on PyPi. SHOULD ONLY BE USED IF THERE IS NO OTHER OPTION!
21+
#follow_dependency_links: false
22+
23+
# TODO
24+
tags:
25+
- a list
26+
- of tags
27+
- that apply
28+
- to your plugin
29+
- (take a look at the existing plugins for what makes sense here)
30+
31+
# TODO
32+
# When registering a plugin on plugins.octoprint.org, all screenshots should be uploaded not linked from external sites.
33+
screenshots:
34+
- url: url of a screenshot, /assets/img/...
35+
alt: alt-text of a screenshot
36+
caption: caption of a screenshot
37+
- url: url of another screenshot, /assets/img/...
38+
alt: alt-text of another screenshot
39+
caption: caption of another screenshot
40+
- ...
41+
42+
# TODO
43+
featuredimage: url of a featured image for your plugin, /assets/img/...
44+
45+
# TODO
46+
# You only need the following if your plugin requires specific OctoPrint versions or
47+
# specific operating systems to function - you can safely remove the whole
48+
# "compatibility" block if this is not the case.
49+
50+
compatibility:
51+
52+
# List of compatible versions
53+
#
54+
# A single version number will be interpretated as a minimum version requirement,
55+
# e.g. "1.3.1" will show the plugin as compatible to OctoPrint versions 1.3.1 and up.
56+
# More sophisticated version requirements can be modelled too by using PEP440
57+
# compatible version specifiers.
58+
#
59+
# You can also remove the whole "octoprint" block. Removing it will default to all
60+
# OctoPrint versions being supported.
61+
62+
octoprint:
63+
- 1.4.0
64+
65+
# List of compatible operating systems
66+
#
67+
# Valid values:
68+
#
69+
# - windows
70+
# - linux
71+
# - macos
72+
# - freebsd
73+
#
74+
# There are also two OS groups defined that get expanded on usage:
75+
#
76+
# - posix: linux, macos and freebsd
77+
# - nix: linux and freebsd
78+
#
79+
# You can also remove the whole "os" block. Removing it will default to all
80+
# operating systems being supported.
81+
82+
os:
83+
- linux
84+
- windows
85+
- macos
86+
- freebsd
87+
88+
# Compatible Python version
89+
#
90+
# It is recommended to only support Python 3 for new plugins, in which case this should be ">=3,<4"
91+
#
92+
# Plugins that wish to support both Python 2 and 3 should set it to ">=2.7,<4".
93+
#
94+
# Plugins that only support Python 2 will not be accepted into the plugin repository.
95+
96+
python: ">=3,<4"
97+
98+
---
99+
100+
**TODO**: Longer description of your plugin, configuration examples etc. This part will be visible on the page at
101+
http://plugins.octoprint.org/plugin/esp32camUI/

extras/github/bug_report.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: 🐛 Report a bug
2+
description: Create a bug report to help improve OctoPrint-Esp32CamUI
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: >-
7+
**Thank you for wanting to report a bug in OctoPrint-Esp32CamUI!**
8+
9+
* First, be sure you are running the [latest version of the OctoPrint-Esp32CamUI plugin](https://github.com/CyberSensei1/OctoPrint-Esp32CamUI/releases).
10+
* You will also need to [enable debugging on the plugin](https://docs.octoprint.org/en/master/configuration/logging_yaml.html).
11+
* This may be done through the *Settings* > *OctoPrint* > *Logging* > *Logging Levels* section.
12+
* Select the "octoprint.plugins.esp32camUI" name, and make sure Level is "DEBUG".
13+
* Save, then restart OctoPrint, which allows the developers to see debug information from the moment the plugin is loaded.
14+
* Finally, when submitting a bug report, you **must** [include a Systeminfo Bundle](https://community.octoprint.org/t/what-is-a-systeminfo-bundle-and-how-can-i-obtain-one/29887), generated after the point the bug occurs. This allows the developers to examine the debug logs produced from your plugin installation.
15+
16+
Thank you for your help!
17+
- type: textarea
18+
attributes:
19+
label: The problem
20+
description: >-
21+
Describe the issue you are experiencing here. Tell us what you were trying to do
22+
step by step, and what happened that you did not expect.
23+
24+
Provide a clear and concise description of what the problem is and include as many
25+
details as possible.
26+
placeholder: |
27+
1. ...
28+
2. ...
29+
3. ...
30+
validations:
31+
required: true
32+
- type: markdown
33+
attributes:
34+
value: |
35+
## Environment
36+
- type: input
37+
attributes:
38+
label: Version of OctoPrint-Esp32CamUI
39+
description: Can be found in *Settings* > *Plugin Manager*, next to "OctoPrint-Esp32CamUI".
40+
validations:
41+
required: true
42+
- type: input
43+
attributes:
44+
label: Version of OctoPrint
45+
description: Can be found in the lower left corner of the web interface.
46+
validations:
47+
required: true
48+
- type: input
49+
attributes:
50+
label: Operating system running OctoPrint
51+
description: >-
52+
OctoPi, Linux, Windows, MacOS, something else? With version please? OctoPi's
53+
version can be found in `/etc/octopi_version` or in the lower left corner of the
54+
web interface.
55+
validations:
56+
required: true
57+
- type: input
58+
attributes:
59+
label: Printer model & used firmware incl. version
60+
description: If applicable, always include if unsure
61+
- type: input
62+
attributes:
63+
label: Browser and version of browser, operating system running browser
64+
description: If applicable, always include if unsure
65+
- type: markdown
66+
attributes:
67+
value: |
68+
## Logs and other files needed for analysis
69+
- type: markdown
70+
attributes:
71+
value: >-
72+
Please also be sure to upload the following files below:
73+
74+
* Systeminfo Bundle: See [here](https://community.octoprint.org/t/what-is-a-systeminfo-bundle-and-how-can-i-obtain-one/29887) if you don't know where to find that. Just attach down below as-is. Note that you'll need at least OctoPrint 1.6.0 for this to be available - we no longer accept bug reports created for older versions than this.
75+
* If you are reporting an issue that involves communicating with you printer, **be sure to enable `serial.log` before reproducing and creating the Systeminfo Bundle**!
76+
* Your browser's JavaScript console, if you are reporting a problem with the
77+
user interface. See [here](https://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) on where to find that.
78+
* If possible, screenshots or videos showing the problem, especially if you
79+
are reporting a problem with the user interface!
80+
* GCODE files with which to reproduce, if you are reporting an issue with
81+
GCODE file analysis or printing behaviour.
82+
83+
Please be aware that unless at least Systeminfo Bundle is included, your bug report
84+
will not be processed and closed after a while.
85+
- type: checkboxes
86+
attributes:
87+
label: Checklist of files to include below
88+
options:
89+
- label: Systeminfo Bundle (always include!)
90+
required: true
91+
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
92+
- label: Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
93+
- label: GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)
94+
- type: textarea
95+
attributes:
96+
label: Additional information & file uploads

extras/github/feature_request.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: ✨ Request a feature
2+
description: Request a new feature to implement in OctoPrint-Esp32CamUI
3+
title: "[Request]"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: >
8+
**Thank you for wanting to request a feature in OctoPrint-Esp32CamUI!**
9+
- type: textarea
10+
attributes:
11+
label: Is your feature request related to a problem? Please describe.
12+
description: A clear and concise description of what the problem is. Eg, "I'm always frustrated when [...]".
13+
- type: textarea
14+
attributes:
15+
label: Describe the solution you'd like
16+
description: A clear and concise description of what you want to happen.
17+
validations:
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Describe alternatives you've considered
22+
description: A clear and concise description of any alternative solutions or features you've considered.
23+
- type: textarea
24+
attributes:
25+
label: Additional context
26+
description: Add any other context or screenshots about the feature request here.

octoprint_esp32camUI/__init__.py

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# coding=utf-8
2+
from __future__ import absolute_import
3+
4+
### (Don't forget to remove me)
5+
# This is a basic skeleton for your plugin's __init__.py. You probably want to adjust the class name of your plugin
6+
# as well as the plugin mixins it's subclassing from. This is really just a basic skeleton to get you started,
7+
# defining your plugin as a template plugin, settings and asset plugin. Feel free to add or remove mixins
8+
# as necessary.
9+
#
10+
# Take a look at the documentation on what other plugin mixins are available.
11+
12+
import octoprint.plugin
13+
14+
class Esp32camuiPlugin(octoprint.plugin.SettingsPlugin,
15+
octoprint.plugin.AssetPlugin,
16+
octoprint.plugin.TemplatePlugin
17+
):
18+
19+
##~~ SettingsPlugin mixin
20+
21+
def get_settings_defaults(self):
22+
return {
23+
# put your plugin's default settings here
24+
"url":"http://192.168.1.10"
25+
}
26+
27+
##~~ AssetPlugin mixin
28+
29+
def get_assets(self):
30+
# Define your plugin's asset files to automatically include in the
31+
# core UI here.
32+
return {
33+
"js": ["js/esp32camUI.js"],
34+
"css": ["css/esp32camUI.css"],
35+
"less": ["less/esp32camUI.less"]
36+
}
37+
38+
##~~ Softwareupdate hook
39+
40+
def get_update_information(self):
41+
# Define the configuration for your plugin to use with the Software Update
42+
# Plugin here. See https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html
43+
# for details.
44+
return {
45+
"esp32camUI": {
46+
"displayName": "Esp32CamUI Plugin",
47+
"displayVersion": self._plugin_version,
48+
49+
# version check: github repository
50+
"type": "github_release",
51+
"user": "CyberSensei1",
52+
"repo": "OctoPrint-Esp32CamUI",
53+
"current": self._plugin_version,
54+
55+
# update method: pip
56+
"pip": "https://github.com/CyberSensei1/OctoPrint-Esp32CamUI/archive/{target_version}.zip",
57+
}
58+
}
59+
def get_template_vars(self):
60+
return dict(url=self._settings.get(["url"]))
61+
62+
def get_template_configs(self):
63+
return [
64+
dict(type="settings", custom_bindings=False),
65+
dict(type="tab", custom_bindings=False)
66+
]
67+
# If you want your plugin to be registered within OctoPrint under a different name than what you defined in setup.py
68+
# ("OctoPrint-PluginSkeleton"), you may define that here. Same goes for the other metadata derived from setup.py that
69+
# can be overwritten via __plugin_xyz__ control properties. See the documentation for that.
70+
__plugin_name__ = "Esp32CamUI Plugin"
71+
72+
73+
# Set the Python version your plugin is compatible with below. Recommended is Python 3 only for all new plugins.
74+
# OctoPrint 1.4.0 - 1.7.x run under both Python 3 and the end-of-life Python 2.
75+
# OctoPrint 1.8.0 onwards only supports Python 3.
76+
__plugin_pythoncompat__ = ">=3,<4" # Only Python 3
77+
78+
def __plugin_load__():
79+
global __plugin_implementation__
80+
__plugin_implementation__ = Esp32camuiPlugin()
81+
82+
global __plugin_hooks__
83+
__plugin_hooks__ = {
84+
"octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information
85+
}

0 commit comments

Comments
 (0)