Compare commits

..
23 Commits
Author SHA1 Message Date
Gina Häußge 3761995aff Removed unneeded parameter and added missing semicolon
(cherry picked from commit 29b3b62)
2015-07-08 17:42:47 +02:00
Gina Häußge e62cef590b Fixed preventDefault issues also for files search
(cherry picked from commit 4894c6e)
2015-07-08 17:42:41 +02:00
Mark Walker 677e583345 pluginmanager: case handling and submit binding
- Convert query term to lower case so that it is case insensitive both ways
    - Knockout submit binding takes the form element as parameter and return
    value determines whether the form submit occurs. See http://knockoutjs.com/documentation/submit-binding.html
(cherry picked from commit 4a2cc53)
2015-07-08 17:42:35 +02:00
Gina Häußge abbf937e7f Preparing release of 1.2.3 2015-07-08 17:22:18 +02:00
Gina Häußge 8d14ea6093 Rewrite urls in packed css and less files
See also #962
(cherry picked from commit 7ea2ee2)
2015-07-08 16:46:46 +02:00
Gina Häußge 97826b2f3b Fix: More resilience against missing plugin assets
Two changes:

  * Asset existence will now be checked before they get included
    in the assets to bundle by webassets, logging a warning if a
    file isn't present.
  * Monkey-patched webassets filter chain to not die when a file
    doesn't exist, but to log an error instead and just return
    an empty file instead.
(cherry picked from commit 2a5ec33)
2015-07-08 16:46:38 +02:00
Gina Häußge a1e0078ce5 Updated translation
(cherry picked from commit 7d43bca)
2015-07-07 19:00:11 +02:00
Gina Häußge a5bf3c3be1 Log serial write exceptions to octoprint.log
(cherry picked from commit 367ba06)
2015-07-07 18:39:54 +02:00
Gina Häußge 19a5613e59 Made "Software Update" and "CuraEngine" translateable
Also fixed a typo in a notification.
(cherry picked from commit 430e47d)
2015-07-07 18:39:47 +02:00
Gina Häußge ced286854c Fixed sorting by size of file list
(cherry picked from commit 6906584)
2015-07-07 18:39:06 +02:00
Gina Häußge 811ffc760f Added "pollWatched" setting to UI
(cherry picked from commit b8cf5ef)
2015-07-06 10:21:21 +02:00
Gina Häußge 549b60edb1 Allow polling for changes in watched folder
Some underlying file systems might not trigger change events (e.g.
mounted remote file systems). Added a feature flag to allow for
switching to a (less performant) polling method.
(cherry picked from commit f2df174)
2015-07-06 10:20:57 +02:00
Gina Häußge 8735b10653 Better resilience against senseless polling intervals
(cherry picked from commit 6600d24)
2015-07-05 16:50:33 +02:00
Gina Häußge 29d49179a9 SWU Fix: properly sanitize version strings for comparison 2015-07-05 10:04:06 +02:00
Gina Häußge 19b4a0f403 Fix: Always delete files from watched folder
Wasn't ensure previously when using file preprocessors.
2015-07-05 09:35:49 +02:00
Gina Häußge d854b41ffb Migrated access control docs from wiki 2015-07-05 00:09:13 +02:00
Gina Häußge 329a575031 Merge branch 'master' into maintenance 2015-07-04 23:51:58 +02:00
Gina Häußge 85ad85bdfa Also refer to wiki from docs until everything "official" is migrated 2015-07-04 23:51:29 +02:00
Gina Häußge 95c26a7850 Fix: Don't automatically persist or return _config_version
Should only ever be read or written by the plugin system itself, not
by on_settings_save or on_settings_load
(cherry picked from commit 77f7d59)
2015-07-02 15:27:35 +02:00
Gina Häußge 885e6f916c Fix: Don't persists checks when saving SWUpdate settings
(cherry picked from commit 8d10be6)
2015-07-02 15:27:27 +02:00
Gina Häußge d7a86a4d28 Use UTF-8 for _all_ output from sarge
Lines taking from the asynchronous processing of stdout/stderr where
left as str, leading to encoding problems when utf8 characters showed
up in the stream and were being interpreted as ascii encoding.
(cherry picked from commit 9373be3)
2015-07-02 15:27:17 +02:00
Gina Häußge 7b3e0563cc SWUpdate: Only use version cache from same version of OP
When using the version cache only use the version cache if the OctoPrint
version stored within it matches the one of the currently running
instance. Otherwise we might report false positives with regards to
available updates under some circumstances.
(cherry picked from commit bb7b0cb)
2015-07-02 15:26:02 +02:00
Gina Häußge 50a62bf00a maintenance branch is now 1.2.3-dev 2015-06-30 21:49:37 +02:00
32 changed files with 1061 additions and 1356 deletions

No files matched your search

+3 -3
View File
@@ -10,10 +10,10 @@
# master shall not use the lookup table, only tags # master shall not use the lookup table, only tags
master master
# maintenance is currently the branch for preparation of maintenance release 1.2.2 # maintenance is currently the branch for preparation of maintenance release 1.2.3
# so are any fix/... branches # so are any fix/... branches
maintenance 1.2.2-dev 9f8d30a66c2fcc5cd0e8984c72dc36f7e84fde10 maintenance 1.2.3-dev 1c6b0554c796f03ed539397daa4b13c44d05a99d
fix/.* 1.2.2-dev 9f8d30a66c2fcc5cd0e8984c72dc36f7e84fde10 fix/.* 1.2.3-dev 1c6b0554c796f03ed539397daa4b13c44d05a99d
# every other branch is a development branch and thus gets resolved to 1.3.0-dev for now # every other branch is a development branch and thus gets resolved to 1.3.0-dev for now
.* 1.3.0-dev 198d3450d94be1a2 .* 1.3.0-dev 198d3450d94be1a2
+32
View File
@@ -1,5 +1,37 @@
# OctoPrint Changelog # OctoPrint Changelog
## 1.2.3 (2015-07-09)
### Improvements
* New option to actively poll the watched folder. This should make it work also
if it is mounted on a filesystem that doesn't allow getting notifications
about added files through notification by the operating system (e.g.
network shares).
* Better resilience against senseless temperature/SD-status-polling intervals
(such as 0).
* Log exceptions during writing to the serial port to `octoprint.log`.
### Bug Fixes
* [#961](https://github.com/foosel/OctoPrint/pull/961) - Fixed a JavaScript error that caused an error to be logged when "enter" was pressed in file or plugin search.
* [#962](https://github.com/foosel/OctoPrint/pull/962) - ``url(...)``s in packed CSS and LESS files should now be rewritten properly too to refer to correct paths
* Update notifications were not vanishing properly after updating:
* Only use version cache for update notifications if the OctoPrint version still is the same to make sure the cache gets invalidated after an external update of OctoPrint.
* Do not persist version information when saving settings of the Software Update plugin
* Always delete files from the ``watched`` folder after importing then. Using file preprocessor plugins could lead to the files staying there.
* Fixed an encoding problem causing OctoPrint's Plugin Manager and Software Update plugins to choke on UTF-8 characters in the update output.
* Fixed sorting by file size in file list
* More resilience against missing plugin assets:
* Asset existence will now be checked before they get included
in the assets to bundle by webassets, logging a warning if a
file isn't present.
* Monkey-patched webassets filter chain to not die when a file
doesn't exist, but to log an error instead and just return
an empty file instead.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.2...1.2.3))
## 1.2.2 (2015-06-30) ## 1.2.2 (2015-06-30)
### Bug Fixes ### Bug Fixes
+69
View File
@@ -0,0 +1,69 @@
.. _sec-features-access_control:
Access Control
==============
When Access Control is enabled, anonymous users (not logged in) will only see
the read-only parts of the UI which are the following:
* printer state
* available gcode files and stats (upload is disabled)
* temperature
* webcam
* gcode viewer
* terminal output (sending commands is disabled)
* available timelapse movies
* any components provided through plugins which are enabled for anonymous
users
Logged in users will get access to everything besides the Settings and System
Commands, which are admin-only.
If Access Control is disabled, everything is directly accessible. **That also
includes all administrative functionality as well as full control over the
printer!**
Upon first start a configuration wizard is provided which allows configuration
of the first administrator account or alternatively disabling Access Control
(which is **NOT** recommended for systems that are directly accessible via the
Internet!).
.. hint::
If you plan to have your OctoPrint instance accessible over the internet,
**always enable Access Control**.
.. _sec-features-access_control-rerunning_wizard:
Rerunning the wizard
--------------------
In case Access Control was disabled in the configuration wizard, it is
possibly to re-run it by editing ``config.yaml`` [#f1]_ and setting ``firstRun``
in the ``server`` section and ``enabled`` in the ``accessControl`` section to
``true``:
.. code-block-ext:: yaml
accessControl:
enabled: true
# ...
server:
firstRun: true
Then restart the server and connect to the web interface - the wizard should
be shown again.
.. note::
If user accounts were created prior to disabling Access Control and those
user accounts are not to be used any more, remove ``.octoprint/users.yaml``.
If you don't remove this file, the above changes won't lead to the
configuration being shown again, instead Access Control will just be
enabled using the already existing login data. This is to prevent you from
resetting access control by accident.
.. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
+14 -2
View File
@@ -10,7 +10,7 @@ buttons which trigger sending of one or more lines of GCODE to the printer over
parameterization of these commands with values entered by the user to full blown GCODE script templates backed by parameterization of these commands with values entered by the user to full blown GCODE script templates backed by
`Jinja2 <http://jinja.pocoo.org/>`_. `Jinja2 <http://jinja.pocoo.org/>`_.
Custom controls are configured within :ref:`config.yaml <sec-configuration-config_yaml>` in a ``controls`` section which Custom controls are configured within :ref:`config.yaml <sec-configuration-config_yaml>` [#f1]_ in a ``controls`` section which
basically represents a hierarchical structure of all configured custom controls of various types. basically represents a hierarchical structure of all configured custom controls of various types.
.. note:: .. note::
@@ -94,6 +94,13 @@ button that sends one or more commands to the printer when clicked, displaying o
controls that just serve as *container* for other controls, the latter being identified by having a ``children`` controls that just serve as *container* for other controls, the latter being identified by having a ``children``
attribute wrapping more controls. attribute wrapping more controls.
.. hint::
Take a look at the `Custom Control Editor plugin <http://plugins.octoprint.org/plugins/customControl/>`_
which allows you configuring your Custom Controls through OctoPrint's
settings interface without the need to manually edit the configuration
file.
.. _sec-features-custom_controls-types: .. _sec-features-custom_controls-types:
Types Types
@@ -278,4 +285,9 @@ Parameterized GCODE Script
G28 X0 Y0 G28 X0 Y0
Note the usage of the ``parameters.repetitions`` template variable in the GCODE script template, which will contain Note the usage of the ``parameters.repetitions`` template variable in the GCODE script template, which will contain
the value selected by the user for the "Go arounds" slider. the value selected by the user for the "Go arounds" slider.
.. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
+1
View File
@@ -7,6 +7,7 @@ Features
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
accesscontrol.rst
custom_controls.rst custom_controls.rst
gcode_scripts.rst gcode_scripts.rst
action_commands.rst action_commands.rst
+1 -1
View File
@@ -64,7 +64,7 @@ See :ref:`Developing Plugins <sec-plugins>`.
.. rubric:: Footnotes .. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/plugins``, for Windows it will be ``%APPDATA%/OctoPrint/plugins`` and for .. [#f1] For Linux that will be ``~/.octoprint/plugins``, for Windows it will be ``%APPDATA%/OctoPrint/plugins`` and for
Mac ``~/Library/Application Support/OctoPrint`` Mac ``~/Library/Application Support/OctoPrint/plugins``
.. [#f2] Make sure to use the exact same Python installation for installing the plugin that you also used for .. [#f2] Make sure to use the exact same Python installation for installing the plugin that you also used for
installing & running OctoPrint. For OctoPi this means using ``~/oprint/bin/pip`` for installing plugins installing & running OctoPrint. For OctoPi this means using ``~/oprint/bin/pip`` for installing plugins
instead of just ``pip``. instead of just ``pip``.
+4
View File
@@ -6,6 +6,10 @@ Welcome to OctoPrint's documentation!
:alt: The OctoPrint Logo :alt: The OctoPrint Logo
:align: right :align: right
This documentation is still in the process of being migrated from
`OctoPrint's wiki <https://github.com/foosel/OctoPrint/wiki>`_, so also take
a look there!
Contents Contents
======== ========
+9 -3
View File
@@ -781,7 +781,10 @@ class SettingsPlugin(OctoPrintPlugin):
:return: the current settings of the plugin, as a dictionary :return: the current settings of the plugin, as a dictionary
""" """
return self._settings.get([], asdict=True, merged=True) data = self._settings.get([], asdict=True, merged=True)
if "_config_version" in data:
del data["_config_version"]
return data
def on_settings_save(self, data): def on_settings_save(self, data):
""" """
@@ -803,9 +806,12 @@ class SettingsPlugin(OctoPrintPlugin):
""" """
import octoprint.util import octoprint.util
if "_config_version" in data:
del data["_config_version"]
current = self._settings.get([], asdict=True, merged=True) current = self._settings.get([], asdict=True, merged=True)
data = octoprint.util.dict_merge(current, data) merged = octoprint.util.dict_merge(current, data)
self._settings.set([], data) self._settings.set([], merged)
def get_settings_defaults(self): def get_settings_defaults(self):
""" """
+31 -23
View File
@@ -35,6 +35,14 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
self._cancelled_jobs = [] self._cancelled_jobs = []
self._job_mutex = threading.Lock() self._job_mutex = threading.Lock()
##~~ TemplatePlugin API
def get_template_configs(self):
from flask.ext.babel import gettext
return [
dict(type="settings", name=gettext("CuraEngine"))
]
##~~ StartupPlugin API ##~~ StartupPlugin API
def on_startup(self, host, port): def on_startup(self, host, port):
@@ -218,7 +226,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
if not on_progress_kwargs: if not on_progress_kwargs:
on_progress_kwargs = dict() on_progress_kwargs = dict()
self._cura_logger.info("### Slicing %s to %s using profile stored at %s" % (model_path, machinecode_path, profile_path)) self._cura_logger.info(u"### Slicing %s to %s using profile stored at %s" % (model_path, machinecode_path, profile_path))
engine_settings = self._convert_to_engine(profile_path, printer_profile, posX, posY) engine_settings = self._convert_to_engine(profile_path, printer_profile, posX, posY)
@@ -227,16 +235,15 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
return False, "Path to CuraEngine is not configured " return False, "Path to CuraEngine is not configured "
working_dir, _ = os.path.split(executable) working_dir, _ = os.path.split(executable)
args = ['"%s"' % executable, '-v', '-p'] args = [executable, '-v', '-p']
for k, v in engine_settings.items(): for k, v in engine_settings.items():
args += ["-s", '"%s=%s"' % (k, str(v))] args += ["-s", "%s=%s" % (k, str(v))]
args += ['-o', '"%s"' % machinecode_path, '"%s"' % model_path] args += ["-o", machinecode_path, model_path]
self._logger.info(u"Running %r in %s" % (" ".join(args), working_dir))
import sarge import sarge
command = " ".join(args) p = sarge.run(args, cwd=working_dir, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
self._logger.info("Running %r in %s" % (command, working_dir))
p = sarge.run(command, cwd=working_dir, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p.wait_events() p.wait_events()
self._slicing_commands[machinecode_path] = p.commands[0] self._slicing_commands[machinecode_path] = p.commands[0]
@@ -254,6 +261,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
p.commands[0].poll() p.commands[0].poll()
continue continue
line = octoprint.util.to_unicode(line, errors="replace")
self._cura_logger.debug(line.strip()) self._cura_logger.debug(line.strip())
if on_progress is not None: if on_progress is not None:
@@ -282,14 +290,14 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
# #
# with <step_factor> being 0 for "inset", 1 for "skin" and 2 for "export". # with <step_factor> being 0 for "inset", 1 for "skin" and 2 for "export".
if line.startswith("Layer count:") and layer_count is None: if line.startswith(u"Layer count:") and layer_count is None:
try: try:
layer_count = float(line[len("Layer count:"):].strip()) layer_count = float(line[len(u"Layer count:"):].strip())
except: except:
pass pass
elif line.startswith("Progress:"): elif line.startswith(u"Progress:"):
split_line = line[len("Progress:"):].strip().split(":") split_line = line[len(u"Progress:"):].strip().split(":")
if len(split_line) == 3: if len(split_line) == 3:
step, current_layer, _ = split_line step, current_layer, _ = split_line
try: try:
@@ -302,21 +310,21 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
on_progress_kwargs["_progress"] = (step_factor[step] * layer_count + current_layer) / (layer_count * 3) on_progress_kwargs["_progress"] = (step_factor[step] * layer_count + current_layer) / (layer_count * 3)
on_progress(*on_progress_args, **on_progress_kwargs) on_progress(*on_progress_args, **on_progress_kwargs)
elif line.startswith("Print time:"): elif line.startswith(u"Print time:"):
try: try:
print_time = int(line[len("Print time:"):].strip()) print_time = int(line[len(u"Print time:"):].strip())
if analysis is None: if analysis is None:
analysis = dict() analysis = dict()
analysis["estimatedPrintTime"] = print_time analysis["estimatedPrintTime"] = print_time
except: except:
pass pass
elif line.startswith("Filament:") or line.startswith("Filament2:"): elif line.startswith(u"Filament:") or line.startswith(u"Filament2:"):
if line.startswith("Filament:"): if line.startswith(u"Filament:"):
filament_str = line[len("Filament:"):].strip() filament_str = line[len(u"Filament:"):].strip()
tool_key = "tool0" tool_key = "tool0"
else: else:
filament_str = line[len("Filament2:"):].strip() filament_str = line[len(u"Filament2:"):].strip()
tool_key = "tool1" tool_key = "tool1"
try: try:
@@ -339,20 +347,20 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
with self._job_mutex: with self._job_mutex:
if machinecode_path in self._cancelled_jobs: if machinecode_path in self._cancelled_jobs:
self._cura_logger.info("### Cancelled") self._cura_logger.info(u"### Cancelled")
raise octoprint.slicing.SlicingCancelled() raise octoprint.slicing.SlicingCancelled()
self._cura_logger.info("### Finished, returncode %d" % p.returncode) self._cura_logger.info(u"### Finished, returncode %d" % p.returncode)
if p.returncode == 0: if p.returncode == 0:
return True, dict(analysis=analysis) return True, dict(analysis=analysis)
else: else:
self._logger.warn("Could not slice via Cura, got return code %r" % p.returncode) self._logger.warn(u"Could not slice via Cura, got return code %r" % p.returncode)
return False, "Got returncode %r" % p.returncode return False, "Got returncode %r" % p.returncode
except octoprint.slicing.SlicingCancelled as e: except octoprint.slicing.SlicingCancelled as e:
raise e raise e
except: except:
self._logger.exception("Could not slice via Cura, got an unknown error") self._logger.exception(u"Could not slice via Cura, got an unknown error")
return False, "Unknown error, please consult the log file" return False, "Unknown error, please consult the log file"
finally: finally:
@@ -371,7 +379,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
command = self._slicing_commands[machinecode_path] command = self._slicing_commands[machinecode_path]
if command is not None: if command is not None:
command.terminate() command.terminate()
self._logger.info("Cancelled slicing of %s" % machinecode_path) self._logger.info(u"Cancelled slicing of %s" % machinecode_path)
def _load_profile(self, path): def _load_profile(self, path):
import yaml import yaml
@@ -418,13 +418,13 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
return self._pip_caller.execute(*args) return self._pip_caller.execute(*args)
def _log_call(self, *lines): def _log_call(self, *lines):
self._log(lines, prefix=" ", stream="call") self._log(lines, prefix=u" ", stream="call")
def _log_stdout(self, *lines): def _log_stdout(self, *lines):
self._log(lines, prefix=">", stream="stdout") self._log(lines, prefix=u">", stream="stdout")
def _log_stderr(self, *lines): def _log_stderr(self, *lines):
self._log(lines, prefix="!", stream="stderr") self._log(lines, prefix=u"!", stream="stderr")
def _log(self, lines, prefix=None, stream=None, strip=True): def _log(self, lines, prefix=None, stream=None, strip=True):
if strip: if strip:
@@ -147,19 +147,17 @@ $(function() {
} }
}); });
self.performRepositorySearch = function(e) { self.performRepositorySearch = function() {
if (e !== undefined) {
e.preventDefault();
}
var query = self.repositorySearchQuery(); var query = self.repositorySearchQuery();
if (query !== undefined && query.trim() != "") { if (query !== undefined && query.trim() != "") {
query = query.toLocaleLowerCase();
self.repositoryplugins.changeSearchFunction(function(entry) { self.repositoryplugins.changeSearchFunction(function(entry) {
return entry && (entry["title"].toLocaleLowerCase().indexOf(query) > -1 || entry["description"].toLocaleLowerCase().indexOf(query) > -1); return entry && (entry["title"].toLocaleLowerCase().indexOf(query) > -1 || entry["description"].toLocaleLowerCase().indexOf(query) > -1);
}); });
} else { } else {
self.repositoryplugins.resetSearch(); self.repositoryplugins.resetSearch();
} }
return false;
}; };
self.fromResponse = function(data) { self.fromResponse = function(data) {
@@ -82,9 +82,24 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
except: except:
self._logger.exception("Error while loading version cache from disk") self._logger.exception("Error while loading version cache from disk")
else: else:
self._version_cache = data try:
self._version_cache_dirty = False if "octoprint" in data and len(data["octoprint"]) == 4 and "local" in data["octoprint"][1] and "value" in data["octoprint"][1]["local"]:
self._logger.info("Loaded version cache from disk") data_version = data["octoprint"][1]["local"]["value"]
else:
self._logger.info("Can't determine version of OctoPrint version cache was created for, not using it")
return
from octoprint._version import get_versions
octoprint_version = get_versions()["version"]
if data_version != octoprint_version:
self._logger.info("Version cache was created for another version of OctoPrint, not using it")
return
self._version_cache = data
self._version_cache_dirty = False
self._logger.info("Loaded version cache from disk")
except:
self._logger.exception("Error parsing in version cache data")
def _save_version_cache(self): def _save_version_cache(self):
import tempfile import tempfile
@@ -127,15 +142,29 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
"cache_ttl": 24 * 60, "cache_ttl": 24 * 60,
} }
def on_settings_load(self):
data = dict(octoprint.plugin.SettingsPlugin.on_settings_load(self))
if "checks" in data:
del data["checks"]
return data
def on_settings_save(self, data): def on_settings_save(self, data):
octoprint.plugin.SettingsPlugin.on_settings_save(self, data) for key in self.get_settings_defaults():
if key == "checks" or key == "cache_ttl":
continue
if key in data:
self._settings.set([key], data[key])
if "cache_ttl" in data:
self._settings.set_int(["cache_ttl"], data["cache_ttl"])
self._version_cache_ttl = self._settings.get_int(["cache_ttl"]) * 60 self._version_cache_ttl = self._settings.get_int(["cache_ttl"]) * 60
def get_settings_version(self): def get_settings_version(self):
return 2 return 3
def on_settings_migrate(self, target, current=None): def on_settings_migrate(self, target, current=None):
if current is None: if current is None or current == 2:
# there might be some left over data from the time we still persisted everything to settings, # there might be some left over data from the time we still persisted everything to settings,
# even the stuff that shouldn't be persisted but always provided by the hook - let's # even the stuff that shouldn't be persisted but always provided by the hook - let's
# clean up # clean up
@@ -144,14 +173,17 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
if configured_checks is None: if configured_checks is None:
configured_checks = dict() configured_checks = dict()
check_keys = configured_checks.keys()
# take care of the octoprint entry # take care of the octoprint entry
if "octoprint" in configured_checks: if "octoprint" in configured_checks:
octoprint_check = dict(configured_checks["octoprint"]) octoprint_check = dict(configured_checks["octoprint"])
if "type" in octoprint_check and not octoprint_check["type"] == "github_commit": if "type" not in octoprint_check or octoprint_check["type"] != "github_commit":
deletables=["current"] deletables=["current", "displayName", "displayVersion"]
else: else:
deletables=[] deletables=[]
octoprint_check = self._clean_settings_check("octoprint", octoprint_check, self.get_settings_defaults()["checks"]["octoprint"], delete=deletables, save=False) octoprint_check = self._clean_settings_check("octoprint", octoprint_check, self.get_settings_defaults()["checks"]["octoprint"], delete=deletables, save=False)
check_keys.remove("octoprint")
# and the hooks # and the hooks
update_check_hooks = self._plugin_manager.get_hooks("octoprint.plugin.softwareupdate.check_config") update_check_hooks = self._plugin_manager.get_hooks("octoprint.plugin.softwareupdate.check_config")
@@ -165,12 +197,20 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
if key in configured_checks: if key in configured_checks:
settings_check = dict(configured_checks[key]) settings_check = dict(configured_checks[key])
merged = dict_merge(data, settings_check) merged = dict_merge(data, settings_check)
if "type" in merged and not merged["type"] == "github_commit": if "type" not in merged or merged["type"] != "github_commit":
deletables = ["current", "displayVersion"] deletables = ["current", "displayVersion"]
else: else:
deletables = [] deletables = []
self._clean_settings_check(key, settings_check, data, delete=deletables, save=False) self._clean_settings_check(key, settings_check, data, delete=deletables, save=False)
check_keys.remove(key)
# and anything that's left over we'll just remove now
for key in check_keys:
dummy_defaults = dict(plugins=dict())
dummy_defaults["plugins"][self._identifier] = dict(checks=dict())
dummy_defaults["plugins"][self._identifier]["checks"][key] = None
self._settings.set(["checks", key], None, defaults=dummy_defaults)
elif current == 1: elif current == 1:
configured_checks = self._settings.get(["checks"], incl_defaults=False) configured_checks = self._settings.get(["checks"], incl_defaults=False)
@@ -270,8 +310,9 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
##~~ TemplatePlugin API ##~~ TemplatePlugin API
def get_template_configs(self): def get_template_configs(self):
from flask.ext.babel import gettext
return [ return [
dict(type="settings", name="Software Update") dict(type="settings", name=gettext("Software Update"))
] ]
#~~ Updater #~~ Updater
@@ -142,7 +142,7 @@ $(function() {
click: function() { click: function() {
self._markNotificationAsSeen(data.information); self._markNotificationAsSeen(data.information);
self._showPopup({ self._showPopup({
text: gettext("You can make this message display again via \"Settings\" > \"SoftwareUpdate\" > \"Check for update now\"") text: gettext("You can make this message display again via \"Settings\" > \"Software Update\" > \"Check for update now\"")
}); });
} }
}, { }, {
@@ -46,12 +46,12 @@ def perform_update(target, check, target_version):
install_arg = check["pip"].format(target_version=target_version) install_arg = check["pip"].format(target_version=target_version)
logger.debug("Target: %s, executing pip install %s" % (target, install_arg)) logger.debug(u"Target: %s, executing pip install %s" % (target, install_arg))
pip_args = ["install", check["pip"].format(target_version=target_version, target=target_version)] pip_args = ["install", check["pip"].format(target_version=target_version, target=target_version)]
pip_caller.execute(*pip_args) pip_caller.execute(*pip_args)
logger.debug("Target: %s, executing pip install %s --ignore-reinstalled --force-reinstall --no-deps" % (target, install_arg)) logger.debug(u"Target: %s, executing pip install %s --ignore-reinstalled --force-reinstall --no-deps" % (target, install_arg))
pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"] pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"]
pip_caller.execute(*pip_args) pip_caller.execute(*pip_args)
@@ -59,13 +59,13 @@ def perform_update(target, check, target_version):
return "ok" return "ok"
def _log_call(*lines): def _log_call(*lines):
_log(lines, prefix=" ") _log(lines, prefix=u" ")
def _log_stdout(*lines): def _log_stdout(*lines):
_log(lines, prefix=">") _log(lines, prefix=u">")
def _log_stderr(*lines): def _log_stderr(*lines):
_log(lines, prefix="!") _log(lines, prefix=u"!")
def _log(lines, prefix=None): def _log(lines, prefix=None):
lines = map(lambda x: x.strip(), lines) lines = map(lambda x: x.strip(), lines)
@@ -44,35 +44,71 @@ def _get_latest_release(user, repo, include_prerelease=False):
return latest["name"], latest["tag_name"] return latest["name"], latest["tag_name"]
def _is_current(release_information, compare_type, custom=None): def _get_sanitized_version(version_string):
if "-" in version_string:
version_string = version_string[:version_string.find("-")]
return version_string
def _get_comparable_version_pkg_resources(version_string, force_base=True):
import pkg_resources
version = pkg_resources.parse_version(version_string)
if force_base:
if isinstance(version, tuple):
# old setuptools
base_version = []
for part in version:
if part.startswith("*"):
break
base_version.append(part)
version = tuple(base_version)
else:
# new setuptools
version = pkg_resources.parse_version(version.base_version)
return version
def _get_comparable_version_semantic(version_string, force_base=True):
import semantic_version
version = semantic_version.Version.coerce(version_string, partial=False)
if force_base:
version_string = "{}.{}.{}".format(version.major, version.minor, version.patch)
version = semantic_version.Version.coerce(version_string, partial=False)
return version
def _is_current(release_information, compare_type, custom=None, force_base=True):
if release_information["remote"]["value"] is None: if release_information["remote"]["value"] is None:
return True return True
if not compare_type in ("python", "semantic", "unequal", "custom") or compare_type == "custom" and custom is None: if not compare_type in ("python", "semantic", "unequal", "custom") or compare_type == "custom" and custom is None:
compare_type = "python" compare_type = "python"
sanitized_local = _get_sanitized_version(release_information["local"]["value"])
sanitized_remote = _get_sanitized_version(release_information["remote"]["value"])
try: try:
if compare_type == "python": if compare_type == "python":
import pkg_resources local_version = _get_comparable_version_pkg_resources(sanitized_local, force_base=force_base)
remote_version = _get_comparable_version_pkg_resources(sanitized_remote, force_base=force_base)
local_version = pkg_resources.parse_version(release_information["local"]["value"])
remote_version = pkg_resources.parse_version(release_information["remote"]["value"])
return local_version >= remote_version return local_version >= remote_version
elif compare_type == "semantic": elif compare_type == "semantic":
import semantic_version local_version = _get_comparable_version_semantic(sanitized_local, force_base=force_base)
remote_version = _get_comparable_version_semantic(sanitized_remote, force_base=force_base)
local_version = semantic_version.Version(release_information["local"]["value"])
remote_version = semantic_version.Version(release_information["remote"]["value"])
return local_version >= remote_version return local_version >= remote_version
elif compare_type == "custom": elif compare_type == "custom":
return custom(release_information["local"], release_information["remote"]) return custom(sanitized_local, sanitized_remote)
else: else:
return release_information["local"]["value"] == release_information["remote"]["value"] return sanitized_local == sanitized_remote
except: except:
logger.exception("Could not check if version is current due to an error, assuming it is") logger.exception("Could not check if version is current due to an error, assuming it is")
return True return True
@@ -82,11 +118,13 @@ def get_latest(target, check, custom_compare=None):
if not "user" in check or not "repo" in check: if not "user" in check or not "repo" in check:
raise ConfigurationInvalid("github_release update configuration for %s needs user and repo set" % target) raise ConfigurationInvalid("github_release update configuration for %s needs user and repo set" % target)
current = None current = check.get("current", None)
if "current" in check: include_prerelease = check.get("prerelease", False)
current = check["current"] force_base = check.get("force_base", True)
remote_name, remote_tag = _get_latest_release(check["user"], check["repo"], include_prerelease=check["prerelease"] == True if "prerelease" in check else False) remote_name, remote_tag = _get_latest_release(check["user"],
check["repo"],
include_prerelease=include_prerelease)
compare_type = check["release_compare"] if "release_compare" in check else "python" compare_type = check["release_compare"] if "release_compare" in check else "python"
information =dict( information =dict(
@@ -96,4 +134,7 @@ def get_latest(target, check, custom_compare=None):
logger.debug("Target: %s, local: %s, remote: %s" % (target, current, remote_tag)) logger.debug("Target: %s, local: %s, remote: %s" % (target, current, remote_tag))
return information, _is_current(information, compare_type, custom=custom_compare) return information, _is_current(information,
compare_type,
custom=custom_compare,
force_base=force_base)
+13 -3
View File
@@ -14,6 +14,7 @@ from flask.ext.babel import Babel, gettext, ngettext
from flask.ext.assets import Environment, Bundle from flask.ext.assets import Environment, Bundle
from babel import Locale from babel import Locale
from watchdog.observers import Observer from watchdog.observers import Observer
from watchdog.observers.polling import PollingObserver
from collections import defaultdict from collections import defaultdict
import os import os
@@ -399,7 +400,12 @@ class Server():
printer.connect(port=port, baudrate=baudrate, profile=printer_profile["id"] if "id" in printer_profile else "_default") printer.connect(port=port, baudrate=baudrate, profile=printer_profile["id"] if "id" in printer_profile else "_default")
# start up watchdogs # start up watchdogs
observer = Observer() if s.getBoolean(["feature", "pollWatched"]):
# use less performant polling observer if explicitely configured
observer = PollingObserver()
else:
# use os default
observer = Observer()
observer.schedule(util.watchdog.GcodeWatchdogHandler(fileManager, printer), s.getBaseFolder("watched")) observer.schedule(util.watchdog.GcodeWatchdogHandler(fileManager, printer), s.getBaseFolder("watched"))
observer.start() observer.start()
@@ -538,6 +544,9 @@ class Server():
}, },
"tornado.general": { "tornado.general": {
"level": "INFO" "level": "INFO"
},
"octoprint.server.util.flask": {
"level": "WARN"
} }
}, },
"root": { "root": {
@@ -706,6 +715,7 @@ class Server():
global pluginManager global pluginManager
util.flask.fix_webassets_cache() util.flask.fix_webassets_cache()
util.flask.fix_webassets_filtertool()
base_folder = settings().getBaseFolder("generated") base_folder = settings().getBaseFolder("generated")
@@ -839,9 +849,9 @@ class Server():
js_app_bundle = Bundle(*js_app, output="webassets/packed_app.js", filters="js_delimiter_bundler") js_app_bundle = Bundle(*js_app, output="webassets/packed_app.js", filters="js_delimiter_bundler")
css_libs_bundle = Bundle(*css_libs, output="webassets/packed_libs.css") css_libs_bundle = Bundle(*css_libs, output="webassets/packed_libs.css")
css_app_bundle = Bundle(*css_app, output="webassets/packed_app.css") css_app_bundle = Bundle(*css_app, output="webassets/packed_app.css", filters="cssrewrite")
all_less_bundle = Bundle(*less_app, output="webassets/packed_app.less", filters="less_importrewrite") all_less_bundle = Bundle(*less_app, output="webassets/packed_app.less", filters="cssrewrite, less_importrewrite")
assets.register("js_libs", js_libs_bundle) assets.register("js_libs", js_libs_bundle)
assets.register("js_app", js_app_bundle) assets.register("js_app", js_app_bundle)
+3 -1
View File
@@ -68,7 +68,8 @@ def getSettings():
"swallowOkAfterResend": s.getBoolean(["feature", "swallowOkAfterResend"]), "swallowOkAfterResend": s.getBoolean(["feature", "swallowOkAfterResend"]),
"repetierTargetTemp": s.getBoolean(["feature", "repetierTargetTemp"]), "repetierTargetTemp": s.getBoolean(["feature", "repetierTargetTemp"]),
"externalHeatupDetection": s.getBoolean(["feature", "externalHeatupDetection"]), "externalHeatupDetection": s.getBoolean(["feature", "externalHeatupDetection"]),
"keyboardControl": s.getBoolean(["feature", "keyboardControl"]) "keyboardControl": s.getBoolean(["feature", "keyboardControl"]),
"pollWatched": s.getBoolean(["feature", "pollWatched"])
}, },
"serial": { "serial": {
"port": connectionOptions["portPreference"], "port": connectionOptions["portPreference"],
@@ -199,6 +200,7 @@ def setSettings():
if "repetierTargetTemp" in data["feature"].keys(): s.setBoolean(["feature", "repetierTargetTemp"], data["feature"]["repetierTargetTemp"]) if "repetierTargetTemp" in data["feature"].keys(): s.setBoolean(["feature", "repetierTargetTemp"], data["feature"]["repetierTargetTemp"])
if "externalHeatupDetection" in data["feature"].keys(): s.setBoolean(["feature", "externalHeatupDetection"], data["feature"]["externalHeatupDetection"]) if "externalHeatupDetection" in data["feature"].keys(): s.setBoolean(["feature", "externalHeatupDetection"], data["feature"]["externalHeatupDetection"])
if "keyboardControl" in data["feature"].keys(): s.setBoolean(["feature", "keyboardControl"], data["feature"]["keyboardControl"]) if "keyboardControl" in data["feature"].keys(): s.setBoolean(["feature", "keyboardControl"], data["feature"]["keyboardControl"])
if "pollWatched" in data["feature"]: s.setBoolean(["feature", "pollWatched"], data["feature"]["pollWatched"])
if "serial" in data.keys(): if "serial" in data.keys():
if "autoconnect" in data["serial"].keys(): s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"]) if "autoconnect" in data["serial"].keys(): s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"])
+44
View File
@@ -19,6 +19,7 @@ import uuid
import threading import threading
import logging import logging
import netaddr import netaddr
import os
from octoprint.settings import settings from octoprint.settings import settings
import octoprint.server import octoprint.server
@@ -174,6 +175,34 @@ def fix_webassets_cache():
cache.FilesystemCache.set = fixed_set cache.FilesystemCache.set = fixed_set
cache.FilesystemCache.get = fixed_get cache.FilesystemCache.get = fixed_get
def fix_webassets_filtertool():
from webassets.merge import FilterTool, log, MemoryHunk
error_logger = logging.getLogger(__name__ + ".fix_webassets_filtertool")
def fixed_wrap_cache(self, key, func):
"""Return cache value ``key``, or run ``func``.
"""
if self.cache:
if not self.no_cache_read:
log.debug('Checking cache for key %s', key)
content = self.cache.get(key)
if not content in (False, None):
log.debug('Using cached result for %s', key)
return MemoryHunk(content)
try:
content = func().getvalue()
if self.cache:
log.debug('Storing result in cache with key %s', key,)
self.cache.set(key, content)
return MemoryHunk(content)
except:
error_logger.exception("Got an exception while trying to apply filter, ignoring file")
return MemoryHunk("")
FilterTool._wrap_cache = fixed_wrap_cache
#~~ passive login helper #~~ passive login helper
def passive_login(): def passive_login():
@@ -535,6 +564,8 @@ class SettingsCheckUpdater(webassets.updater.BaseUpdater):
##~~ plugin assets collector ##~~ plugin assets collector
def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, preferred_stylesheet="css"): def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, preferred_stylesheet="css"):
logger = logging.getLogger(__name__ + ".collect_plugin_assets")
supported_stylesheets = ("css", "less") supported_stylesheets = ("css", "less")
assets = dict( assets = dict(
js=[], js=[],
@@ -578,13 +609,24 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
for implementation in asset_plugins: for implementation in asset_plugins:
name = implementation._identifier name = implementation._identifier
all_assets = implementation.get_assets() all_assets = implementation.get_assets()
basefolder = implementation.get_asset_folder()
def asset_exists(category, asset):
exists = os.path.exists(os.path.join(basefolder, asset))
if not exists:
logger.warn("Plugin {} is referring to non existing {} asset {}".format(name, category, asset))
return exists
if "js" in all_assets: if "js" in all_assets:
for asset in all_assets["js"]: for asset in all_assets["js"]:
if not asset_exists("js", asset):
continue
assets["js"].append('plugin/{name}/{asset}'.format(**locals())) assets["js"].append('plugin/{name}/{asset}'.format(**locals()))
if preferred_stylesheet in all_assets: if preferred_stylesheet in all_assets:
for asset in all_assets[preferred_stylesheet]: for asset in all_assets[preferred_stylesheet]:
if not asset_exists(preferred_stylesheet, asset):
continue
assets[preferred_stylesheet].append('plugin/{name}/{asset}'.format(**locals())) assets[preferred_stylesheet].append('plugin/{name}/{asset}'.format(**locals()))
else: else:
for stylesheet in supported_stylesheets: for stylesheet in supported_stylesheets:
@@ -592,6 +634,8 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
continue continue
for asset in all_assets[stylesheet]: for asset in all_assets[stylesheet]:
if not asset_exists(stylesheet, asset):
continue
assets[stylesheet].append('plugin/{name}/{asset}'.format(**locals())) assets[stylesheet].append('plugin/{name}/{asset}'.format(**locals()))
break break
+5
View File
@@ -56,6 +56,11 @@ class GcodeWatchdogHandler(watchdog.events.PatternMatchingEventHandler):
file_wrapper.filename, file_wrapper.filename,
file_wrapper, file_wrapper,
allow_overwrite=True) allow_overwrite=True)
if os.path.exists(path):
try:
os.remove(path)
except:
self._logger.exception("Error while trying to clear a file from the watched folder")
def on_created(self, event): def on_created(self, event):
self._upload(event.src_path) self._upload(event.src_path)
+2 -1
View File
@@ -142,7 +142,8 @@ default_settings = {
"repetierTargetTemp": False, "repetierTargetTemp": False,
"externalHeatupDetection": True, "externalHeatupDetection": True,
"supportWait": True, "supportWait": True,
"keyboardControl": True "keyboardControl": True,
"pollWatched": False
}, },
"folder": { "folder": {
"uploads": None, "uploads": None,
@@ -47,8 +47,8 @@ $(function() {
}, },
"size": function(a, b) { "size": function(a, b) {
// sorts descending // sorts descending
if (b["bytes"] === undefined || a["bytes"] > b["bytes"]) return -1; if (b["size"] === undefined || a["size"] > b["size"]) return -1;
if (a["bytes"] < b["bytes"]) return 1; if (a["size"] < b["size"]) return 1;
return 0; return 0;
} }
}, },
@@ -309,18 +309,17 @@ $(function() {
}; };
self.performSearch = function(e) { self.performSearch = function(e) {
if (e !== undefined) {
e.preventDefault();
}
var query = self.searchQuery(); var query = self.searchQuery();
if (query !== undefined && query.trim() != "") { if (query !== undefined && query.trim() != "") {
query = query.toLocaleLowerCase();
self.listHelper.changeSearchFunction(function(entry) { self.listHelper.changeSearchFunction(function(entry) {
return entry && entry["name"].toLocaleLowerCase().indexOf(query) > -1; return entry && entry["name"].toLocaleLowerCase().indexOf(query) > -1;
}); });
} else { } else {
self.listHelper.resetSearch(); self.listHelper.resetSearch();
} }
return false;
}; };
self.onDataUpdaterReconnect = function() { self.onDataUpdaterReconnect = function() {
@@ -113,6 +113,7 @@ $(function() {
self.feature_repetierTargetTemp = ko.observable(undefined); self.feature_repetierTargetTemp = ko.observable(undefined);
self.feature_disableExternalHeatupDetection = ko.observable(undefined); self.feature_disableExternalHeatupDetection = ko.observable(undefined);
self.feature_keyboardControl = ko.observable(undefined); self.feature_keyboardControl = ko.observable(undefined);
self.feature_pollWatched = ko.observable(undefined);
self.serial_port = ko.observable(); self.serial_port = ko.observable();
self.serial_baudrate = ko.observable(); self.serial_baudrate = ko.observable();
@@ -377,6 +378,7 @@ $(function() {
self.feature_repetierTargetTemp(response.feature.repetierTargetTemp); self.feature_repetierTargetTemp(response.feature.repetierTargetTemp);
self.feature_disableExternalHeatupDetection(!response.feature.externalHeatupDetection); self.feature_disableExternalHeatupDetection(!response.feature.externalHeatupDetection);
self.feature_keyboardControl(response.feature.keyboardControl); self.feature_keyboardControl(response.feature.keyboardControl);
self.feature_pollWatched(response.feature.pollWatched);
self.serial_port(response.serial.port); self.serial_port(response.serial.port);
self.serial_baudrate(response.serial.baudrate); self.serial_baudrate(response.serial.baudrate);
@@ -457,7 +459,8 @@ $(function() {
"swallowOkAfterResend": self.feature_swallowOkAfterResend(), "swallowOkAfterResend": self.feature_swallowOkAfterResend(),
"repetierTargetTemp": self.feature_repetierTargetTemp(), "repetierTargetTemp": self.feature_repetierTargetTemp(),
"externalHeatupDetection": !self.feature_disableExternalHeatupDetection(), "externalHeatupDetection": !self.feature_disableExternalHeatupDetection(),
"keyboardControl": self.feature_keyboardControl() "keyboardControl": self.feature_keyboardControl(),
"pollWatched": self.feature_pollWatched()
}, },
"serial": { "serial": {
"port": self.serial_port(), "port": self.serial_port(),
@@ -29,4 +29,11 @@
<input type="text" class="input-block-level" data-bind="value: folder_watched" id="settings-folderWatched"> <input type="text" class="input-block-level" data-bind="value: folder_watched" id="settings-folderWatched">
</div> </div>
</div> </div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: feature_pollWatched" id="settings-featurePollWatched"> {{ _('Actively poll the watched folder. Check this if files in your watched folder aren\'t automatically added otherwise.') }}
</label>
</div>
</div>
</form> </form>
@@ -22,7 +22,7 @@
<label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature interval') }}</label> <label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature interval') }}</label>
<div class="controls"> <div class="controls">
<div class="input-append"> <div class="input-append">
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature"> <input type="number" step="any" min="1" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature">
<span class="add-on">s</span> <span class="add-on">s</span>
</div> </div>
</div> </div>
File diff suppressed because it is too large. Load diff
+18 -4
View File
@@ -352,9 +352,7 @@ def silent_remove(file):
def sanitize_ascii(line): def sanitize_ascii(line):
if not isinstance(line, basestring): if not isinstance(line, basestring):
raise ValueError("Expected either str or unicode but got {} instead".format(line.__class__.__name__ if line is not None else None)) raise ValueError("Expected either str or unicode but got {} instead".format(line.__class__.__name__ if line is not None else None))
if isinstance(line, str): return to_unicode(line, encoding="ascii", errors="replace").rstrip()
line = unicode(line, 'ascii', 'replace')
return line.encode('ascii', 'replace').rstrip()
def filter_non_ascii(line): def filter_non_ascii(line):
@@ -369,12 +367,28 @@ def filter_non_ascii(line):
""" """
try: try:
unicode(line, 'ascii').encode('ascii') to_str(to_unicode(line, encoding="ascii"), encoding="ascii")
return False return False
except ValueError: except ValueError:
return True return True
def to_str(s_or_u, encoding="utf-8", errors="strict"):
"""Make sure ``s_or_u`` is a str."""
if isinstance(s_or_u, unicode):
return s_or_u.encode(encoding, errors=errors)
else:
return s_or_u
def to_unicode(s_or_u, encoding="utf-8", errors="strict"):
"""Make sure ``s_or_u`` is a unicode string."""
if isinstance(s_or_u, str):
return s_or_u.decode(encoding, errors=errors)
else:
return s_or_u
def dict_merge(a, b): def dict_merge(a, b):
""" """
Recursively deep-merges two dictionaries. Recursively deep-merges two dictionaries.
+13 -7
View File
@@ -529,7 +529,7 @@ class MachineCom(object):
self.sendCommand("M24") self.sendCommand("M24")
self._sd_status_timer = RepeatedTimer(lambda: get_interval("sdStatus"), self._poll_sd_status, run_first=True) self._sd_status_timer = RepeatedTimer(lambda: get_interval("sdStatus", default_value=1.0), self._poll_sd_status, run_first=True)
self._sd_status_timer.start() self._sd_status_timer.start()
else: else:
line = self._getNext() line = self._getNext()
@@ -1181,7 +1181,7 @@ class MachineCom(object):
def _onConnected(self): def _onConnected(self):
self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"]) self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"])
self._temperature_timer = RepeatedTimer(lambda: get_interval("temperature"), self._poll_temperature, run_first=True) self._temperature_timer = RepeatedTimer(lambda: get_interval("temperature", default_value=4.0), self._poll_temperature, run_first=True)
self._temperature_timer.start() self._temperature_timer.start()
self._changeState(self.STATE_OPERATIONAL) self._changeState(self.STATE_OPERATIONAL)
@@ -1638,11 +1638,13 @@ class MachineCom(object):
try: try:
self._serial.write(cmd + '\n') self._serial.write(cmd + '\n')
except: except:
self._log("Unexpected error while writing serial port: %s" % (get_exception_string())) self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string() self._errorValue = get_exception_string()
self.close(True) self.close(True)
except: except:
self._log("Unexpected error while writing serial port: %s" % (get_exception_string())) self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string() self._errorValue = get_exception_string()
self.close(True) self.close(True)
@@ -1997,11 +1999,15 @@ def get_new_timeout(type):
return now + get_interval(type) return now + get_interval(type)
def get_interval(type): def get_interval(type, default_value=0.0):
if type not in default_settings["serial"]["timeout"]: if type not in default_settings["serial"]["timeout"]:
return 0 return default_value
else: else:
return settings().getFloat(["serial", "timeout", type]) value = settings().getFloat(["serial", "timeout", type])
if not value:
return default_value
else:
return value
_temp_command_regex = re.compile("^M(?P<command>104|109|140|190)(\s+T(?P<tool>\d+)|\s+S(?P<temperature>[-+]?\d*\.?\d*))+") _temp_command_regex = re.compile("^M(?P<command>104|109|140|190)(\s+T(?P<tool>\d+)|\s+S(?P<temperature>[-+]?\d*\.?\d*))+")
+5
View File
@@ -11,6 +11,9 @@ import sys
import logging import logging
from octoprint.util import to_unicode
class UnknownPip(Exception): class UnknownPip(Exception):
pass pass
@@ -77,11 +80,13 @@ class PipCaller(object):
while p.returncode is None: while p.returncode is None:
line = p.stderr.readline(timeout=0.5) line = p.stderr.readline(timeout=0.5)
if line: if line:
line = to_unicode(line, errors="replace")
self._log_stderr(line) self._log_stderr(line)
all_stderr.append(line) all_stderr.append(line)
line = p.stdout.readline(timeout=0.5) line = p.stdout.readline(timeout=0.5)
if line: if line:
line = to_unicode(line, errors="replace")
self._log_stdout(line) self._log_stdout(line)
all_stdout.append(line) all_stdout.append(line)
Binary file not shown.
File diff suppressed because it is too large. Load diff
+109 -100
View File
@@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: OctoPrint 1.2.0-rc3-2-g33ea9c3-dirty\n" "Project-Id-Version: OctoPrint 1.2.3-dev-17-g6f7b941\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2015-06-21 17:58+0200\n" "POT-Creation-Date: 2015-07-07 18:58+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n" "Generated-By: Babel 1.3\n"
#: src/octoprint/plugins/cura/__init__.py:43
msgid "CuraEngine"
msgstr ""
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:1 #: src/octoprint/plugins/cura/templates/cura_settings.jinja2:1
#: src/octoprint/templates/tabs/control.jinja2:98 #: src/octoprint/templates/tabs/control.jinja2:98
msgid "General" msgid "General"
@@ -128,251 +132,251 @@ msgstr ""
msgid "Confirm" msgid "Confirm"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/__init__.py:79 #: src/octoprint/plugins/pluginmanager/__init__.py:104
msgid "Plugin Manager" msgid "Plugin Manager"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:132 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:130
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:275 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:270
msgid "Installing plugin..." msgid "Installing plugin..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:132 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:130
msgid "Installing plugin from uploaded archive..." msgid "Installing plugin from uploaded archive..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:147 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:142
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:223 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:222
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:300 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:295
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:330 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:325
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:544 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:539
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:574 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:569
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:591 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:586
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:608 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:603
msgid "Something went wrong" msgid "Something went wrong"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:148 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:143
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:224 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:223
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:301 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:296
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:331 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:326
msgid "Please consult octoprint.log for details" msgid "Please consult octoprint.log for details"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:277 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:272
#, python-format #, python-format
msgid "Installing plugin \"%(name)s\" from %(url)s..." msgid "Installing plugin \"%(name)s\" from %(url)s..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:279 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:274
#, python-format #, python-format
msgid "Installing plugin from %(url)s..." msgid "Installing plugin from %(url)s..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:282 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:277
msgid "Reinstalling plugin..." msgid "Reinstalling plugin..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:283 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:278
#, python-format #, python-format
msgid "Reinstalling plugin \"%(name)s\" from %(url)s..." msgid "Reinstalling plugin \"%(name)s\" from %(url)s..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:321 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:316
msgid "Uninstalling plugin..." msgid "Uninstalling plugin..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:321 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:316
#, python-format #, python-format
msgid "Uninstalling plugin \"%(name)s\"" msgid "Uninstalling plugin \"%(name)s\""
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
msgid "Reinstall" msgid "Reinstall"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:130 #: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:130
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:146 #: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:146
msgid "Install" msgid "Install"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
msgid "Incompatible" msgid "Incompatible"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:374 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:369
#: src/octoprint/templates/overlays/reloadui.jinja2:9 #: src/octoprint/templates/overlays/reloadui.jinja2:9
msgid "Reload now" msgid "Reload now"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:443 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:438
msgid "Done!" msgid "Done!"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:463 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:458
msgid "Enable Plugin" msgid "Enable Plugin"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:463 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:458
msgid "Disable Plugin" msgid "Disable Plugin"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:528 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:523
msgid "Plugin installed" msgid "Plugin installed"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:529 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:524
msgid "" msgid ""
"A plugin was installed successfully, however it was impossible to detect " "A plugin was installed successfully, however it was impossible to detect "
"which one. Please Restart OctoPrint to make sure everything will be " "which one. Please Restart OctoPrint to make sure everything will be "
"registered properly" "registered properly"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:533 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:528
#, python-format #, python-format
msgid "Plugin \"%(name)s\" reinstalled" msgid "Plugin \"%(name)s\" reinstalled"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:534 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:529
msgid "The plugin was reinstalled successfully" msgid "The plugin was reinstalled successfully"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:535 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:530
msgid "" msgid ""
"The plugin was reinstalled successfully, however a restart of OctoPrint " "The plugin was reinstalled successfully, however a restart of OctoPrint "
"is needed for that to take effect." "is needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:536 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:531
msgid "" msgid ""
"The plugin was reinstalled successfully, however a reload of the page is " "The plugin was reinstalled successfully, however a reload of the page is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:538 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:533
#, python-format #, python-format
msgid "Plugin \"%(name)s\" installed" msgid "Plugin \"%(name)s\" installed"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:539 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:534
msgid "The plugin was installed successfully" msgid "The plugin was installed successfully"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:540 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:535
msgid "" msgid ""
"The plugin was installed successfully, however a restart of OctoPrint is " "The plugin was installed successfully, however a restart of OctoPrint is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:541 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:536
msgid "" msgid ""
"The plugin was installed successfully, however a reload of the page is " "The plugin was installed successfully, however a reload of the page is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:552 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:547
#, python-format #, python-format
msgid "Reinstalling the plugin from URL \"%(url)s\" failed: %(reason)s" msgid "Reinstalling the plugin from URL \"%(url)s\" failed: %(reason)s"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:554 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:549
#, python-format #, python-format
msgid "Installing the plugin from URL \"%(url)s\" failed: %(reason)s" msgid "Installing the plugin from URL \"%(url)s\" failed: %(reason)s"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:558 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:553
#, python-format #, python-format
msgid "" msgid ""
"Reinstalling the plugin from URL \"%(url)s\" failed, please see the log " "Reinstalling the plugin from URL \"%(url)s\" failed, please see the log "
"for details." "for details."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:560 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:555
#, python-format #, python-format
msgid "" msgid ""
"Installing the plugin from URL \"%(url)s\" failed, please see the log for" "Installing the plugin from URL \"%(url)s\" failed, please see the log for"
" details." " details."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:569 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:564
#, python-format #, python-format
msgid "Plugin \"%(name)s\" uninstalled" msgid "Plugin \"%(name)s\" uninstalled"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:570 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:565
msgid "The plugin was uninstalled successfully" msgid "The plugin was uninstalled successfully"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:571 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:566
msgid "" msgid ""
"The plugin was uninstalled successfully, however a restart of OctoPrint " "The plugin was uninstalled successfully, however a restart of OctoPrint "
"is needed for that to take effect." "is needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:572 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:567
msgid "" msgid ""
"The plugin was uninstalled successfully, however a reload of the page is " "The plugin was uninstalled successfully, however a reload of the page is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:576 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:571
#, python-format #, python-format
msgid "Uninstalling the plugin failed: %(reason)s" msgid "Uninstalling the plugin failed: %(reason)s"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:578 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:573
msgid "Uninstalling the plugin failed, please see the log for details." msgid "Uninstalling the plugin failed, please see the log for details."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:586 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:581
#, python-format #, python-format
msgid "Plugin \"%(name)s\" enabled" msgid "Plugin \"%(name)s\" enabled"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:587 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:582
msgid "The plugin was enabled successfully." msgid "The plugin was enabled successfully."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:588 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:583
msgid "" msgid ""
"The plugin was enabled successfully, however a restart of OctoPrint is " "The plugin was enabled successfully, however a restart of OctoPrint is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:589 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:584
msgid "" msgid ""
"The plugin was enabled successfully, however a reload of the page is " "The plugin was enabled successfully, however a reload of the page is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:593 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:588
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:610 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:605
#, python-format #, python-format
msgid "Toggling the plugin failed: %(reason)s" msgid "Toggling the plugin failed: %(reason)s"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:595 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:590
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:612 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:607
msgid "Toggling the plugin failed, please see the log for details." msgid "Toggling the plugin failed, please see the log for details."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:603 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:598
#, python-format #, python-format
msgid "Plugin \"%(name)s\" disabled" msgid "Plugin \"%(name)s\" disabled"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:604 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:599
msgid "The plugin was disabled successfully." msgid "The plugin was disabled successfully."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:605 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:600
msgid "" msgid ""
"The plugin was disabled successfully, however a restart of OctoPrint is " "The plugin was disabled successfully, however a restart of OctoPrint is "
"needed for that to take effect." "needed for that to take effect."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:606 #: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:601
msgid "" msgid ""
"The plugin was disabled successfully, however a reload of the page is " "The plugin was disabled successfully, however a reload of the page is "
"needed for that to take effect." "needed for that to take effect."
@@ -407,7 +411,7 @@ msgid "Get More..."
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:59 #: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:59
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:167 #: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:152
#: src/octoprint/templates/dialogs/settings/appearance.jinja2:96 #: src/octoprint/templates/dialogs/settings/appearance.jinja2:96
msgid "Close" msgid "Close"
msgstr "" msgstr ""
@@ -489,17 +493,11 @@ msgid ""
"\".tar.gz\", \".tgz\" or \".tar\"" "\".tar.gz\", \".tgz\" or \".tar\""
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:152 #: src/octoprint/plugins/softwareupdate/__init__.py:315
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:44 msgid "Software Update"
#: src/octoprint/templates/tabs/terminal.jinja2:25
msgid "Advanced options"
msgstr "" msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:158 #: src/octoprint/plugins/softwareupdate/__init__.py:589
msgid "Use <code>--process-dependency-links</code> with <code>pip install</code>"
msgstr ""
#: src/octoprint/plugins/softwareupdate/__init__.py:499
#: src/octoprint/server/views.py:146 #: src/octoprint/server/views.py:146
#: src/octoprint/static/js/app/viewmodels/appearance.js:11 #: src/octoprint/static/js/app/viewmodels/appearance.js:11
#: src/octoprint/static/js/app/viewmodels/appearance.js:13 #: src/octoprint/static/js/app/viewmodels/appearance.js:13
@@ -528,8 +526,8 @@ msgstr ""
#: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:147 #: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:147
msgid "" msgid ""
"You can make this message display again via \"Settings\" > " "You can make this message display again via \"Settings\" > \"Software "
"\"SoftwareUpdate\" > \"Check for update now\"" "Update\" > \"Check for update now\""
msgstr "" msgstr ""
#: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:151 #: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:151
@@ -674,6 +672,11 @@ msgstr ""
msgid "Check for update now" msgid "Check for update now"
msgstr "" msgstr ""
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:44
#: src/octoprint/templates/tabs/terminal.jinja2:25
msgid "Advanced options"
msgstr ""
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:46 #: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:46
msgid "Force check for update (overrides cache used for update checks)" msgid "Force check for update (overrides cache used for update checks)"
msgstr "" msgstr ""
@@ -806,14 +809,14 @@ msgstr ""
msgid "Interface" msgid "Interface"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:65 #: src/octoprint/static/js/app/dataupdater.js:66
#: src/octoprint/static/js/app/dataupdater.js:99 #: src/octoprint/static/js/app/dataupdater.js:100
#: src/octoprint/static/js/app/helpers.js:436 #: src/octoprint/static/js/app/helpers.js:436
#: src/octoprint/templates/overlays/offline.jinja2:6 #: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline" msgid "Server is offline"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:66 #: src/octoprint/static/js/app/dataupdater.js:67
msgid "" msgid ""
"The server appears to be offline, at least I'm not getting any response " "The server appears to be offline, at least I'm not getting any response "
"from it. I'll try to reconnect automatically <strong>over the next couple" "from it. I'll try to reconnect automatically <strong>over the next couple"
@@ -821,79 +824,79 @@ msgid ""
"anytime using the button below." "anytime using the button below."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:100 #: src/octoprint/static/js/app/dataupdater.js:101
msgid "" msgid ""
"The server appears to be offline, at least I'm not getting any response " "The server appears to be offline, at least I'm not getting any response "
"from it. I <strong>could not reconnect automatically</strong>, but you " "from it. I <strong>could not reconnect automatically</strong>, but you "
"may try a manual reconnect using the button below." "may try a manual reconnect using the button below."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:166 #: src/octoprint/static/js/app/dataupdater.js:168
#: src/octoprint/static/js/app/dataupdater.js:194 #: src/octoprint/static/js/app/dataupdater.js:196
#, python-format #, python-format
msgid "Slicing ... (%(percentage)d%%)" msgid "Slicing ... (%(percentage)d%%)"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:183 #: src/octoprint/static/js/app/dataupdater.js:185
msgid "Rendering timelapse" msgid "Rendering timelapse"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:183 #: src/octoprint/static/js/app/dataupdater.js:185
#, python-format #, python-format
msgid "Now rendering timelapse %(movie_basename)s" msgid "Now rendering timelapse %(movie_basename)s"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:185 #: src/octoprint/static/js/app/dataupdater.js:187
msgid "Timelapse ready" msgid "Timelapse ready"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:185 #: src/octoprint/static/js/app/dataupdater.js:187
#, python-format #, python-format
msgid "New timelapse %(movie_basename)s is done rendering." msgid "New timelapse %(movie_basename)s is done rendering."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:187 #: src/octoprint/static/js/app/dataupdater.js:189
#, python-format #, python-format
msgid "" msgid ""
"Rendering of timelapse %(movie_basename)s failed with return code " "Rendering of timelapse %(movie_basename)s failed with return code "
"%(returncode)s" "%(returncode)s"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:189 #: src/octoprint/static/js/app/dataupdater.js:191
msgid "Rendering failed" msgid "Rendering failed"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:196 #: src/octoprint/static/js/app/dataupdater.js:198
msgid "Slicing ..." msgid "Slicing ..."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:202 #: src/octoprint/static/js/app/dataupdater.js:204
msgid "Slicing done" msgid "Slicing done"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:202 #: src/octoprint/static/js/app/dataupdater.js:204
#, python-format #, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds" msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:212 #: src/octoprint/static/js/app/dataupdater.js:214
#, python-format #, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s" msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:213 #: src/octoprint/static/js/app/dataupdater.js:215
msgid "Slicing failed" msgid "Slicing failed"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:217 #: src/octoprint/static/js/app/dataupdater.js:219
msgid "Streaming ..." msgid "Streaming ..."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:223 #: src/octoprint/static/js/app/dataupdater.js:225
msgid "Streaming done" msgid "Streaming done"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:224 #: src/octoprint/static/js/app/dataupdater.js:226
#, python-format #, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds" msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "" msgstr ""
@@ -999,18 +1002,18 @@ msgstr ""
msgid "Last Print Time" msgid "Last Print Time"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:388 #: src/octoprint/static/js/app/viewmodels/files.js:392
msgid "" msgid ""
"Could not upload the file. Make sure that it is a GCODE file and has the " "Could not upload the file. Make sure that it is a GCODE file and has the "
"extension \".gcode\" or \".gco\" or that it is an STL file with the " "extension \".gcode\" or \".gco\" or that it is an STL file with the "
"extension \".stl\"." "extension \".stl\"."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:404 #: src/octoprint/static/js/app/viewmodels/files.js:408
msgid "Uploading ..." msgid "Uploading ..."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:407 #: src/octoprint/static/js/app/viewmodels/files.js:411
msgid "Saving ..." msgid "Saving ..."
msgstr "" msgstr ""
@@ -1114,12 +1117,12 @@ msgstr ""
msgid "The command \"%(command)s\" executed successfully" msgid "The command \"%(command)s\" executed successfully"
msgstr "" msgstr ""
#: src/octoprint/static/js/app/viewmodels/navigation.js:31 #: src/octoprint/static/js/app/viewmodels/navigation.js:32
#, python-format #, python-format
msgid "The command \"%(command)s\" could not be executed." msgid "The command \"%(command)s\" could not be executed."
msgstr "" msgstr ""
#: src/octoprint/static/js/app/viewmodels/navigation.js:33 #: src/octoprint/static/js/app/viewmodels/navigation.js:34
msgid "Error" msgid "Error"
msgstr "" msgstr ""
@@ -1753,6 +1756,12 @@ msgstr ""
msgid "Watched Folder" msgid "Watched Folder"
msgstr "" msgstr ""
#: src/octoprint/templates/dialogs/settings/folders.jinja2:35
msgid ""
"Actively poll the watched folder. Check this if files in your watched "
"folder aren't automatically added otherwise."
msgstr ""
#: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3 #: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3
msgid "Before print job starts" msgid "Before print job starts"
msgstr "" msgstr ""