Merge branch 'maintenance' into devel
This commit is contained in:
commit
b3affac9e5
51 files changed
+953
-539
No files matched your search
@@ -95,7 +95,7 @@ jobs:
|
||||
test-e2e:
|
||||
name: 🧪 E2E tests
|
||||
needs: build
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: ⬇ Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -12,6 +12,29 @@ jobs:
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- uses: actions/github-script@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let labels = [];
|
||||
let setLabels = false;
|
||||
context.payload.pull_request.labels.forEach(label => { labels.push(label.name) });
|
||||
|
||||
let target = context.payload.pull_request.base.ref;
|
||||
if (["maintenance", "devel", "staging/maintenance", "staging/devel", "master"].includes(target)) {
|
||||
labels.push(`targets ${target}`);
|
||||
setLabels = true;
|
||||
}
|
||||
|
||||
if (setLabels) {
|
||||
github.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: labels
|
||||
})
|
||||
}
|
||||
|
||||
- uses: OctoPrint/actions/pr-validation@main
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,4 @@
|
||||
# ripgrep ignore file
|
||||
|
||||
src/octoprint/static/vendor/
|
||||
src/octoprint/vendor/
|
||||
@@ -148,6 +148,10 @@ date of first contribution):
|
||||
* [ldursw](https://github.com/ldursw)
|
||||
* [Ian Wilt](https://github.com/ianwiltdotcom)
|
||||
* [Ben Sycha](https://github.com/Sycha)
|
||||
* [John Boiles](https://github.com/johnboiles)
|
||||
* [Adam DeMuri](https://github.com/ademuri)
|
||||
* [Daniel Shenkle](https://github.com/DShenkle)
|
||||
* [Bryan Kenote](https://github.com/bryankenote)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
+2
-2
@@ -25,7 +25,6 @@ thanks to everyone who contributed!
|
||||
* David Bounds
|
||||
* DeltaMaker 3D Printers
|
||||
* Dennis Breining
|
||||
* Douglas Floyd
|
||||
* Dr. Frank Wester
|
||||
* Eric Betts
|
||||
* Ernesto Martinez
|
||||
@@ -48,6 +47,7 @@ thanks to everyone who contributed!
|
||||
* LA 3D Printer Repair
|
||||
* Lachlan Bell
|
||||
* Lee Dohm
|
||||
* Lefteris Lertas
|
||||
* LulzBot
|
||||
* Makespace Madrid
|
||||
* Mark Walker
|
||||
@@ -78,4 +78,4 @@ thanks to everyone who contributed!
|
||||
* Ulderico Cirello
|
||||
* Ulrich Kempken
|
||||
|
||||
and 2352 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
and 2247 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
@@ -199,6 +199,10 @@ You'll need a user account with administrator privileges.
|
||||
* ``ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"``
|
||||
* ``brew install python``
|
||||
|
||||
* Install `pip <https://pip.pypa.io/en/stable/installation/#supported-methods>`_
|
||||
|
||||
* ``python -m ensurepip --upgrade``
|
||||
|
||||
* Install `virtualenv <https://virtualenv.pypa.io/>`_
|
||||
|
||||
* ``pip install virtualenv``
|
||||
|
||||
@@ -35,9 +35,22 @@ any :ref:`settings overlays <sec-plugins-controlproperties-plugin_settings_overl
|
||||
|
||||
On disabling a plugin, its hook handlers, helpers, mixin implementations and settings overlays will be de-registered again.
|
||||
|
||||
When a plugin gets enabled, OctoPrint will also call the :func:`on_plugin_enabled` callback on its implementation
|
||||
(if it exists). Likewise, when a plugin gets disabled OctoPrint will call the :func:`on_plugin_disabled` callback on
|
||||
its implementation (again, if it exists).
|
||||
|
||||
Some plugin types require a reload of the frontend or a restart of OctoPrint for enabling/disabling them. You
|
||||
can recognize such plugins by their implementations implementing :class:`~octoprint.plugin.ReloadNeedingPlugin` or
|
||||
:class:`~octoprint.plugin.RestartNeedingPlugin` or providing handlers for one of the hooks marked correspondingly.
|
||||
For these plugins, disabling them will *not* trigger the respective callback at runtime as they will not actually
|
||||
be disabled right away but only marked as such so that they won't even load during the required restart.
|
||||
|
||||
Note that uninstalling a plugin through the bundled Plugin Manager will make a plugin first get disabled and
|
||||
then unloaded, but only if it doesn't require a restart. Plugins wishing to react to an uninstall through the
|
||||
Plugin Manager may implement :func:`~octoprint.plugin.types.OctoPrintPlugin.on_plugin_pending_uninstall` (added in OctoPrint 1.8.0) which will always be called by the Plugin Manager,
|
||||
regardless of whether the plugin requires a restart of OctoPrint to be fully uninstalled or not. Please be aware
|
||||
that the Plugin Manager is not the only way to uninstall a plugin from the system, a user may also uninstall it
|
||||
manually through the command line, circumventing Plugin Manager completely.
|
||||
|
||||
.. image:: ../images/plugins_lifecycle.png
|
||||
:align: center
|
||||
|
||||
@@ -23,12 +23,13 @@ SETUP_REQUIRES = [
|
||||
INSTALL_REQUIRES = [
|
||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||
"OctoPrint-FileCheck>=2021.2.23",
|
||||
"OctoPrint-FirmwareCheck>=2021.2.4",
|
||||
"OctoPrint-FirmwareCheck>=2021.10.11",
|
||||
"OctoPrint-PiSupport>=2021.8.2",
|
||||
# the following dependencies are non trivial to update since later versions
|
||||
# introduce backwards incompatible changes that might affect plugins, or due to
|
||||
# other observed problems
|
||||
"regex!=2018.11.6", # avoid broken 2018.11.6. See #2874
|
||||
"wrapt>=1.12.1,<1.13", # newer versions fail to build on OctoPi 0.15
|
||||
# anything below this should be checked on releases for new versions
|
||||
"tornado>=6.0.4,<7",
|
||||
"markdown>=3.2.2,<4",
|
||||
|
||||
@@ -364,10 +364,9 @@ def init_logging(
|
||||
|
||||
config_from_file = {}
|
||||
if os.path.exists(logging_file) and os.path.isfile(logging_file):
|
||||
import yaml
|
||||
from octoprint.util import yaml
|
||||
|
||||
with open(logging_file, encoding="utf-8") as f:
|
||||
config_from_file = yaml.safe_load(f)
|
||||
config_from_file = yaml.load_from_file(path=logging_file)
|
||||
|
||||
# we merge that with the default config
|
||||
if config_from_file is not None and isinstance(config_from_file, dict):
|
||||
@@ -713,9 +712,7 @@ def get_plugin_blacklist(settings, connectivity_checker=None):
|
||||
import time
|
||||
|
||||
import requests
|
||||
import yaml
|
||||
|
||||
from octoprint.util import bom_aware_open
|
||||
from octoprint.util.version import is_octoprint_compatible, is_python_compatible
|
||||
|
||||
logger = log.getLogger(__name__ + ".startup")
|
||||
@@ -781,8 +778,9 @@ def get_plugin_blacklist(settings, connectivity_checker=None):
|
||||
if os.stat(path).st_mtime + ttl < time.time():
|
||||
return None
|
||||
|
||||
with bom_aware_open(path, encoding="utf-8", mode="rt") as f:
|
||||
result = yaml.safe_load(f)
|
||||
from octoprint.util import yaml
|
||||
|
||||
result = yaml.load_from_file(path=path)
|
||||
|
||||
if isinstance(result, list):
|
||||
return result
|
||||
@@ -795,8 +793,9 @@ def get_plugin_blacklist(settings, connectivity_checker=None):
|
||||
|
||||
if cache is not None:
|
||||
try:
|
||||
with bom_aware_open(cache, encoding="utf-8", mode="wt") as f:
|
||||
yaml.safe_dump(result, f)
|
||||
from octoprint.util import yaml
|
||||
|
||||
yaml.save_to_file(result, path=cache)
|
||||
except Exception as e:
|
||||
logger.info(
|
||||
"Fetched plugin blacklist but couldn't write it to its cache file: %s",
|
||||
|
||||
@@ -6,12 +6,10 @@ import logging
|
||||
import os
|
||||
from functools import partial
|
||||
|
||||
import yaml
|
||||
|
||||
from octoprint.access import ADMIN_GROUP, GUEST_GROUP, READONLY_GROUP, USER_GROUP
|
||||
from octoprint.access.permissions import OctoPrintPermission, Permissions
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import atomic_write
|
||||
from octoprint.util import atomic_write, yaml
|
||||
from octoprint.vendor.flask_principal import Need, Permission
|
||||
|
||||
GroupNeed = partial(Need, "group")
|
||||
@@ -226,8 +224,7 @@ class FilebasedGroupManager(GroupManager):
|
||||
def _load(self):
|
||||
if os.path.exists(self._groupfile) and os.path.isfile(self._groupfile):
|
||||
try:
|
||||
with open(self._groupfile, encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f)
|
||||
data = yaml.load_from_file(path=self._groupfile)
|
||||
|
||||
if "groups" not in data:
|
||||
groups = data
|
||||
@@ -343,11 +340,7 @@ class FilebasedGroupManager(GroupManager):
|
||||
with atomic_write(
|
||||
self._groupfile, mode="wt", permissions=0o600, max_permissions=0o666
|
||||
) as f:
|
||||
import yaml
|
||||
|
||||
yaml.safe_dump(
|
||||
data, f, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
yaml.save_to_file(data, file=f, pretty=True)
|
||||
self._dirty = False
|
||||
self._load()
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import time
|
||||
import uuid
|
||||
|
||||
import wrapt
|
||||
import yaml
|
||||
from flask_login import AnonymousUserMixin, UserMixin
|
||||
from werkzeug.local import LocalProxy
|
||||
|
||||
@@ -17,7 +16,7 @@ from octoprint.access.permissions import OctoPrintPermission, Permissions
|
||||
from octoprint.settings import settings as s
|
||||
from octoprint.util import atomic_write, deprecated, generate_api_key
|
||||
from octoprint.util import get_fully_qualified_classname as fqcn
|
||||
from octoprint.util import to_bytes
|
||||
from octoprint.util import to_bytes, yaml
|
||||
|
||||
|
||||
class UserManager(GroupChangeListener):
|
||||
@@ -512,64 +511,60 @@ class FilebasedUserManager(UserManager):
|
||||
|
||||
def _load(self):
|
||||
if os.path.exists(self._userfile) and os.path.isfile(self._userfile):
|
||||
# noinspection PyBroadException
|
||||
with open(self._userfile, encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f)
|
||||
data = yaml.load_from_file(path=self._userfile)
|
||||
|
||||
if not data or not isinstance(data, dict):
|
||||
self._logger.fatal(
|
||||
"{} does not contain a valid map of users. Fix "
|
||||
"the file, or remove it, then restart OctoPrint.".format(
|
||||
self._userfile
|
||||
)
|
||||
if not data or not isinstance(data, dict):
|
||||
self._logger.fatal(
|
||||
"{} does not contain a valid map of users. Fix "
|
||||
"the file, or remove it, then restart OctoPrint.".format(
|
||||
self._userfile
|
||||
)
|
||||
raise CorruptUserStorage()
|
||||
)
|
||||
raise CorruptUserStorage()
|
||||
|
||||
for name, attributes in data.items():
|
||||
if not isinstance(attributes, dict):
|
||||
continue
|
||||
for name, attributes in data.items():
|
||||
if not isinstance(attributes, dict):
|
||||
continue
|
||||
|
||||
permissions = []
|
||||
if "permissions" in attributes:
|
||||
permissions = attributes["permissions"]
|
||||
permissions = []
|
||||
if "permissions" in attributes:
|
||||
permissions = attributes["permissions"]
|
||||
|
||||
if "groups" in attributes:
|
||||
groups = set(attributes["groups"])
|
||||
else:
|
||||
groups = {self._group_manager.user_group}
|
||||
if "groups" in attributes:
|
||||
groups = set(attributes["groups"])
|
||||
else:
|
||||
groups = {self._group_manager.user_group}
|
||||
|
||||
# migrate from roles to permissions
|
||||
if "roles" in attributes and "permissions" not in attributes:
|
||||
self._logger.info(
|
||||
"Migrating user {} to new granular permission system".format(
|
||||
name
|
||||
)
|
||||
)
|
||||
|
||||
groups |= set(self._migrate_roles_to_groups(attributes["roles"]))
|
||||
self._dirty = True
|
||||
|
||||
apikey = None
|
||||
if "apikey" in attributes:
|
||||
apikey = attributes["apikey"]
|
||||
settings = {}
|
||||
if "settings" in attributes:
|
||||
settings = attributes["settings"]
|
||||
|
||||
self._users[name] = User(
|
||||
username=name,
|
||||
passwordHash=attributes["password"],
|
||||
active=attributes["active"],
|
||||
permissions=self._to_permissions(*permissions),
|
||||
groups=self._to_groups(*groups),
|
||||
apikey=apikey,
|
||||
settings=settings,
|
||||
# migrate from roles to permissions
|
||||
if "roles" in attributes and "permissions" not in attributes:
|
||||
self._logger.info(
|
||||
f"Migrating user {name} to new granular permission system"
|
||||
)
|
||||
for sessionid in self._sessionids_by_userid.get(name, set()):
|
||||
if sessionid in self._session_users_by_session:
|
||||
self._session_users_by_session[sessionid].update_user(
|
||||
self._users[name]
|
||||
)
|
||||
|
||||
groups |= set(self._migrate_roles_to_groups(attributes["roles"]))
|
||||
self._dirty = True
|
||||
|
||||
apikey = None
|
||||
if "apikey" in attributes:
|
||||
apikey = attributes["apikey"]
|
||||
settings = {}
|
||||
if "settings" in attributes:
|
||||
settings = attributes["settings"]
|
||||
|
||||
self._users[name] = User(
|
||||
username=name,
|
||||
passwordHash=attributes["password"],
|
||||
active=attributes["active"],
|
||||
permissions=self._to_permissions(*permissions),
|
||||
groups=self._to_groups(*groups),
|
||||
apikey=apikey,
|
||||
settings=settings,
|
||||
)
|
||||
for sessionid in self._sessionids_by_userid.get(name, set()):
|
||||
if sessionid in self._session_users_by_session:
|
||||
self._session_users_by_session[sessionid].update_user(
|
||||
self._users[name]
|
||||
)
|
||||
|
||||
if self._dirty:
|
||||
self._save()
|
||||
@@ -601,9 +596,7 @@ class FilebasedUserManager(UserManager):
|
||||
with atomic_write(
|
||||
self._userfile, mode="wt", permissions=0o600, max_permissions=0o666
|
||||
) as f:
|
||||
yaml.safe_dump(
|
||||
data, f, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
yaml.save_to_file(data, file=f, pretty=True)
|
||||
self._dirty = False
|
||||
self._load()
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import sys
|
||||
|
||||
import click
|
||||
|
||||
from octoprint.util import yaml
|
||||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
||||
# ~~ "octoprint util" commands
|
||||
@@ -94,8 +96,6 @@ def gcode_command(
|
||||
|
||||
import time
|
||||
|
||||
import yaml
|
||||
|
||||
from octoprint.util.gcodeInterpreter import gcode
|
||||
|
||||
throttle_callback = None
|
||||
@@ -151,14 +151,7 @@ def gcode_command(
|
||||
)
|
||||
sys.exit(-1)
|
||||
click.echo("RESULTS:")
|
||||
click.echo(
|
||||
yaml.safe_dump(
|
||||
interpreter.get_result(),
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
)
|
||||
)
|
||||
click.echo(yaml.dump(interpreter.get_result(), pretty=True))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -9,6 +9,7 @@ import click
|
||||
import octoprint_client
|
||||
from octoprint import FatalStartupError, init_settings
|
||||
from octoprint.cli import bulk_options, get_ctx_obj_option
|
||||
from octoprint.util import yaml
|
||||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
||||
@@ -171,10 +172,7 @@ def post_from_file(ctx, path, file_path, json_flag, yaml_flag, timeout):
|
||||
with open(file_path) as fp:
|
||||
data = json.load(fp)
|
||||
else:
|
||||
import yaml
|
||||
|
||||
with open(file_path) as fp:
|
||||
data = yaml.safe_load(fp)
|
||||
data = yaml.load_from_file(path=file_path)
|
||||
|
||||
r = ctx.obj.client.post_json(path, data, timeout=timeout)
|
||||
else:
|
||||
|
||||
@@ -7,10 +7,10 @@ import logging
|
||||
import pprint
|
||||
|
||||
import click
|
||||
import yaml
|
||||
|
||||
from octoprint import FatalStartupError, init_settings
|
||||
from octoprint.cli import get_ctx_obj_option, standard_options
|
||||
from octoprint.util import yaml
|
||||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
||||
@@ -214,9 +214,7 @@ def get_command(ctx, path, as_json=False, as_yaml=False, as_raw=False):
|
||||
if as_json:
|
||||
output = json.dumps(value)
|
||||
elif as_yaml:
|
||||
output = yaml.safe_dump(
|
||||
value, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
output = yaml.dump(value, pretty=True)
|
||||
elif as_raw:
|
||||
output = value
|
||||
else:
|
||||
@@ -240,9 +238,7 @@ def effective_command(ctx, as_json=False, as_yaml=False, as_raw=False):
|
||||
if as_json:
|
||||
output = json.dumps(value)
|
||||
elif as_yaml:
|
||||
output = yaml.safe_dump(
|
||||
value, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
output = yaml.dump(value, pretty=True)
|
||||
elif as_raw:
|
||||
output = value
|
||||
else:
|
||||
|
||||
@@ -8,9 +8,9 @@ import sys
|
||||
import threading
|
||||
|
||||
import psutil
|
||||
import yaml
|
||||
|
||||
from octoprint.plugin import EnvironmentDetectionPlugin
|
||||
from octoprint.util import yaml
|
||||
from octoprint.util.platform import get_os
|
||||
from octoprint.util.version import get_python_version_string
|
||||
|
||||
@@ -165,9 +165,7 @@ class EnvironmentDetector:
|
||||
self.run_detection()
|
||||
environment = copy.deepcopy(self._cache)
|
||||
|
||||
dumped_environment = yaml.safe_dump(
|
||||
environment, default_flow_style=False, indent=2, allow_unicode=True
|
||||
).strip()
|
||||
dumped_environment = yaml.dump(environment, pretty=True).strip()
|
||||
environment_lines = "\n".join(
|
||||
map(lambda l: f"| {l}", dumped_environment.split("\n"))
|
||||
)
|
||||
|
||||
@@ -12,6 +12,7 @@ import octoprint.plugin
|
||||
import octoprint.util
|
||||
from octoprint.events import Events, eventManager
|
||||
from octoprint.util import get_fully_qualified_classname as fqcn
|
||||
from octoprint.util import yaml
|
||||
|
||||
from .analysis import AnalysisQueue, QueueEntry # noqa: F401
|
||||
from .destinations import FileDestinations # noqa: F401
|
||||
@@ -935,8 +936,6 @@ class FileManager:
|
||||
def save_recovery_data(self, origin, path, pos):
|
||||
import time
|
||||
|
||||
import yaml
|
||||
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
data = {
|
||||
@@ -947,9 +946,7 @@ class FileManager:
|
||||
}
|
||||
try:
|
||||
with atomic_write(self._recovery_file, mode="wt", max_permissions=0o666) as f:
|
||||
yaml.safe_dump(
|
||||
data, stream=f, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
yaml.save_to_file(data, file=f, pretty=True)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
f"Could not write recovery data to file {self._recovery_file}"
|
||||
@@ -970,11 +967,9 @@ class FileManager:
|
||||
if not os.path.isfile(self._recovery_file):
|
||||
return None
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
with open(self._recovery_file, encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f)
|
||||
data = yaml.load_from_file(path=self._recovery_file)
|
||||
|
||||
if not isinstance(data, dict) or not all(
|
||||
map(lambda x: x in data, ("origin", "path", "pos", "date"))
|
||||
):
|
||||
|
||||
@@ -14,6 +14,7 @@ from octoprint.events import Events, eventManager
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import dict_merge
|
||||
from octoprint.util import get_fully_qualified_classname as fqcn
|
||||
from octoprint.util import yaml
|
||||
from octoprint.util.platform import CLOSE_FDS
|
||||
|
||||
EMPTY_RESULT = {
|
||||
@@ -401,7 +402,6 @@ class GcodeAnalysisQueue(AbstractAnalysisQueue):
|
||||
import sys
|
||||
|
||||
import sarge
|
||||
import yaml
|
||||
|
||||
if self._current.analysis and all(
|
||||
map(
|
||||
@@ -495,7 +495,7 @@ class GcodeAnalysisQueue(AbstractAnalysisQueue):
|
||||
raise RuntimeError("No analysis result found")
|
||||
else:
|
||||
_, output = output.split("RESULTS:")
|
||||
analysis = yaml.safe_load(output)
|
||||
analysis = yaml.load_from_file(file=output)
|
||||
|
||||
result["printingArea"] = analysis["printing_area"]
|
||||
result["dimensions"] = analysis["dimensions"]
|
||||
|
||||
@@ -12,7 +12,14 @@ from os import scandir, walk
|
||||
import pylru
|
||||
|
||||
import octoprint.filemanager
|
||||
from octoprint.util import atomic_write, is_hidden_path, time_this, to_bytes, to_unicode
|
||||
from octoprint.util import (
|
||||
atomic_write,
|
||||
is_hidden_path,
|
||||
time_this,
|
||||
to_bytes,
|
||||
to_unicode,
|
||||
yaml,
|
||||
)
|
||||
from octoprint.util.files import sanitize_filename
|
||||
|
||||
|
||||
@@ -502,10 +509,7 @@ class LocalFileStorage(StorageInterface):
|
||||
if os.path.exists(old_metadata_path):
|
||||
# load the old metadata file
|
||||
try:
|
||||
with open(old_metadata_path, encoding="utf-8") as f:
|
||||
import yaml
|
||||
|
||||
self._old_metadata = yaml.safe_load(f)
|
||||
self._old_metadata = yaml.load_from_file(path=old_metadata_path)
|
||||
except Exception:
|
||||
self._logger.exception("Error while loading old metadata file")
|
||||
|
||||
@@ -1887,8 +1891,6 @@ class LocalFileStorage(StorageInterface):
|
||||
# we switched to json in 1.3.9 - if we still have yaml here, migrate it now
|
||||
import json
|
||||
|
||||
import yaml
|
||||
|
||||
with self._get_persisted_metadata_lock(path):
|
||||
metadata_path_yaml = os.path.join(path, ".metadata.yaml")
|
||||
metadata_path_json = os.path.join(path, ".metadata.json")
|
||||
@@ -1909,16 +1911,13 @@ class LocalFileStorage(StorageInterface):
|
||||
)
|
||||
return
|
||||
|
||||
with open(metadata_path_yaml, encoding="utf-8") as f:
|
||||
try:
|
||||
metadata = yaml.safe_load(f)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
"Error while reading .metadata.yaml from {path}".format(
|
||||
**locals()
|
||||
)
|
||||
)
|
||||
return
|
||||
try:
|
||||
metadata = yaml.load_from_file(path=metadata_path_yaml)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
"Error while reading .metadata.yaml from {path}".format(**locals())
|
||||
)
|
||||
return
|
||||
|
||||
if not isinstance(metadata, dict):
|
||||
# looks invalid, ignore it
|
||||
|
||||
@@ -2385,9 +2385,15 @@ class Plugin:
|
||||
pass
|
||||
|
||||
def on_plugin_enabled(self):
|
||||
"""
|
||||
Called by the plugin core when the plugin was enabled. Override this to react to the event.
|
||||
"""
|
||||
pass
|
||||
|
||||
def on_plugin_disabled(self):
|
||||
"""
|
||||
Called by the plugin core when the plugin was disabled. Override this to react to the event.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -123,6 +123,14 @@ class OctoPrintPlugin(Plugin):
|
||||
os.makedirs(self._data_folder)
|
||||
return self._data_folder
|
||||
|
||||
def on_plugin_pending_uninstall(self):
|
||||
"""
|
||||
Called by the plugin manager when the plugin is pending uninstall. Override this to react to the event.
|
||||
|
||||
NOT called during plugin uninstalls triggered outside of OctoPrint!
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class ReloadNeedingPlugin(Plugin):
|
||||
"""
|
||||
|
||||
@@ -4,7 +4,6 @@ import time
|
||||
from collections import defaultdict
|
||||
|
||||
import flask
|
||||
import yaml
|
||||
from flask_babel import gettext
|
||||
|
||||
import octoprint.plugin
|
||||
@@ -13,7 +12,7 @@ from octoprint.access.permissions import Permissions
|
||||
from octoprint.server import NO_CONTENT, admin_permission, current_user
|
||||
from octoprint.server.util.flask import no_firstrun_access, restricted_access
|
||||
from octoprint.settings import valid_boolean_trues
|
||||
from octoprint.util import ResettableTimer, atomic_write, generate_api_key
|
||||
from octoprint.util import ResettableTimer, atomic_write, generate_api_key, yaml
|
||||
|
||||
CUTOFF_TIME = 10 * 60 # 10min
|
||||
POLL_TIMEOUT = 5 # 5 seconds
|
||||
@@ -438,8 +437,7 @@ class AppKeysPlugin(
|
||||
return
|
||||
|
||||
try:
|
||||
with open(self._key_path, encoding="utf-8", errors="strict") as f:
|
||||
persisted = yaml.safe_load(f)
|
||||
persisted = yaml.load_from_file(path=self._key_path)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
f"Could not load application keys from {self._key_path}"
|
||||
@@ -464,7 +462,7 @@ class AppKeysPlugin(
|
||||
|
||||
try:
|
||||
with atomic_write(self._key_path, mode="wt") as f:
|
||||
yaml.safe_dump(to_persist, f, allow_unicode=True)
|
||||
yaml.save_to_file(to_persist, file=f)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
f"Could not write application keys to {self._key_path}"
|
||||
|
||||
@@ -10,7 +10,7 @@ from octoprint.events import Events
|
||||
from octoprint.server import NO_CONTENT
|
||||
from octoprint.server.util.flask import no_firstrun_access
|
||||
from octoprint.settings import default_settings
|
||||
from octoprint.util import is_hidden_path, to_bytes
|
||||
from octoprint.util import is_hidden_path, to_bytes, yaml
|
||||
from octoprint.util.pip import create_pip_caller
|
||||
from octoprint.util.platform import is_os_compatible
|
||||
from octoprint.util.version import (
|
||||
@@ -1190,10 +1190,7 @@ class BackupPlugin(
|
||||
on_restore_failed(path)
|
||||
return False
|
||||
|
||||
import yaml
|
||||
|
||||
with open(configfile, encoding="utf-8") as f:
|
||||
configdata = yaml.safe_load(f)
|
||||
configdata = yaml.load_from_file(path=configfile)
|
||||
|
||||
userfile = os.path.join(temp, "basedir", "users.yaml")
|
||||
if not os.path.exists(userfile):
|
||||
|
||||
@@ -18,10 +18,10 @@ from octoprint.util.version import (
|
||||
)
|
||||
|
||||
SENTRY_URL_SERVER = (
|
||||
"https://d697280f99f544d5a0705e7ae9880dd5@o118517.ingest.sentry.io/1373987"
|
||||
"https://3d510fcb31be49c8a811639b7ed18377@o118517.ingest.sentry.io/1373987"
|
||||
)
|
||||
SENTRY_URL_COREUI = (
|
||||
"https://c82d12e144df4a848e57cd18912239f4@o118517.ingest.sentry.io/1374096"
|
||||
"https://c6ab43a97f224198ae62a6e11e253cf0@o118517.ingest.sentry.io/1374096"
|
||||
)
|
||||
|
||||
SETTINGS_DEFAULTS = {
|
||||
|
||||
@@ -4,7 +4,6 @@ __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms
|
||||
import os
|
||||
from os import scandir
|
||||
|
||||
import yaml
|
||||
from flask import abort, jsonify, request, url_for
|
||||
from flask_babel import gettext
|
||||
from werkzeug.exceptions import BadRequest
|
||||
@@ -16,7 +15,7 @@ from octoprint.access.permissions import Permissions
|
||||
from octoprint.server import NO_CONTENT
|
||||
from octoprint.server.util.flask import no_firstrun_access, redirect_to_tornado
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import is_hidden_path
|
||||
from octoprint.util import is_hidden_path, yaml
|
||||
|
||||
|
||||
class LoggingPlugin(
|
||||
@@ -180,10 +179,7 @@ class LoggingPlugin(
|
||||
|
||||
config_from_file = {}
|
||||
if os.path.exists(logging_file) and os.path.isfile(logging_file):
|
||||
import yaml
|
||||
|
||||
with open(logging_file, encoding="utf-8") as f:
|
||||
config_from_file = yaml.safe_load(f)
|
||||
config_from_file = yaml.load_from_file(path=logging_file)
|
||||
return config_from_file
|
||||
|
||||
def _get_logging_levels(self):
|
||||
@@ -233,9 +229,7 @@ class LoggingPlugin(
|
||||
with octoprint.util.atomic_write(
|
||||
self._get_logging_file(), mode="wt", max_permissions=0o666
|
||||
) as f:
|
||||
yaml.safe_dump(
|
||||
config, f, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
yaml.save_to_file(config, file=f, pretty=True)
|
||||
|
||||
# set runtime logging levels now
|
||||
for logger, level in new_levels.items():
|
||||
|
||||
@@ -1251,6 +1251,14 @@ class PluginManagerPlugin(
|
||||
)
|
||||
abort(500, description="Could not uninstall plugin, its origin is unknown")
|
||||
|
||||
if plugin.implementation:
|
||||
try:
|
||||
plugin.implementation.on_plugin_pending_uninstall()
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
"Error while calling on_plugin_pending_uninstall on the plugin, proceeding regardless"
|
||||
)
|
||||
|
||||
if plugin.origin.type == "entry_point":
|
||||
# plugin is installed through entry point, need to use pip to uninstall it
|
||||
origin = plugin.origin[3]
|
||||
|
||||
@@ -27,7 +27,7 @@ from octoprint.server.util.flask import (
|
||||
no_firstrun_access,
|
||||
with_revalidation_checking,
|
||||
)
|
||||
from octoprint.util import dict_merge, get_formatted_size, to_unicode
|
||||
from octoprint.util import dict_merge, get_formatted_size, to_unicode, yaml
|
||||
from octoprint.util.pip import create_pip_caller
|
||||
from octoprint.util.version import (
|
||||
get_comparable_version,
|
||||
@@ -37,10 +37,10 @@ from octoprint.util.version import (
|
||||
|
||||
from . import cli, exceptions, updaters, util, version_checks
|
||||
|
||||
# OctoPi 0.15+
|
||||
MINIMUM_PYTHON = "2.7.9"
|
||||
MINIMUM_SETUPTOOLS = "39.0.1"
|
||||
MINIMUM_PIP = "9.0.3"
|
||||
# OctoPi 0.16+
|
||||
MINIMUM_PYTHON = "2.7.13"
|
||||
MINIMUM_SETUPTOOLS = "40.7.1"
|
||||
MINIMUM_PIP = "19.0.1"
|
||||
|
||||
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
@@ -465,11 +465,8 @@ class SoftwareUpdatePlugin(
|
||||
if not os.path.isfile(self._version_cache_path):
|
||||
return
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
with open(self._version_cache_path, encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f)
|
||||
data = yaml.load_from_file(path=self._version_cache_path)
|
||||
timestamp = os.stat(self._version_cache_path).st_mtime
|
||||
except Exception:
|
||||
self._logger.exception("Error while loading version cache from disk")
|
||||
@@ -506,8 +503,6 @@ class SoftwareUpdatePlugin(
|
||||
self._logger.exception("Error parsing in version cache data")
|
||||
|
||||
def _save_version_cache(self):
|
||||
import yaml
|
||||
|
||||
from octoprint._version import get_versions
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
@@ -517,13 +512,7 @@ class SoftwareUpdatePlugin(
|
||||
with atomic_write(
|
||||
self._version_cache_path, mode="wt", max_permissions=0o666
|
||||
) as file_obj:
|
||||
yaml.safe_dump(
|
||||
self._version_cache,
|
||||
stream=file_obj,
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
)
|
||||
yaml.save_to_file(self._version_cache, file=file_obj, pretty=True)
|
||||
|
||||
self._version_cache_dirty = False
|
||||
self._version_cache_timestamp = time.time()
|
||||
@@ -541,11 +530,8 @@ class SoftwareUpdatePlugin(
|
||||
if not os.path.isfile(self._update_log_path):
|
||||
return
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
with open(self._update_log_path, encoding="utf-8") as f:
|
||||
data = yaml.safe_load(f)
|
||||
data = yaml.load_from_file(path=self._update_log_path)
|
||||
except Exception:
|
||||
self._logger.exception("Error while loading update log from disk")
|
||||
else:
|
||||
@@ -575,20 +561,16 @@ class SoftwareUpdatePlugin(
|
||||
self._logger.info("Loaded update log from disk")
|
||||
|
||||
def _save_update_log(self):
|
||||
import yaml
|
||||
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
with self._update_log_mutex:
|
||||
with atomic_write(
|
||||
self._update_log_path, mode="wt", max_permissions=0o666
|
||||
) as file_obj:
|
||||
yaml.safe_dump(
|
||||
yaml.save_to_file(
|
||||
sorted(self._update_log, key=lambda x: x["datetime"]),
|
||||
stream=file_obj,
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
file=file_obj,
|
||||
pretty=True,
|
||||
)
|
||||
self._update_log_dirty = False
|
||||
|
||||
|
||||
@@ -150,7 +150,13 @@ import os
|
||||
from os import scandir
|
||||
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import dict_contains_keys, dict_merge, dict_sanitize, is_hidden_path
|
||||
from octoprint.util import (
|
||||
dict_contains_keys,
|
||||
dict_merge,
|
||||
dict_sanitize,
|
||||
is_hidden_path,
|
||||
yaml,
|
||||
)
|
||||
|
||||
|
||||
class SaveError(Exception):
|
||||
@@ -500,10 +506,7 @@ class PrinterProfileManager:
|
||||
if not os.path.exists(path) or not os.path.isfile(path):
|
||||
return None
|
||||
|
||||
import yaml
|
||||
|
||||
with open(path, encoding="utf-8") as f:
|
||||
profile = yaml.safe_load(f)
|
||||
profile = yaml.load_from_file(path=path)
|
||||
|
||||
if profile is None or not isinstance(profile, dict):
|
||||
raise InvalidProfileError("Profile is None or not a dictionary")
|
||||
@@ -535,15 +538,11 @@ class PrinterProfileManager:
|
||||
"Profile %s already exists and not allowed to overwrite" % profile["id"]
|
||||
)
|
||||
|
||||
import yaml
|
||||
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
try:
|
||||
with atomic_write(path, mode="wt", max_permissions=0o666) as f:
|
||||
yaml.safe_dump(
|
||||
profile, f, default_flow_style=False, indent=2, allow_unicode=True
|
||||
)
|
||||
yaml.save_to_file(profile, file=f, pretty=True)
|
||||
except Exception as e:
|
||||
self._logger.exception(
|
||||
"Error while trying to save profile %s" % profile["id"]
|
||||
|
||||
@@ -1385,6 +1385,10 @@ class Server:
|
||||
@app.before_request
|
||||
def before_request():
|
||||
g.locale = self._get_locale()
|
||||
|
||||
# used for performance measurement
|
||||
g.start_time = octoprint.util.monotonic_time()
|
||||
|
||||
if self._debug and "perfprofile" in request.args:
|
||||
try:
|
||||
from pyinstrument import Profiler
|
||||
@@ -1408,6 +1412,11 @@ class Server:
|
||||
output_html = g.perfprofiler.output_html()
|
||||
return make_response(output_html)
|
||||
|
||||
if hasattr(g, "start_time"):
|
||||
end_time = octoprint.util.monotonic_time()
|
||||
duration_ms = int((end_time - g.start_time) * 1000)
|
||||
response.headers.add("Server-Timing", f"app;dur={duration_ms}")
|
||||
|
||||
return response
|
||||
|
||||
from octoprint.util.jinja import MarkdownFilter
|
||||
|
||||
@@ -17,6 +17,7 @@ from octoprint.plugin import plugin_manager
|
||||
from octoprint.server.api import api
|
||||
from octoprint.server.util.flask import no_firstrun_access
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import yaml
|
||||
|
||||
|
||||
@api.route("/languages", methods=["GET"])
|
||||
@@ -40,11 +41,8 @@ def getInstalledLanguagePacks():
|
||||
|
||||
meta_path = os.path.join(path, "meta.yaml")
|
||||
if os.path.isfile(meta_path):
|
||||
import yaml
|
||||
|
||||
try:
|
||||
with open(meta_path, encoding="utf-8") as f:
|
||||
meta = yaml.safe_load(f)
|
||||
meta = yaml.load_from_file(path=meta_path)
|
||||
except Exception:
|
||||
logging.getLogger(__name__).exception("Could not load %s", meta_path)
|
||||
pass
|
||||
|
||||
@@ -124,6 +124,7 @@ def getSettings():
|
||||
"streamUrl": s.get(["webcam", "stream"]),
|
||||
"streamRatio": s.get(["webcam", "streamRatio"]),
|
||||
"streamTimeout": s.getInt(["webcam", "streamTimeout"]),
|
||||
"streamWebrtcIceServers": s.get(["webcam", "streamWebrtcIceServers"]),
|
||||
"snapshotUrl": s.get(["webcam", "snapshot"]),
|
||||
"snapshotTimeout": s.getInt(["webcam", "snapshotTimeout"]),
|
||||
"snapshotSslValidation": s.getBoolean(["webcam", "snapshotSslValidation"]),
|
||||
@@ -528,6 +529,13 @@ def _saveSettings(data):
|
||||
s.set(["webcam", "streamRatio"], data["webcam"]["streamRatio"])
|
||||
if "streamTimeout" in data["webcam"]:
|
||||
s.setInt(["webcam", "streamTimeout"], data["webcam"]["streamTimeout"])
|
||||
if "streamWebrtcIceServers" in data["webcam"] and isinstance(
|
||||
data["webcam"]["streamWebrtcIceServers"], (list, tuple)
|
||||
):
|
||||
s.set(
|
||||
["webcam", "streamWebrtcIceServers"],
|
||||
data["webcam"]["streamWebrtcIceServers"],
|
||||
)
|
||||
if "snapshotUrl" in data["webcam"]:
|
||||
s.set(["webcam", "snapshot"], data["webcam"]["snapshotUrl"])
|
||||
if "snapshotTimeout" in data["webcam"]:
|
||||
@@ -1093,7 +1101,7 @@ def _saveSettings(data):
|
||||
plugin.on_settings_save(data["plugins"][plugin_id])
|
||||
except TypeError:
|
||||
logger.warning(
|
||||
"Could not save settings for plugin {name} ({version}) since it called super(...)".format(
|
||||
"Could not save settings for plugin {name} ({version}). It may have called super(...)".format(
|
||||
name=plugin._plugin_name, version=plugin._plugin_version
|
||||
)
|
||||
)
|
||||
@@ -1104,7 +1112,8 @@ def _saveSettings(data):
|
||||
"Please contact the plugin's author and ask to update the plugin to use a direct call like"
|
||||
)
|
||||
logger.warning(
|
||||
"octoprint.plugin.SettingsPlugin.on_settings_save(self, data) instead."
|
||||
"octoprint.plugin.SettingsPlugin.on_settings_save(self, data) instead.",
|
||||
exc_info=True,
|
||||
)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
|
||||
@@ -30,7 +30,7 @@ import octoprint.server
|
||||
import octoprint.vendor.flask_principal as flask_principal
|
||||
from octoprint.events import Events, eventManager
|
||||
from octoprint.settings import settings
|
||||
from octoprint.util import DefaultOrderedDict, deprecated
|
||||
from octoprint.util import DefaultOrderedDict, deprecated, yaml
|
||||
from octoprint.util.json import JsonEncoding
|
||||
from octoprint.util.net import is_lan_address
|
||||
|
||||
@@ -1008,13 +1008,10 @@ class PreemptiveCache:
|
||||
return all_data
|
||||
|
||||
def get_all_data(self):
|
||||
import yaml
|
||||
|
||||
cache_data = None
|
||||
with self._lock:
|
||||
try:
|
||||
with open(self.cachefile) as f:
|
||||
cache_data = yaml.safe_load(f)
|
||||
cache_data = yaml.load_from_file(path=self.cachefile)
|
||||
except OSError as e:
|
||||
import errno
|
||||
|
||||
@@ -1037,20 +1034,12 @@ class PreemptiveCache:
|
||||
return cache_data.get(root, list())
|
||||
|
||||
def set_all_data(self, data):
|
||||
import yaml
|
||||
|
||||
from octoprint.util import atomic_write
|
||||
|
||||
with self._lock:
|
||||
try:
|
||||
with atomic_write(self.cachefile, "wt", max_permissions=0o666) as handle:
|
||||
yaml.safe_dump(
|
||||
data,
|
||||
handle,
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
)
|
||||
yaml.save_to_file(data, file=handle, pretty=True)
|
||||
except Exception:
|
||||
self._logger.exception(f"Error while writing {self.cachefile}")
|
||||
|
||||
|
||||
+30
-41
@@ -20,7 +20,6 @@ __author__ = "Gina Häußge <osd@foosel.net>"
|
||||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
|
||||
import copy
|
||||
import fnmatch
|
||||
import logging
|
||||
import os
|
||||
@@ -30,10 +29,17 @@ import time
|
||||
from collections import ChainMap
|
||||
from collections.abc import KeysView
|
||||
|
||||
import yaml
|
||||
import yaml.parser
|
||||
# noinspection PyCompatibilitys
|
||||
from yaml import YAMLError
|
||||
|
||||
from octoprint.util import CaseInsensitiveSet, atomic_write, dict_merge, is_hidden_path
|
||||
from octoprint.util import (
|
||||
CaseInsensitiveSet,
|
||||
atomic_write,
|
||||
dict_merge,
|
||||
fast_deepcopy,
|
||||
is_hidden_path,
|
||||
yaml,
|
||||
)
|
||||
|
||||
_APPNAME = "OctoPrint"
|
||||
|
||||
@@ -225,6 +231,7 @@ default_settings = {
|
||||
"stream": None,
|
||||
"streamRatio": "16:9",
|
||||
"streamTimeout": 5,
|
||||
"streamWebrtcIceServers": ["stun:stun.l.google.com:19302"],
|
||||
"snapshot": None,
|
||||
"snapshotTimeout": 5,
|
||||
"snapshotSslValidation": True,
|
||||
@@ -518,17 +525,16 @@ class DuplicateFolderPaths(InvalidSettings):
|
||||
|
||||
|
||||
class HierarchicalChainMap(ChainMap):
|
||||
def deep_dict(self, root=None):
|
||||
if root is None:
|
||||
root = self
|
||||
def deep_dict(self):
|
||||
def deep_dict_inner(root):
|
||||
return {
|
||||
key: deep_dict_inner(self.__class__._get_next(key, root))
|
||||
if isinstance(value, dict)
|
||||
else value
|
||||
for key, value in root.items()
|
||||
}
|
||||
|
||||
result = {}
|
||||
for key, value in root.items():
|
||||
if isinstance(value, dict):
|
||||
result[key] = self.deep_dict(root=self.__class__._get_next(key, root))
|
||||
else:
|
||||
result[key] = value
|
||||
return result
|
||||
return deep_dict_inner(self)
|
||||
|
||||
def has_path(self, path, only_local=False, only_defaults=False):
|
||||
if only_defaults:
|
||||
@@ -927,9 +933,7 @@ class Settings:
|
||||
|
||||
@property
|
||||
def effective_yaml(self):
|
||||
import yaml
|
||||
|
||||
return yaml.safe_dump(self.effective)
|
||||
return yaml.dump(self.effective)
|
||||
|
||||
@property
|
||||
def effective_hash(self):
|
||||
@@ -945,9 +949,7 @@ class Settings:
|
||||
|
||||
@property
|
||||
def config_yaml(self):
|
||||
import yaml
|
||||
|
||||
return yaml.safe_dump(self._config)
|
||||
return yaml.dump(self._config)
|
||||
|
||||
@property
|
||||
def config_hash(self):
|
||||
@@ -999,10 +1001,10 @@ class Settings:
|
||||
if os.path.exists(self._configfile) and os.path.isfile(self._configfile):
|
||||
with open(self._configfile, encoding="utf-8", errors="replace") as f:
|
||||
try:
|
||||
self._config = yaml.safe_load(f)
|
||||
self._config = yaml.load_from_file(file=f)
|
||||
self._mtime = self.last_modified
|
||||
|
||||
except yaml.YAMLError as e:
|
||||
except YAMLError as e:
|
||||
details = str(e)
|
||||
|
||||
if hasattr(e, "problem_mark"):
|
||||
@@ -1066,8 +1068,7 @@ class Settings:
|
||||
|
||||
if isinstance(overlay, str):
|
||||
if os.path.exists(overlay) and os.path.isfile(overlay):
|
||||
with open(overlay, encoding="utf-8", errors="replace") as f:
|
||||
config = yaml.safe_load(f)
|
||||
config = yaml.load_from_file(path=overlay)
|
||||
elif isinstance(overlay, dict):
|
||||
config = overlay
|
||||
else:
|
||||
@@ -1088,7 +1089,7 @@ class Settings:
|
||||
assert isinstance(overlay, dict)
|
||||
|
||||
if key is None:
|
||||
overlay_yaml = yaml.safe_dump(overlay)
|
||||
overlay_yaml = yaml.dump(overlay)
|
||||
import hashlib
|
||||
|
||||
hash = hashlib.md5()
|
||||
@@ -1657,13 +1658,7 @@ class Settings:
|
||||
permissions=0o600,
|
||||
max_permissions=0o666,
|
||||
) as configFile:
|
||||
yaml.safe_dump(
|
||||
self._config,
|
||||
configFile,
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
)
|
||||
yaml.save_to_file(self._config, file=configFile)
|
||||
self._dirty = False
|
||||
except Exception:
|
||||
self._logger.exception("Error while saving config.yaml!")
|
||||
@@ -1759,19 +1754,13 @@ class Settings:
|
||||
except KeyError:
|
||||
raise NoSuchSettingsPath()
|
||||
|
||||
if preprocessors is not None:
|
||||
try:
|
||||
preprocessor = self._get_by_path(path, preprocessors)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if callable(preprocessor):
|
||||
value = preprocessor(value)
|
||||
if callable(preprocessor):
|
||||
value = preprocessor(value)
|
||||
|
||||
if do_copy:
|
||||
if isinstance(value, KeysView):
|
||||
value = list(value)
|
||||
value = copy.deepcopy(value)
|
||||
value = fast_deepcopy(value)
|
||||
|
||||
if asdict:
|
||||
results[key] = value
|
||||
|
||||
@@ -1543,6 +1543,10 @@ var copyToClipboard = function (text) {
|
||||
|
||||
var determineWebcamStreamType = function (streamUrl) {
|
||||
if (streamUrl) {
|
||||
if (streamUrl.startsWith("webrtc")) {
|
||||
return "webrtc";
|
||||
}
|
||||
|
||||
var lastDotPosition = streamUrl.lastIndexOf(".");
|
||||
var firstQuotationSignPosition = streamUrl.indexOf("?");
|
||||
if (
|
||||
@@ -1619,3 +1623,82 @@ var deepMerge = function (target, source) {
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
var isWebRTCAvailable = function () {
|
||||
return (
|
||||
typeof RTCPeerConnection == "function" &&
|
||||
typeof RTCPeerConnection.prototype.addEventListener == "function" &&
|
||||
typeof RTCPeerConnection.prototype.addTransceiver == "function" &&
|
||||
typeof RTCPeerConnection.prototype.createOffer == "function" &&
|
||||
typeof RTCPeerConnection.prototype.setLocalDescription == "function" &&
|
||||
typeof RTCPeerConnection.prototype.removeEventListener == "function" &&
|
||||
typeof RTCPeerConnection.prototype.addEventListener == "function" &&
|
||||
typeof RTCPeerConnection.prototype.setRemoteDescription == "function"
|
||||
);
|
||||
};
|
||||
|
||||
var negotiateWebRTC = function (streamUrl) {
|
||||
pc.addTransceiver("video", {direction: "recvonly"});
|
||||
pc.addTransceiver("audio", {direction: "recvonly"});
|
||||
return pc
|
||||
.createOffer()
|
||||
.then(function (offer) {
|
||||
return pc.setLocalDescription(offer);
|
||||
})
|
||||
.then(function () {
|
||||
// Wait for ICE gathering to complete
|
||||
return new Promise(function (resolve) {
|
||||
if (pc.iceGatheringState === "complete") {
|
||||
resolve();
|
||||
} else {
|
||||
function checkState() {
|
||||
if (pc.iceGatheringState === "complete") {
|
||||
pc.removeEventListener("icegatheringstatechange", checkState);
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
pc.addEventListener("icegatheringstatechange", checkState);
|
||||
}
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
var offer = pc.localDescription;
|
||||
// webrtc://host.com becomes http://host.com
|
||||
// webrtcs://host.com becomes https://host.com
|
||||
streamUrl = "http" + streamUrl.slice("webrtc".length);
|
||||
return $.ajax({
|
||||
url: streamUrl,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({
|
||||
sdp: offer.sdp,
|
||||
type: offer.type
|
||||
}),
|
||||
contentType: "application/json; charset=UTF-8"
|
||||
});
|
||||
})
|
||||
.then(function (response) {
|
||||
return pc.setRemoteDescription(response);
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.error(e);
|
||||
});
|
||||
};
|
||||
|
||||
var startWebRTC = function (videoElement, streamUrl, iceServers) {
|
||||
var config = {
|
||||
sdpSemantics: "unified-plan"
|
||||
};
|
||||
if (iceServers) {
|
||||
config.iceServers = [{urls: iceServers}];
|
||||
}
|
||||
pc = new RTCPeerConnection(config);
|
||||
pc.addEventListener("track", function (evt) {
|
||||
if (evt.track.kind == "video") {
|
||||
videoElement.srcObject = evt.streams[0];
|
||||
}
|
||||
});
|
||||
|
||||
negotiateWebRTC(streamUrl);
|
||||
return pc;
|
||||
};
|
||||
@@ -41,7 +41,9 @@ $(function () {
|
||||
self.webcamLoaded = ko.observable(false);
|
||||
self.webcamMjpgEnabled = ko.observable(false);
|
||||
self.webcamHlsEnabled = ko.observable(false);
|
||||
self.webcamWebRTCEnabled = ko.observable(false);
|
||||
self.webcamError = ko.observable(false);
|
||||
self.webRTCPeerConnection = null;
|
||||
|
||||
self.keycontrolActive = ko.observable(false);
|
||||
self.keycontrolHelpActive = ko.observable(false);
|
||||
@@ -524,6 +526,8 @@ $(function () {
|
||||
self._switchToMjpgWebcam();
|
||||
} else if (streamType == "hls") {
|
||||
self._switchToHlsWebcam();
|
||||
} else if (isWebRTCAvailable() && streamType == "webrtc") {
|
||||
self._switchToWebRTCWebcam();
|
||||
} else {
|
||||
throw "Unknown stream type " + streamType;
|
||||
}
|
||||
@@ -708,6 +712,7 @@ $(function () {
|
||||
|
||||
self.webcamHlsEnabled(false);
|
||||
self.webcamMjpgEnabled(true);
|
||||
self.webcamWebRTCEnabled(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -729,6 +734,36 @@ $(function () {
|
||||
|
||||
self.webcamMjpgEnabled(false);
|
||||
self.webcamHlsEnabled(true);
|
||||
self.webcamWebRTCEnabled(false);
|
||||
};
|
||||
|
||||
self._switchToWebRTCWebcam = function () {
|
||||
if (!isWebRTCAvailable()) {
|
||||
return;
|
||||
}
|
||||
var video = document.getElementById("webcam_webrtc");
|
||||
|
||||
// Close any existing, disconnected connection
|
||||
if (
|
||||
self.webRTCPeerConnection != null &&
|
||||
self.webRTCPeerConnection.connectionState != "connected"
|
||||
) {
|
||||
self.webRTCPeerConnection.close();
|
||||
self.webRTCPeerConnection = null;
|
||||
}
|
||||
|
||||
// Open a new connection if necessary
|
||||
if (self.webRTCPeerConnection == null) {
|
||||
self.webRTCPeerConnection = startWebRTC(
|
||||
video,
|
||||
self.settings.webcam_streamUrl(),
|
||||
self.settings.webcam_streamWebrtcIceServers()
|
||||
);
|
||||
}
|
||||
|
||||
self.webcamMjpgEnabled(false);
|
||||
self.webcamHlsEnabled(false);
|
||||
self.webcamWebRTCEnabled(true);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ $(function () {
|
||||
self.webcam_streamUrl = ko.observable(undefined);
|
||||
self.webcam_streamRatio = ko.observable(undefined);
|
||||
self.webcam_streamTimeout = ko.observable(undefined);
|
||||
self.webcam_streamWebrtcIceServers = ko.observable(undefined);
|
||||
self.webcam_snapshotUrl = ko.observable(undefined);
|
||||
self.webcam_snapshotTimeout = ko.observable(undefined);
|
||||
self.webcam_snapshotSslValidation = ko.observable(undefined);
|
||||
@@ -439,6 +440,7 @@ $(function () {
|
||||
);
|
||||
var streamType = determineWebcamStreamType(self.webcam_streamUrl());
|
||||
var webcam_element;
|
||||
var webrtc_peer_connection;
|
||||
if (streamType == "mjpg") {
|
||||
webcam_element = $('<img src="' + self.webcam_streamUrl() + '">');
|
||||
} else if (streamType == "hls") {
|
||||
@@ -453,6 +455,17 @@ $(function () {
|
||||
hls.loadSource(self.webcam_streamUrl());
|
||||
hls.attachMedia(video_element);
|
||||
}
|
||||
} else if (isWebRTCAvailable() && streamType == "webrtc") {
|
||||
webcam_element = $(
|
||||
'<video id="webcam_webrtc" muted autoplay playsinline controls style="width: 100%"/>'
|
||||
);
|
||||
video_element = webcam_element[0];
|
||||
|
||||
webrtc_peer_connection = startWebRTC(
|
||||
video_element,
|
||||
self.webcam_streamUrl(),
|
||||
self.webcam_streamWebrtcIceServers()
|
||||
);
|
||||
} else {
|
||||
throw "Unknown stream type " + streamType;
|
||||
}
|
||||
@@ -468,6 +481,10 @@ $(function () {
|
||||
message: message,
|
||||
onclose: function () {
|
||||
self.testWebcamStreamUrlBusy(false);
|
||||
if (webrtc_peer_connection != null) {
|
||||
webrtc_peer_connection.close();
|
||||
webrtc_peer_connection = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1147,6 +1164,15 @@ $(function () {
|
||||
});
|
||||
return result;
|
||||
}
|
||||
},
|
||||
webcam: {
|
||||
streamWebrtcIceServers: function () {
|
||||
return splitTextToArray(
|
||||
self.webcam_streamWebrtcIceServers(),
|
||||
",",
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1307,6 +1333,11 @@ $(function () {
|
||||
profiles: function (value) {
|
||||
self.temperature_profiles($.extend(true, [], value));
|
||||
}
|
||||
},
|
||||
webcam: {
|
||||
streamWebrtcIceServers: function (value) {
|
||||
self.webcam_streamWebrtcIceServers(value.join(", "));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ $(function () {
|
||||
display = "line";
|
||||
}
|
||||
|
||||
if (type === undefined) {
|
||||
if (type === undefined || typeof type != "string") {
|
||||
if (line.startsWith("Recv:")) {
|
||||
type = "recv";
|
||||
} else if (line.startsWith("Send:")) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<div class="hide">
|
||||
{% include "snippets/settings/webcam/webcamStreamTimeout.jinja2" %}
|
||||
{% include "snippets/settings/webcam/webcamCacheBuster.jinja2" %}
|
||||
{% include "snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2" %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<form class="form-signin">
|
||||
<h2 class="form-signin-heading" data-test-id="login-title">{{ _('Please log in') }}</h2>
|
||||
|
||||
<div id="login-error" class="alert alert-error" data-test-id="login-error">{{ _('Incorrect username or password.') }}</div>
|
||||
<div id="login-error" class="alert alert-error" data-test-id="login-error">{{ _('Incorrect username or password. Hint: Both are case sensitive!') }}</div>
|
||||
<div id="login-offline" class="alert alert-error">{{ _('Server is currently offline.') }} <a id="login-reconnect" href="javascript:void(0)">{{ _('Reconnect...') }}</a></div>
|
||||
|
||||
{% if logged_in %}<p>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="control-group" title="{{ _('ICE server (STUN and/or TURN) to use for WebRTC')|edq }}">
|
||||
<label class="control-label" for="settings-webcamStreamWebrtcIceServers">{{ _('WebRTC ICE endpoint') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_streamWebrtcIceServers, valueUpdate: 'afterkeydown'" id="settings-webcamStreamWebrtcIceServers">
|
||||
<span class="help-block"><span class="label">{{ _('WebRTC') }}</span> {% trans %}Only used for WebRTC streams. Optionally specify the ICE server(s) (STUN and/or TURN) to use for WebRTC. Multiple servers should be separated by a comma. If unsure, leave at the default of <code>stun:stun.l.google.com:19302</code>.{% endtrans %}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +1,8 @@
|
||||
{% if enableWebcam %}
|
||||
<!-- ko if: loginState.hasPermissionKo(access.permissions.WEBCAM) -->
|
||||
<div id="webcam_webrtc_container" tabindex="0" data-bind="visible: webcamWebRTCEnabled()">
|
||||
<video id="webcam_webrtc" muted autoplay playsinline controls style="width: 100%"></video>
|
||||
</div>
|
||||
<div id="webcam_hls_container" tabindex="0" data-bind="visible: webcamHlsEnabled()">
|
||||
<video id="webcam_hls" muted autoplay style="width: 100%"></video>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
@@ -3,9 +3,9 @@
|
||||
# This file is distributed under the same license as the OctoPrint project.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint 1.7.0rc1\n"
|
||||
"Project-Id-Version: OctoPrint 1.7.0\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2021-08-04 10:58+0200\n"
|
||||
"POT-Creation-Date: 2021-10-11 10:35+0200\n"
|
||||
"PO-Revision-Date: 2021-08-04 11:01+0200\n"
|
||||
"Last-Translator: Gina Häußge <gina@octoprint.org>\n"
|
||||
"Language: de\n"
|
||||
@@ -271,7 +271,7 @@ msgstr "Nie"
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:348
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:456
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:14
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:31
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:32
|
||||
#: src/octoprint/templates/snippets/settings/server/serverPluginBlacklist.jinja2:5
|
||||
#: src/octoprint/templates/tabs/terminal.jinja2:35
|
||||
msgid "Advanced options"
|
||||
@@ -347,7 +347,7 @@ msgstr "Kanal deaktivieren"
|
||||
msgid "Enable Channel"
|
||||
msgstr "Kanal aktivieren"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:338
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:337
|
||||
msgid ""
|
||||
"You can edit your announcement subscriptions under Settings > "
|
||||
"Announcements."
|
||||
@@ -355,18 +355,18 @@ msgstr ""
|
||||
"Du kannst deine Benachrichtigungsabonnements unter Einstellungen > "
|
||||
"Benachrichtigungen konfigurieren."
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:351
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:350
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1625
|
||||
#: src/octoprint/static/js/app/viewmodels/loginstate.js:157
|
||||
msgid "Later"
|
||||
msgstr "Später"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:358
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:357
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1636
|
||||
msgid "Mark read"
|
||||
msgstr "Gelesen"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:365
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:364
|
||||
msgid "Read..."
|
||||
msgstr "Lesen..."
|
||||
|
||||
@@ -423,16 +423,16 @@ msgstr "Aktionen"
|
||||
msgid "Refresh Announcements"
|
||||
msgstr "Ankündigungen aktualisieren"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:123
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:127
|
||||
msgid "Allows administrating all application keys"
|
||||
msgstr "Erlaubt die Administration aller Applicationkeys"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:134
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:135
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:138
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:139
|
||||
msgid "Application Keys"
|
||||
msgstr "Application Keys"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:484
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:485
|
||||
msgid ""
|
||||
"Without this plugin third party clients will no longer be able to obtain "
|
||||
"an API key without you manually copy-pasting it."
|
||||
@@ -632,7 +632,7 @@ msgstr "Sicherung & Wiederherstellung"
|
||||
msgid "Restore Backup?"
|
||||
msgstr "Sicherung wiederherstellen?"
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:1414
|
||||
#: src/octoprint/plugins/backup/__init__.py:1411
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to backup & restore your "
|
||||
"OctoPrint settings and data."
|
||||
@@ -1311,7 +1311,7 @@ msgstr ""
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/groups.jinja2:60
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:70
|
||||
#: src/octoprint/templates/snippets/settings/printerprofiles/profileEditor.jinja2:9
|
||||
#: src/octoprint/templates/tabs/control.jinja2:132
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
msgid "General"
|
||||
msgstr "Allgemein"
|
||||
|
||||
@@ -1411,7 +1411,7 @@ msgstr ""
|
||||
"Server</strong> erreichbar ist.</p>"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2:33
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:22
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:23
|
||||
msgid "Timelapse Recordings"
|
||||
msgstr "Zeitrafferaufnahmen"
|
||||
|
||||
@@ -1691,7 +1691,7 @@ msgid "Filament"
|
||||
msgstr "Filament"
|
||||
|
||||
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:735
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:85
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:87
|
||||
#: src/octoprint/static/js/app/viewmodels/files.js:1013
|
||||
#: src/octoprint/static/js/app/viewmodels/printerstate.js:357
|
||||
#: src/octoprint/static/js/app/viewmodels/temperature.js:146
|
||||
@@ -1945,13 +1945,13 @@ msgstr ""
|
||||
msgid "Yes, please visualize %(name)s regardless of its size"
|
||||
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:44
|
||||
#: src/octoprint/plugins/logging/__init__.py:42
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr ""
|
||||
"Erlaubt den Download von Logdateien sowie deren Löschung und das Setzen "
|
||||
"von Loglevels."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:285
|
||||
#: src/octoprint/plugins/logging/__init__.py:278
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to retrieve OctoPrint's "
|
||||
"logs or modify the current logging levels through the web interface."
|
||||
@@ -2965,57 +2965,57 @@ msgstr "Abbruch"
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:148
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:147
|
||||
msgid "Allows to check for software updates"
|
||||
msgstr "Erlaubt das Prüfen auf Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:155
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:154
|
||||
msgid "Allows to perform software updates"
|
||||
msgstr "Erlaubt das Durchführen von Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:163
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:162
|
||||
msgid "Allows to configure software update"
|
||||
msgstr "Erlaubt das Konfigurieren von Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1172
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1153
|
||||
msgid "Python package installation folder"
|
||||
msgstr "Python-Paket-Installationsverzeichnis"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1173
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1154
|
||||
msgid "Plugin folder"
|
||||
msgstr "Pluginverzeichnis"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1174
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1155
|
||||
msgid "System temporary files"
|
||||
msgstr "Temporäre Dateien"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1206
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1187
|
||||
#: src/octoprint/templates/footer.jinja2:4
|
||||
msgid "Python"
|
||||
msgstr "Python"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1213
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2292
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1194
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2273
|
||||
msgid "pip"
|
||||
msgstr "pip"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1220
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1201
|
||||
msgid "setuptools"
|
||||
msgstr "setuptools"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1451
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1468
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1432
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1449
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_settings.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr "Software Update"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1458
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1439
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_update.jinja2:1
|
||||
#, fuzzy
|
||||
msgid "Update?"
|
||||
msgstr "Aktualisieren"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2230
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2211
|
||||
#: src/octoprint/server/views.py:1048
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:110
|
||||
@@ -3027,7 +3027,7 @@ msgstr "Aktualisieren"
|
||||
msgid "OctoPrint"
|
||||
msgstr "OctoPrint"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2454
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2435
|
||||
msgid ""
|
||||
"Without this plugin OctoPrint will no longer be able to update itself or "
|
||||
"any of your installed plugins which might put your system at risk."
|
||||
@@ -4587,7 +4587,7 @@ msgstr "Bist Du sicher, dass du die Verbindung zum Drucker trennen willst?"
|
||||
msgid "Stay Connected"
|
||||
msgstr "Verbunden bleiben"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:91
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:93
|
||||
msgid "Hotend"
|
||||
msgstr "Hotend"
|
||||
|
||||
@@ -5124,23 +5124,23 @@ msgstr "Weiß"
|
||||
msgid "Autodetect from browser"
|
||||
msgstr "Automatisch vom Browser erkennen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:437
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:438
|
||||
msgid "If you see your webcam stream below, the entered stream URL is ok."
|
||||
msgstr "Falls du unten den Webcamstream sehen kannst, ist die Stream-URL ok."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:467
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:480
|
||||
msgid "Stream test"
|
||||
msgstr "Stream Test"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:485
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:502
|
||||
msgid "Could not retrieve snapshot URL, please double check the URL"
|
||||
msgstr "Konnte die Snapshot-URL nicht abgreifen, bitte prüfen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:488
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:505
|
||||
msgid "Snapshot test failed"
|
||||
msgstr "Snapshot Test fehlgeschlagen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:508
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:525
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Could retrieve the snapshot URL, but it didn't look like an image. Got "
|
||||
@@ -5152,66 +5152,66 @@ msgstr ""
|
||||
"aus: <code>%(content_type)s</code>. Bitte überprüfe, dass die URL "
|
||||
"einzelne Bilder zurückliefert, nicht multipart Daten oder Videos."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:537
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:554
|
||||
msgid ""
|
||||
"If you see your webcam snapshot picture below, the entered snapshot URL "
|
||||
"is ok."
|
||||
msgstr "Falls du unten dein Snapshotbild sehen kannst, ist die Snapshot-URL ok."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:541
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:558
|
||||
msgid "Snapshot test"
|
||||
msgstr "Snapshot Test"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:583
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:600
|
||||
msgid "The path doesn't exist"
|
||||
msgstr "Der Pfad existiert nicht"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:585
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:602
|
||||
msgid "The path is not a file"
|
||||
msgstr "Der Pfad ist keine Datei"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:588
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:605
|
||||
msgid "The path is not an executable"
|
||||
msgstr "Der Pfad ist nicht ausführbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:592
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:693
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:609
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:710
|
||||
msgid "The path is valid"
|
||||
msgstr "Der Pfad ist valide"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:617
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:634
|
||||
msgid "The server is not reachable"
|
||||
msgstr "Der Server ist nicht erreichbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:620
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:637
|
||||
msgid "The server is reachable"
|
||||
msgstr "Der Server ist erreichbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:641
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:658
|
||||
msgid "Name cannot be resolved"
|
||||
msgstr "Name kann nicht aufgelöst werden"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:645
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:662
|
||||
msgid "Name can be resolved"
|
||||
msgstr "Name kann aufgelöst werden"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:677
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:694
|
||||
msgid "The path is a broken symlink."
|
||||
msgstr "Der Pfad ist ein kaputter Symlink."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:681
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:698
|
||||
msgid "The path does not exist and cannot be created."
|
||||
msgstr "Der Pfad existiert nicht und kann nicht erstellt werden."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:685
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:702
|
||||
msgid "The path is not a folder."
|
||||
msgstr "Der Pfad ist kein Verzeichnis."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:689
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:706
|
||||
msgid "The path is not writable."
|
||||
msgstr "Der Pfad ist nicht beschreibbar."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:830
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:847
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:122
|
||||
msgid ""
|
||||
"This will generate a new API Key. The old API Key will cease to function "
|
||||
@@ -5593,7 +5593,8 @@ msgid "Please log in"
|
||||
msgstr "Bitte einloggen"
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:46
|
||||
msgid "Incorrect username or password."
|
||||
#, fuzzy
|
||||
msgid "Incorrect username or password. Hint: Both are case sensitive!"
|
||||
msgstr "Username oder Passwort inkorrekt."
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:47
|
||||
@@ -8551,15 +8552,35 @@ msgstr ""
|
||||
"Muss vom Browser erreichbar sein, in dem die OctoPrint UI angezeigt wird,"
|
||||
" wird genutzt, um den Webcam Stream in die Seite einzubetten."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:9
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:1
|
||||
msgid "ICE server (STUN and/or TURN) to use for WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:2
|
||||
msgid "WebRTC ICE endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid "WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid ""
|
||||
"Only used for WebRTC streams. Optionally specify the ICE server(s) (STUN "
|
||||
"and/or TURN) to use for WebRTC. Multiple servers should be separated by a"
|
||||
" comma. If unsure, leave at the default of "
|
||||
"<code>stun:stun.l.google.com:19302</code>."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:12
|
||||
msgid "Webcam stream loading..."
|
||||
msgstr "Webcamstream lädt..."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:12
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
msgid "Webcam stream not loaded"
|
||||
msgstr "Webcamstream nicht geladen"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:13
|
||||
#: src/octoprint/templates/tabs/control.jinja2:16
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. To have "
|
||||
"this fixed, get in touch with an administrator of this OctoPrint "
|
||||
@@ -8569,7 +8590,7 @@ msgstr ""
|
||||
"benötigt. Um dies zu beheben wende dich bitte an einen Administrator "
|
||||
"dieser OctoPrint Instanz."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:14
|
||||
#: src/octoprint/templates/tabs/control.jinja2:17
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. You can "
|
||||
"change the URL of the stream under \"Settings\" > \"Webcam & Timelapse\" "
|
||||
@@ -8581,63 +8602,63 @@ msgstr ""
|
||||
"\"Webcam & Zeitraffer\" > \"Webcam\" > \"Stream-URL\" ändern. Falls du "
|
||||
"keine Webcam hast kannst du Webcam-Unterstützung dort auch deaktivieren."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
#: src/octoprint/templates/tabs/control.jinja2:18
|
||||
msgid "Currently configured stream URL"
|
||||
msgstr "Aktuell konfigurierte Stream-URL"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:26
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
msgid "Keyboard controls active"
|
||||
msgstr "Tastatursteuerung aktiv"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
#: src/octoprint/templates/tabs/control.jinja2:32
|
||||
msgid "X Axis"
|
||||
msgstr "X-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:30
|
||||
#: src/octoprint/templates/tabs/control.jinja2:33
|
||||
msgid "Y Axis"
|
||||
msgstr "Y-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↑"
|
||||
msgstr "Bild↑"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↓"
|
||||
msgstr "Bild↓"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Z Axis"
|
||||
msgstr "Z-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
#: src/octoprint/templates/tabs/control.jinja2:37
|
||||
msgid "Home X/Y"
|
||||
msgstr "Home X/Y"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:35
|
||||
#: src/octoprint/templates/tabs/control.jinja2:38
|
||||
msgid "Home Z"
|
||||
msgstr "Home Z"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:36
|
||||
#: src/octoprint/templates/tabs/control.jinja2:39
|
||||
msgid "Stepsize"
|
||||
msgstr "Schrittgröße"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:42
|
||||
#: src/octoprint/templates/tabs/control.jinja2:45
|
||||
msgid ""
|
||||
"Hint: If you move your mouse over the picture, you enter keyboard control"
|
||||
" mode."
|
||||
msgstr "Hinweis: Bewegen der Maus über das Bild aktiviert die Tastatursteuerung."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid "Feed rate modifier:"
|
||||
msgstr "Feedrate-Modifier:"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Please note!"
|
||||
msgstr "Bitte beachten!"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid ""
|
||||
"The feed rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
@@ -8648,19 +8669,19 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:104
|
||||
#: src/octoprint/templates/tabs/control.jinja2:107
|
||||
msgid "Extrude"
|
||||
msgstr "Extrude"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:105
|
||||
#: src/octoprint/templates/tabs/control.jinja2:108
|
||||
msgid "Retract"
|
||||
msgstr "Retract"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:109
|
||||
#: src/octoprint/templates/tabs/control.jinja2:112
|
||||
msgid "Switch Tool..."
|
||||
msgstr "Werkzeugwechsel..."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
msgid ""
|
||||
"The selected tool can only be set, it cannot be read back from the "
|
||||
"firmware due to a limitation of the communication protocol. There is no "
|
||||
@@ -8671,11 +8692,11 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Flow rate modifier:"
|
||||
msgstr "Flowrate-Modifier:"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid ""
|
||||
"The flow rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
@@ -8686,15 +8707,15 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:134
|
||||
#: src/octoprint/templates/tabs/control.jinja2:137
|
||||
msgid "Motors off"
|
||||
msgstr "Motoren aus"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
#: src/octoprint/templates/tabs/control.jinja2:138
|
||||
msgid "Fan on"
|
||||
msgstr "Lüfter an"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:136
|
||||
#: src/octoprint/templates/tabs/control.jinja2:139
|
||||
msgid "Fan off"
|
||||
msgstr "Lüfter aus"
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@ OctoPrint's source code.
|
||||
__author__ = "Gina Häußge <osd@foosel.net>"
|
||||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||
|
||||
import codecs
|
||||
import collections
|
||||
import contextlib
|
||||
import copy
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import pickle # Python 3
|
||||
import queue
|
||||
import re
|
||||
import shutil
|
||||
@@ -521,6 +523,18 @@ def is_running_from_source():
|
||||
)
|
||||
|
||||
|
||||
def fast_deepcopy(obj):
|
||||
# the best way to implement this would be as a C module, that way we'd be able to use
|
||||
# the fast path every time.
|
||||
try:
|
||||
# implemented in C and much faster than deepcopy:
|
||||
# https://stackoverflow.com/a/29385667
|
||||
return pickle.loads(pickle.dumps(obj, pickle.HIGHEST_PROTOCOL))
|
||||
except (AttributeError, pickle.PicklingError):
|
||||
# fall back when something unpickable is found
|
||||
return copy.deepcopy(obj)
|
||||
|
||||
|
||||
def dict_merge(a, b, leaf_merger=None, in_place=False):
|
||||
"""
|
||||
Recursively deep-merges two dictionaries.
|
||||
@@ -569,8 +583,6 @@ def dict_merge(a, b, leaf_merger=None, in_place=False):
|
||||
dict: ``b`` deep-merged into ``a``
|
||||
"""
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
if a is None:
|
||||
a = {}
|
||||
if b is None:
|
||||
@@ -582,7 +594,7 @@ def dict_merge(a, b, leaf_merger=None, in_place=False):
|
||||
if in_place:
|
||||
result = a
|
||||
else:
|
||||
result = deepcopy(a)
|
||||
result = fast_deepcopy(a)
|
||||
|
||||
for k, v in b.items():
|
||||
if k in result and isinstance(result[k], dict):
|
||||
@@ -599,7 +611,7 @@ def dict_merge(a, b, leaf_merger=None, in_place=False):
|
||||
pass
|
||||
|
||||
if merged is None:
|
||||
merged = deepcopy(v)
|
||||
merged = fast_deepcopy(v)
|
||||
|
||||
result[k] = merged
|
||||
return result
|
||||
@@ -1060,7 +1072,9 @@ else:
|
||||
self.cleanup()
|
||||
|
||||
|
||||
@deprecated("Please use io.open with '-sig' encoding instead", since="1.8.0")
|
||||
def bom_aware_open(filename, encoding="ascii", mode="r", **kwargs):
|
||||
# TODO Remove in 2.0.0
|
||||
import codecs
|
||||
|
||||
assert "b" not in mode, "binary mode not support by bom_aware_open"
|
||||
@@ -1085,6 +1099,35 @@ def bom_aware_open(filename, encoding="ascii", mode="r", **kwargs):
|
||||
return open(filename, encoding=encoding, mode=mode, **kwargs)
|
||||
|
||||
|
||||
BOMS = {
|
||||
"utf-8-sig": codecs.BOM_UTF8,
|
||||
"utf-16-le": codecs.BOM_UTF16_LE,
|
||||
"utf-16-be": codecs.BOM_UTF16_BE,
|
||||
"utf-32-le": codecs.BOM_UTF32_LE,
|
||||
"utf-32-be": codecs.BOM_UTF32_BE,
|
||||
}
|
||||
|
||||
|
||||
def get_bom(filename, encoding):
|
||||
"""
|
||||
Check if the file has a BOM and if so return it.
|
||||
|
||||
Params:
|
||||
filename (str): The file to check.
|
||||
encoding (str): The encoding to check for.
|
||||
|
||||
Returns:
|
||||
(bytes) the BOM or None if there is no BOM.
|
||||
"""
|
||||
with open(filename, mode="rb") as f:
|
||||
header = f.read(4)
|
||||
|
||||
for enc, bom in BOMS.items():
|
||||
if header.startswith(bom) and encoding.lower() == enc:
|
||||
return bom
|
||||
return None
|
||||
|
||||
|
||||
def is_hidden_path(path):
|
||||
if path is None:
|
||||
# we define a None path as not hidden here
|
||||
|
||||
@@ -34,10 +34,10 @@ from octoprint.util import (
|
||||
ResettableTimer,
|
||||
TypeAlreadyInQueue,
|
||||
TypedQueue,
|
||||
bom_aware_open,
|
||||
chunks,
|
||||
filter_non_ascii,
|
||||
filter_non_utf8,
|
||||
get_bom,
|
||||
get_exception_string,
|
||||
sanitize_ascii,
|
||||
to_unicode,
|
||||
@@ -5618,18 +5618,17 @@ class PrintingGcodeFileInformation(PrintingFileInformation):
|
||||
"""
|
||||
PrintingFileInformation.start(self)
|
||||
with self._handle_mutex:
|
||||
self._handle = bom_aware_open(
|
||||
self._filename, encoding="utf-8", errors="replace", newline=""
|
||||
bom = get_bom(self._filename, encoding="utf-8-sig")
|
||||
self._handle = open(
|
||||
self._filename, encoding="utf-8-sig", errors="replace", newline=""
|
||||
)
|
||||
self._pos = self._handle.tell()
|
||||
if self._handle.encoding.endswith("-sig"):
|
||||
if bom:
|
||||
# Apparently we found an utf-8 bom in the file.
|
||||
# We need to add its length to our pos because it will
|
||||
# be stripped transparently and we'll have no chance
|
||||
# catching that.
|
||||
import codecs
|
||||
|
||||
self._pos += len(codecs.BOM_UTF8)
|
||||
self._pos += len(bom)
|
||||
self._read_lines = 0
|
||||
|
||||
def close(self):
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
import io
|
||||
|
||||
from octoprint.util import bom_aware_open
|
||||
|
||||
|
||||
def load_from_file(file=None, path=None):
|
||||
"""
|
||||
Safely and performantly loads yaml data from the given source. Either a
|
||||
path or a file must be passed in.
|
||||
|
||||
:rtype: Union[dict[Hashable, Any], list, None]
|
||||
:type path: str | None
|
||||
:type file: typing.TextIO | None
|
||||
"""
|
||||
if path is not None:
|
||||
assert file is None
|
||||
with bom_aware_open(path, mode="rt", encoding="utf-8") as f:
|
||||
return load_from_file(file=f)
|
||||
|
||||
if file is not None:
|
||||
assert path is None
|
||||
|
||||
assert path is not None or file is not None, "this function requires an input file"
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
from yaml import CSafeLoader as SafeLoader
|
||||
except ImportError:
|
||||
from yaml import SafeLoader
|
||||
|
||||
return yaml.load(file, Loader=SafeLoader)
|
||||
|
||||
|
||||
def _save_to_file_base(data, file=None, path=None, pretty=False, **kwargs):
|
||||
if path is not None:
|
||||
assert file is None
|
||||
with io.open(path, "wt", encoding="utf-8") as f:
|
||||
return _save_to_file_base(data, file=f, pretty=pretty, **kwargs)
|
||||
|
||||
if file is not None:
|
||||
assert path is None
|
||||
|
||||
import yaml
|
||||
|
||||
try:
|
||||
from yaml import CSafeDumper as SafeDumper
|
||||
except ImportError:
|
||||
from yaml import SafeDumper
|
||||
|
||||
if pretty:
|
||||
# make each element go on a new line and indent by 2
|
||||
kwargs.update(default_flow_style=False, indent=2)
|
||||
|
||||
return yaml.dump(
|
||||
data,
|
||||
stream=file,
|
||||
Dumper=SafeDumper,
|
||||
allow_unicode=True, # no good reason not to allow it these days
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
||||
def save_to_file(data, file=None, path=None, pretty=False, **kwargs):
|
||||
"""
|
||||
Safely and performantly dumps the `data` to yaml.
|
||||
|
||||
To dump to a string, use `yaml.dump()`.
|
||||
|
||||
:type data: object
|
||||
:param data: the data to be serialized
|
||||
:type file: typing.TextIO | None
|
||||
:type path: str | None
|
||||
:type pretty: bool
|
||||
:param pretty: formats the output yaml into a more human-friendly format
|
||||
"""
|
||||
assert file is not None or path is not None, "this function requires an output file"
|
||||
_save_to_file_base(data, file=file, path=path, pretty=pretty, **kwargs)
|
||||
|
||||
|
||||
def dump(data, pretty=False, **kwargs):
|
||||
"""
|
||||
Safely and performantly dumps the `data` to a yaml string.
|
||||
|
||||
:param data: the data to be serialized
|
||||
:param pretty: formats the output yaml into a more human-friendly format
|
||||
:param kwargs: any other args to be passed to the internal yaml.dump() call.
|
||||
:return: yaml-serialized data
|
||||
:rtype: str
|
||||
"""
|
||||
return _save_to_file_base(data, file=None, pretty=pretty, **kwargs)
|
||||
@@ -377,9 +377,11 @@ class FileManagerTest(unittest.TestCase):
|
||||
)
|
||||
|
||||
@mock.patch("octoprint.util.atomic_write", create=True)
|
||||
@mock.patch("yaml.safe_dump", create=True)
|
||||
@mock.patch("octoprint.util.yaml.save_to_file", create=True)
|
||||
@mock.patch("time.time")
|
||||
def test_save_recovery_data(self, mock_time, mock_yaml_safe_dump, mock_atomic_write):
|
||||
def test_save_recovery_data(
|
||||
self, mock_time, mock_yaml_save_to_file, mock_atomic_write
|
||||
):
|
||||
import os
|
||||
|
||||
now = 123456789
|
||||
@@ -406,16 +408,14 @@ class FileManagerTest(unittest.TestCase):
|
||||
"date": now,
|
||||
}
|
||||
|
||||
mock_yaml_safe_dump.assert_called_with(
|
||||
mock_yaml_save_to_file.assert_called_with(
|
||||
expected,
|
||||
stream=mock_atomic_write_handle,
|
||||
default_flow_style=False,
|
||||
indent=2,
|
||||
allow_unicode=True,
|
||||
file=mock_atomic_write_handle,
|
||||
pretty=True,
|
||||
)
|
||||
|
||||
@mock.patch("octoprint.util.atomic_write", create=True)
|
||||
@mock.patch("yaml.safe_dump", create=True)
|
||||
@mock.patch("octoprint.util.yaml.save_to_file", create=True)
|
||||
@mock.patch("time.time")
|
||||
def test_save_recovery_data_with_error(
|
||||
self, mock_time, mock_yaml_safe_dump, mock_atomic_write
|
||||
@@ -466,8 +466,6 @@ class FileManagerTest(unittest.TestCase):
|
||||
def test_get_recovery_data(self, mock_isfile):
|
||||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
recovery_file = os.path.join("/path/to/a/base_folder", "print_recovery_data.yaml")
|
||||
|
||||
data = {
|
||||
@@ -476,16 +474,14 @@ class FileManagerTest(unittest.TestCase):
|
||||
"pos": 1234,
|
||||
"date": 123456789,
|
||||
}
|
||||
text_data = yaml.dump(data)
|
||||
|
||||
with mock.patch("builtins.open", mock.mock_open(read_data=text_data)) as m:
|
||||
# moved safe_load to here so we could mock up the return value properly
|
||||
with mock.patch("yaml.safe_load", return_value=data) as n:
|
||||
result = self.file_manager.get_recovery_data()
|
||||
# moved safe_load to here so we could mock up the return value properly
|
||||
with mock.patch("octoprint.util.yaml.load_from_file", return_value=data) as n:
|
||||
result = self.file_manager.get_recovery_data()
|
||||
|
||||
self.assertDictEqual(data, result)
|
||||
n.assert_called_with(m())
|
||||
mock_isfile.assert_called_with(recovery_file)
|
||||
self.assertDictEqual(data, result)
|
||||
n.assert_called_with(path=recovery_file)
|
||||
mock_isfile.assert_called_with(recovery_file)
|
||||
|
||||
@mock.patch("os.path.isfile")
|
||||
def test_get_recovery_data_no_file(self, mock_isfile):
|
||||
@@ -496,17 +492,17 @@ class FileManagerTest(unittest.TestCase):
|
||||
self.assertIsNone(result)
|
||||
|
||||
@mock.patch("os.path.isfile")
|
||||
@mock.patch("yaml.safe_load")
|
||||
@mock.patch("octoprint.util.yaml.load_from_file")
|
||||
@mock.patch("os.remove")
|
||||
def test_get_recovery_data_broken_file(
|
||||
self, mock_remove, mock_yaml_safe_load, mock_isfile
|
||||
self, mock_remove, mock_yaml_load, mock_isfile
|
||||
):
|
||||
import os
|
||||
|
||||
recovery_file = os.path.join("/path/to/a/base_folder", "print_recovery_data.yaml")
|
||||
|
||||
mock_isfile.return_value = True
|
||||
mock_yaml_safe_load.side_effect = RuntimeError
|
||||
mock_yaml_load.side_effect = RuntimeError
|
||||
|
||||
result = self.file_manager.get_recovery_data()
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||
__copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
|
||||
import unittest
|
||||
|
||||
import octoprint.util
|
||||
|
||||
|
||||
class FastDeepcopyTest(unittest.TestCase):
|
||||
def test_clean(self):
|
||||
data = {"a": 1, "b": 2, "c": 3}
|
||||
self.assertEqual(data, octoprint.util.fast_deepcopy(data))
|
||||
|
||||
def test_function(self):
|
||||
data = {"a": 1, "b": 2, "c": 3, "f": lambda x: x + 1}
|
||||
self.assertEqual(data, octoprint.util.fast_deepcopy(data))
|
||||
@@ -108,6 +108,47 @@ class BomAwareOpenTest(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class GetBomTest(unittest.TestCase):
|
||||
"""
|
||||
Tests for :func:`octoprint.util.get_bom`.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
self.filename_utf8_with_bom = os.path.join(
|
||||
os.path.abspath(os.path.dirname(__file__)), "_files", "utf8_with_bom.txt"
|
||||
)
|
||||
self.filename_utf8_without_bom = os.path.join(
|
||||
os.path.abspath(os.path.dirname(__file__)), "_files", "utf8_without_bom.txt"
|
||||
)
|
||||
|
||||
def test_get_bom_no_bom(self):
|
||||
"""Tests that no BOM is returned if no BOM is present."""
|
||||
|
||||
# test
|
||||
bom = octoprint.util.get_bom(self.filename_utf8_without_bom, "utf-8-sig")
|
||||
|
||||
# assert
|
||||
self.assertIsNone(bom)
|
||||
|
||||
def test_get_bom_utf8_bom(self):
|
||||
"""Tests that a UTF8 BOM is returned if present."""
|
||||
|
||||
# test
|
||||
bom = octoprint.util.get_bom(self.filename_utf8_with_bom, "utf-8-sig")
|
||||
|
||||
# assert
|
||||
self.assertEqual(bom, b"\xef\xbb\xbf")
|
||||
|
||||
def test_get_bom_wrong_encoding(self):
|
||||
"""Tests that an UTF8 BOM is only returned if proper encoding was set."""
|
||||
|
||||
# test
|
||||
bom = octoprint.util.get_bom(self.filename_utf8_with_bom, "utf-16-le")
|
||||
|
||||
# assert
|
||||
self.assertIsNone(bom)
|
||||
|
||||
|
||||
class TestAtomicWrite(unittest.TestCase):
|
||||
"""
|
||||
Tests for :func:`octoprint.util.atomic_write`.
|
||||
|
||||
Binary file not shown.
@@ -3,9 +3,9 @@
|
||||
# This file is distributed under the same license as the OctoPrint project.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint 1.7.0rc1\n"
|
||||
"Project-Id-Version: OctoPrint 1.7.0\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2021-08-04 10:58+0200\n"
|
||||
"POT-Creation-Date: 2021-10-11 10:35+0200\n"
|
||||
"PO-Revision-Date: 2021-08-04 11:01+0200\n"
|
||||
"Last-Translator: Gina Häußge <gina@octoprint.org>\n"
|
||||
"Language: de\n"
|
||||
@@ -271,7 +271,7 @@ msgstr "Nie"
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:348
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:456
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:14
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:31
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:32
|
||||
#: src/octoprint/templates/snippets/settings/server/serverPluginBlacklist.jinja2:5
|
||||
#: src/octoprint/templates/tabs/terminal.jinja2:35
|
||||
msgid "Advanced options"
|
||||
@@ -347,7 +347,7 @@ msgstr "Kanal deaktivieren"
|
||||
msgid "Enable Channel"
|
||||
msgstr "Kanal aktivieren"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:338
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:337
|
||||
msgid ""
|
||||
"You can edit your announcement subscriptions under Settings > "
|
||||
"Announcements."
|
||||
@@ -355,18 +355,18 @@ msgstr ""
|
||||
"Du kannst deine Benachrichtigungsabonnements unter Einstellungen > "
|
||||
"Benachrichtigungen konfigurieren."
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:351
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:350
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1625
|
||||
#: src/octoprint/static/js/app/viewmodels/loginstate.js:157
|
||||
msgid "Later"
|
||||
msgstr "Später"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:358
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:357
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1636
|
||||
msgid "Mark read"
|
||||
msgstr "Gelesen"
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:365
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:364
|
||||
msgid "Read..."
|
||||
msgstr "Lesen..."
|
||||
|
||||
@@ -423,16 +423,16 @@ msgstr "Aktionen"
|
||||
msgid "Refresh Announcements"
|
||||
msgstr "Ankündigungen aktualisieren"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:123
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:127
|
||||
msgid "Allows administrating all application keys"
|
||||
msgstr "Erlaubt die Administration aller Applicationkeys"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:134
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:135
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:138
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:139
|
||||
msgid "Application Keys"
|
||||
msgstr "Application Keys"
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:484
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:485
|
||||
msgid ""
|
||||
"Without this plugin third party clients will no longer be able to obtain "
|
||||
"an API key without you manually copy-pasting it."
|
||||
@@ -632,7 +632,7 @@ msgstr "Sicherung & Wiederherstellung"
|
||||
msgid "Restore Backup?"
|
||||
msgstr "Sicherung wiederherstellen?"
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:1414
|
||||
#: src/octoprint/plugins/backup/__init__.py:1411
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to backup & restore your "
|
||||
"OctoPrint settings and data."
|
||||
@@ -1311,7 +1311,7 @@ msgstr ""
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/groups.jinja2:60
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:70
|
||||
#: src/octoprint/templates/snippets/settings/printerprofiles/profileEditor.jinja2:9
|
||||
#: src/octoprint/templates/tabs/control.jinja2:132
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
msgid "General"
|
||||
msgstr "Allgemein"
|
||||
|
||||
@@ -1411,7 +1411,7 @@ msgstr ""
|
||||
"Server</strong> erreichbar ist.</p>"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2:33
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:22
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:23
|
||||
msgid "Timelapse Recordings"
|
||||
msgstr "Zeitrafferaufnahmen"
|
||||
|
||||
@@ -1691,7 +1691,7 @@ msgid "Filament"
|
||||
msgstr "Filament"
|
||||
|
||||
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:735
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:85
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:87
|
||||
#: src/octoprint/static/js/app/viewmodels/files.js:1013
|
||||
#: src/octoprint/static/js/app/viewmodels/printerstate.js:357
|
||||
#: src/octoprint/static/js/app/viewmodels/temperature.js:146
|
||||
@@ -1945,13 +1945,13 @@ msgstr ""
|
||||
msgid "Yes, please visualize %(name)s regardless of its size"
|
||||
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:44
|
||||
#: src/octoprint/plugins/logging/__init__.py:42
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr ""
|
||||
"Erlaubt den Download von Logdateien sowie deren Löschung und das Setzen "
|
||||
"von Loglevels."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:285
|
||||
#: src/octoprint/plugins/logging/__init__.py:278
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to retrieve OctoPrint's "
|
||||
"logs or modify the current logging levels through the web interface."
|
||||
@@ -2965,57 +2965,57 @@ msgstr "Abbruch"
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:148
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:147
|
||||
msgid "Allows to check for software updates"
|
||||
msgstr "Erlaubt das Prüfen auf Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:155
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:154
|
||||
msgid "Allows to perform software updates"
|
||||
msgstr "Erlaubt das Durchführen von Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:163
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:162
|
||||
msgid "Allows to configure software update"
|
||||
msgstr "Erlaubt das Konfigurieren von Softwareaktualisierungen"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1172
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1153
|
||||
msgid "Python package installation folder"
|
||||
msgstr "Python-Paket-Installationsverzeichnis"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1173
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1154
|
||||
msgid "Plugin folder"
|
||||
msgstr "Pluginverzeichnis"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1174
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1155
|
||||
msgid "System temporary files"
|
||||
msgstr "Temporäre Dateien"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1206
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1187
|
||||
#: src/octoprint/templates/footer.jinja2:4
|
||||
msgid "Python"
|
||||
msgstr "Python"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1213
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2292
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1194
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2273
|
||||
msgid "pip"
|
||||
msgstr "pip"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1220
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1201
|
||||
msgid "setuptools"
|
||||
msgstr "setuptools"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1451
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1468
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1432
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1449
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_settings.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr "Software Update"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1458
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1439
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_update.jinja2:1
|
||||
#, fuzzy
|
||||
msgid "Update?"
|
||||
msgstr "Aktualisieren"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2230
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2211
|
||||
#: src/octoprint/server/views.py:1048
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:110
|
||||
@@ -3027,7 +3027,7 @@ msgstr "Aktualisieren"
|
||||
msgid "OctoPrint"
|
||||
msgstr "OctoPrint"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2454
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2435
|
||||
msgid ""
|
||||
"Without this plugin OctoPrint will no longer be able to update itself or "
|
||||
"any of your installed plugins which might put your system at risk."
|
||||
@@ -4587,7 +4587,7 @@ msgstr "Bist Du sicher, dass du die Verbindung zum Drucker trennen willst?"
|
||||
msgid "Stay Connected"
|
||||
msgstr "Verbunden bleiben"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:91
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:93
|
||||
msgid "Hotend"
|
||||
msgstr "Hotend"
|
||||
|
||||
@@ -5124,23 +5124,23 @@ msgstr "Weiß"
|
||||
msgid "Autodetect from browser"
|
||||
msgstr "Automatisch vom Browser erkennen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:437
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:438
|
||||
msgid "If you see your webcam stream below, the entered stream URL is ok."
|
||||
msgstr "Falls du unten den Webcamstream sehen kannst, ist die Stream-URL ok."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:467
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:480
|
||||
msgid "Stream test"
|
||||
msgstr "Stream Test"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:485
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:502
|
||||
msgid "Could not retrieve snapshot URL, please double check the URL"
|
||||
msgstr "Konnte die Snapshot-URL nicht abgreifen, bitte prüfen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:488
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:505
|
||||
msgid "Snapshot test failed"
|
||||
msgstr "Snapshot Test fehlgeschlagen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:508
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:525
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Could retrieve the snapshot URL, but it didn't look like an image. Got "
|
||||
@@ -5152,66 +5152,66 @@ msgstr ""
|
||||
"aus: <code>%(content_type)s</code>. Bitte überprüfe, dass die URL "
|
||||
"einzelne Bilder zurückliefert, nicht multipart Daten oder Videos."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:537
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:554
|
||||
msgid ""
|
||||
"If you see your webcam snapshot picture below, the entered snapshot URL "
|
||||
"is ok."
|
||||
msgstr "Falls du unten dein Snapshotbild sehen kannst, ist die Snapshot-URL ok."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:541
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:558
|
||||
msgid "Snapshot test"
|
||||
msgstr "Snapshot Test"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:583
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:600
|
||||
msgid "The path doesn't exist"
|
||||
msgstr "Der Pfad existiert nicht"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:585
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:602
|
||||
msgid "The path is not a file"
|
||||
msgstr "Der Pfad ist keine Datei"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:588
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:605
|
||||
msgid "The path is not an executable"
|
||||
msgstr "Der Pfad ist nicht ausführbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:592
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:693
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:609
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:710
|
||||
msgid "The path is valid"
|
||||
msgstr "Der Pfad ist valide"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:617
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:634
|
||||
msgid "The server is not reachable"
|
||||
msgstr "Der Server ist nicht erreichbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:620
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:637
|
||||
msgid "The server is reachable"
|
||||
msgstr "Der Server ist erreichbar"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:641
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:658
|
||||
msgid "Name cannot be resolved"
|
||||
msgstr "Name kann nicht aufgelöst werden"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:645
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:662
|
||||
msgid "Name can be resolved"
|
||||
msgstr "Name kann aufgelöst werden"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:677
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:694
|
||||
msgid "The path is a broken symlink."
|
||||
msgstr "Der Pfad ist ein kaputter Symlink."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:681
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:698
|
||||
msgid "The path does not exist and cannot be created."
|
||||
msgstr "Der Pfad existiert nicht und kann nicht erstellt werden."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:685
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:702
|
||||
msgid "The path is not a folder."
|
||||
msgstr "Der Pfad ist kein Verzeichnis."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:689
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:706
|
||||
msgid "The path is not writable."
|
||||
msgstr "Der Pfad ist nicht beschreibbar."
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:830
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:847
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:122
|
||||
msgid ""
|
||||
"This will generate a new API Key. The old API Key will cease to function "
|
||||
@@ -5593,7 +5593,8 @@ msgid "Please log in"
|
||||
msgstr "Bitte einloggen"
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:46
|
||||
msgid "Incorrect username or password."
|
||||
#, fuzzy
|
||||
msgid "Incorrect username or password. Hint: Both are case sensitive!"
|
||||
msgstr "Username oder Passwort inkorrekt."
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:47
|
||||
@@ -8551,15 +8552,35 @@ msgstr ""
|
||||
"Muss vom Browser erreichbar sein, in dem die OctoPrint UI angezeigt wird,"
|
||||
" wird genutzt, um den Webcam Stream in die Seite einzubetten."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:9
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:1
|
||||
msgid "ICE server (STUN and/or TURN) to use for WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:2
|
||||
msgid "WebRTC ICE endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid "WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid ""
|
||||
"Only used for WebRTC streams. Optionally specify the ICE server(s) (STUN "
|
||||
"and/or TURN) to use for WebRTC. Multiple servers should be separated by a"
|
||||
" comma. If unsure, leave at the default of "
|
||||
"<code>stun:stun.l.google.com:19302</code>."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:12
|
||||
msgid "Webcam stream loading..."
|
||||
msgstr "Webcamstream lädt..."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:12
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
msgid "Webcam stream not loaded"
|
||||
msgstr "Webcamstream nicht geladen"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:13
|
||||
#: src/octoprint/templates/tabs/control.jinja2:16
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. To have "
|
||||
"this fixed, get in touch with an administrator of this OctoPrint "
|
||||
@@ -8569,7 +8590,7 @@ msgstr ""
|
||||
"benötigt. Um dies zu beheben wende dich bitte an einen Administrator "
|
||||
"dieser OctoPrint Instanz."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:14
|
||||
#: src/octoprint/templates/tabs/control.jinja2:17
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. You can "
|
||||
"change the URL of the stream under \"Settings\" > \"Webcam & Timelapse\" "
|
||||
@@ -8581,63 +8602,63 @@ msgstr ""
|
||||
"\"Webcam & Zeitraffer\" > \"Webcam\" > \"Stream-URL\" ändern. Falls du "
|
||||
"keine Webcam hast kannst du Webcam-Unterstützung dort auch deaktivieren."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
#: src/octoprint/templates/tabs/control.jinja2:18
|
||||
msgid "Currently configured stream URL"
|
||||
msgstr "Aktuell konfigurierte Stream-URL"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:26
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
msgid "Keyboard controls active"
|
||||
msgstr "Tastatursteuerung aktiv"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
#: src/octoprint/templates/tabs/control.jinja2:32
|
||||
msgid "X Axis"
|
||||
msgstr "X-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:30
|
||||
#: src/octoprint/templates/tabs/control.jinja2:33
|
||||
msgid "Y Axis"
|
||||
msgstr "Y-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↑"
|
||||
msgstr "Bild↑"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↓"
|
||||
msgstr "Bild↓"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Z Axis"
|
||||
msgstr "Z-Achse"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
#: src/octoprint/templates/tabs/control.jinja2:37
|
||||
msgid "Home X/Y"
|
||||
msgstr "Home X/Y"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:35
|
||||
#: src/octoprint/templates/tabs/control.jinja2:38
|
||||
msgid "Home Z"
|
||||
msgstr "Home Z"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:36
|
||||
#: src/octoprint/templates/tabs/control.jinja2:39
|
||||
msgid "Stepsize"
|
||||
msgstr "Schrittgröße"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:42
|
||||
#: src/octoprint/templates/tabs/control.jinja2:45
|
||||
msgid ""
|
||||
"Hint: If you move your mouse over the picture, you enter keyboard control"
|
||||
" mode."
|
||||
msgstr "Hinweis: Bewegen der Maus über das Bild aktiviert die Tastatursteuerung."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid "Feed rate modifier:"
|
||||
msgstr "Feedrate-Modifier:"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Please note!"
|
||||
msgstr "Bitte beachten!"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid ""
|
||||
"The feed rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
@@ -8648,19 +8669,19 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:104
|
||||
#: src/octoprint/templates/tabs/control.jinja2:107
|
||||
msgid "Extrude"
|
||||
msgstr "Extrude"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:105
|
||||
#: src/octoprint/templates/tabs/control.jinja2:108
|
||||
msgid "Retract"
|
||||
msgstr "Retract"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:109
|
||||
#: src/octoprint/templates/tabs/control.jinja2:112
|
||||
msgid "Switch Tool..."
|
||||
msgstr "Werkzeugwechsel..."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
msgid ""
|
||||
"The selected tool can only be set, it cannot be read back from the "
|
||||
"firmware due to a limitation of the communication protocol. There is no "
|
||||
@@ -8671,11 +8692,11 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Flow rate modifier:"
|
||||
msgstr "Flowrate-Modifier:"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid ""
|
||||
"The flow rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
@@ -8686,15 +8707,15 @@ msgstr ""
|
||||
"Kommunikationsprotokoll. Es gibt keine Möglichkeit, den aktuellen Wert "
|
||||
"anzuzeigen."
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:134
|
||||
#: src/octoprint/templates/tabs/control.jinja2:137
|
||||
msgid "Motors off"
|
||||
msgstr "Motoren aus"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
#: src/octoprint/templates/tabs/control.jinja2:138
|
||||
msgid "Fan on"
|
||||
msgstr "Lüfter an"
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:136
|
||||
#: src/octoprint/templates/tabs/control.jinja2:139
|
||||
msgid "Fan off"
|
||||
msgstr "Lüfter aus"
|
||||
|
||||
@@ -8977,3 +8998,4 @@ msgstr "Ungerenderte Zeitrafferaufnahme löschen"
|
||||
#: src/octoprint/templates/tabs/timelapse.jinja2:201
|
||||
msgid "Render timelapse"
|
||||
msgstr "Zeitrafferaufnahme rendern"
|
||||
|
||||
+104
-84
@@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint 1.7.0.dev209+g70d07889e.dirty\n"
|
||||
"Project-Id-Version: OctoPrint 1.7.0\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2021-08-04 10:58+0200\n"
|
||||
"POT-Creation-Date: 2021-10-11 10:35+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -236,7 +236,7 @@ msgstr ""
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:348
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:456
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:14
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:31
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:32
|
||||
#: src/octoprint/templates/snippets/settings/server/serverPluginBlacklist.jinja2:5
|
||||
#: src/octoprint/templates/tabs/terminal.jinja2:35
|
||||
msgid "Advanced options"
|
||||
@@ -300,24 +300,24 @@ msgstr ""
|
||||
msgid "Enable Channel"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:338
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:337
|
||||
msgid ""
|
||||
"You can edit your announcement subscriptions under Settings > "
|
||||
"Announcements."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:351
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:350
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1625
|
||||
#: src/octoprint/static/js/app/viewmodels/loginstate.js:157
|
||||
msgid "Later"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:358
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:357
|
||||
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:1636
|
||||
msgid "Mark read"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:365
|
||||
#: src/octoprint/plugins/announcements/static/js/announcements.js:364
|
||||
msgid "Read..."
|
||||
msgstr ""
|
||||
|
||||
@@ -374,16 +374,16 @@ msgstr ""
|
||||
msgid "Refresh Announcements"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:123
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:127
|
||||
msgid "Allows administrating all application keys"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:134
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:135
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:138
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:139
|
||||
msgid "Application Keys"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:484
|
||||
#: src/octoprint/plugins/appkeys/__init__.py:485
|
||||
msgid ""
|
||||
"Without this plugin third party clients will no longer be able to obtain "
|
||||
"an API key without you manually copy-pasting it."
|
||||
@@ -579,7 +579,7 @@ msgstr ""
|
||||
msgid "Restore Backup?"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:1414
|
||||
#: src/octoprint/plugins/backup/__init__.py:1411
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to backup & restore your "
|
||||
"OctoPrint settings and data."
|
||||
@@ -1129,7 +1129,7 @@ msgstr ""
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/groups.jinja2:60
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:70
|
||||
#: src/octoprint/templates/snippets/settings/printerprofiles/profileEditor.jinja2:9
|
||||
#: src/octoprint/templates/tabs/control.jinja2:132
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
@@ -1212,7 +1212,7 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2:33
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:22
|
||||
#: src/octoprint/templates/dialogs/settings/webcam.jinja2:23
|
||||
msgid "Timelapse Recordings"
|
||||
msgstr ""
|
||||
|
||||
@@ -1446,7 +1446,7 @@ msgid "Filament"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:735
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:85
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:87
|
||||
#: src/octoprint/static/js/app/viewmodels/files.js:1013
|
||||
#: src/octoprint/static/js/app/viewmodels/printerstate.js:357
|
||||
#: src/octoprint/static/js/app/viewmodels/temperature.js:146
|
||||
@@ -1664,11 +1664,11 @@ msgstr ""
|
||||
msgid "Yes, please visualize %(name)s regardless of its size"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:44
|
||||
#: src/octoprint/plugins/logging/__init__.py:42
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:285
|
||||
#: src/octoprint/plugins/logging/__init__.py:278
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to retrieve OctoPrint's "
|
||||
"logs or modify the current logging levels through the web interface."
|
||||
@@ -2585,56 +2585,56 @@ msgstr ""
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:148
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:147
|
||||
msgid "Allows to check for software updates"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:155
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:154
|
||||
msgid "Allows to perform software updates"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:163
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:162
|
||||
msgid "Allows to configure software update"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1172
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1153
|
||||
msgid "Python package installation folder"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1173
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1154
|
||||
msgid "Plugin folder"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1174
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1155
|
||||
msgid "System temporary files"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1206
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1187
|
||||
#: src/octoprint/templates/footer.jinja2:4
|
||||
msgid "Python"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1213
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2292
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1194
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2273
|
||||
msgid "pip"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1220
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1201
|
||||
msgid "setuptools"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1451
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1468
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1432
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1449
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_settings.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1458
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1439
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard_update.jinja2:1
|
||||
msgid "Update?"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2230
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2211
|
||||
#: src/octoprint/server/views.py:1048
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:110
|
||||
@@ -2646,7 +2646,7 @@ msgstr ""
|
||||
msgid "OctoPrint"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2454
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:2435
|
||||
msgid ""
|
||||
"Without this plugin OctoPrint will no longer be able to update itself or "
|
||||
"any of your installed plugins which might put your system at risk."
|
||||
@@ -3939,7 +3939,7 @@ msgstr ""
|
||||
msgid "Stay Connected"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:91
|
||||
#: src/octoprint/static/js/app/viewmodels/control.js:93
|
||||
msgid "Hotend"
|
||||
msgstr ""
|
||||
|
||||
@@ -4430,23 +4430,23 @@ msgstr ""
|
||||
msgid "Autodetect from browser"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:437
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:438
|
||||
msgid "If you see your webcam stream below, the entered stream URL is ok."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:467
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:480
|
||||
msgid "Stream test"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:485
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:502
|
||||
msgid "Could not retrieve snapshot URL, please double check the URL"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:488
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:505
|
||||
msgid "Snapshot test failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:508
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:525
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Could retrieve the snapshot URL, but it didn't look like an image. Got "
|
||||
@@ -4455,66 +4455,66 @@ msgid ""
|
||||
"or videos."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:537
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:554
|
||||
msgid ""
|
||||
"If you see your webcam snapshot picture below, the entered snapshot URL "
|
||||
"is ok."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:541
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:558
|
||||
msgid "Snapshot test"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:583
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:600
|
||||
msgid "The path doesn't exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:585
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:602
|
||||
msgid "The path is not a file"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:588
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:605
|
||||
msgid "The path is not an executable"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:592
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:693
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:609
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:710
|
||||
msgid "The path is valid"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:617
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:634
|
||||
msgid "The server is not reachable"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:620
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:637
|
||||
msgid "The server is reachable"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:641
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:658
|
||||
msgid "Name cannot be resolved"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:645
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:662
|
||||
msgid "Name can be resolved"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:677
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:694
|
||||
msgid "The path is a broken symlink."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:681
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:698
|
||||
msgid "The path does not exist and cannot be created."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:685
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:702
|
||||
msgid "The path is not a folder."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:689
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:706
|
||||
msgid "The path is not writable."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:830
|
||||
#: src/octoprint/static/js/app/viewmodels/settings.js:847
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:122
|
||||
msgid ""
|
||||
"This will generate a new API Key. The old API Key will cease to function "
|
||||
@@ -4867,7 +4867,7 @@ msgid "Please log in"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:46
|
||||
msgid "Incorrect username or password."
|
||||
msgid "Incorrect username or password. Hint: Both are case sensitive!"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/login.jinja2:47
|
||||
@@ -7401,22 +7401,42 @@ msgid ""
|
||||
"to embed the webcam stream into the page."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:9
|
||||
msgid "Webcam stream loading..."
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:1
|
||||
msgid "ICE server (STUN and/or TURN) to use for WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:2
|
||||
msgid "WebRTC ICE endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid "WebRTC"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/snippets/settings/webcam/webcamStreamWebrtcIceServers.jinja2:5
|
||||
msgid ""
|
||||
"Only used for WebRTC streams. Optionally specify the ICE server(s) (STUN "
|
||||
"and/or TURN) to use for WebRTC. Multiple servers should be separated by a"
|
||||
" comma. If unsure, leave at the default of "
|
||||
"<code>stun:stun.l.google.com:19302</code>."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:12
|
||||
msgid "Webcam stream loading..."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
msgid "Webcam stream not loaded"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:13
|
||||
#: src/octoprint/templates/tabs/control.jinja2:16
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. To have "
|
||||
"this fixed, get in touch with an administrator of this OctoPrint "
|
||||
"instance."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:14
|
||||
#: src/octoprint/templates/tabs/control.jinja2:17
|
||||
msgid ""
|
||||
"It might not be configured correctly or require authentication. You can "
|
||||
"change the URL of the stream under \"Settings\" > \"Webcam & Timelapse\" "
|
||||
@@ -7424,108 +7444,108 @@ msgid ""
|
||||
"just disable webcam support there."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:15
|
||||
#: src/octoprint/templates/tabs/control.jinja2:18
|
||||
msgid "Currently configured stream URL"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:26
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
msgid "Keyboard controls active"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:29
|
||||
#: src/octoprint/templates/tabs/control.jinja2:32
|
||||
msgid "X Axis"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:30
|
||||
#: src/octoprint/templates/tabs/control.jinja2:33
|
||||
msgid "Y Axis"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↑"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Page↓"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:31
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
msgid "Z Axis"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:34
|
||||
#: src/octoprint/templates/tabs/control.jinja2:37
|
||||
msgid "Home X/Y"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:35
|
||||
#: src/octoprint/templates/tabs/control.jinja2:38
|
||||
msgid "Home Z"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:36
|
||||
#: src/octoprint/templates/tabs/control.jinja2:39
|
||||
msgid "Stepsize"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:42
|
||||
#: src/octoprint/templates/tabs/control.jinja2:45
|
||||
msgid ""
|
||||
"Hint: If you move your mouse over the picture, you enter keyboard control"
|
||||
" mode."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid "Feed rate modifier:"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Please note!"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:88
|
||||
#: src/octoprint/templates/tabs/control.jinja2:91
|
||||
msgid ""
|
||||
"The feed rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
"show the current setting."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:104
|
||||
#: src/octoprint/templates/tabs/control.jinja2:107
|
||||
msgid "Extrude"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:105
|
||||
#: src/octoprint/templates/tabs/control.jinja2:108
|
||||
msgid "Retract"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:109
|
||||
#: src/octoprint/templates/tabs/control.jinja2:112
|
||||
msgid "Switch Tool..."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:116
|
||||
#: src/octoprint/templates/tabs/control.jinja2:119
|
||||
msgid ""
|
||||
"The selected tool can only be set, it cannot be read back from the "
|
||||
"firmware due to a limitation of the communication protocol. There is no "
|
||||
"way to show the current setting."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid "Flow rate modifier:"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:121
|
||||
#: src/octoprint/templates/tabs/control.jinja2:124
|
||||
msgid ""
|
||||
"The flow rate can only be set, it cannot be read back from the firmware "
|
||||
"due to a limitation of the communication protocol. There is no way to "
|
||||
"show the current setting."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:134
|
||||
#: src/octoprint/templates/tabs/control.jinja2:137
|
||||
msgid "Motors off"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:135
|
||||
#: src/octoprint/templates/tabs/control.jinja2:138
|
||||
msgid "Fan on"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/control.jinja2:136
|
||||
#: src/octoprint/templates/tabs/control.jinja2:139
|
||||
msgid "Fan off"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Reference in new issue
Block a user