Compare commits

...
28 Commits
Author SHA1 Message Date
Gina Häußge 685ce16c85 Preparing release of 1.2.12 (part three)
Forgot to add the news category of the blog to the announcement
plugin and also updated the list of patrons again.
2016-06-09 09:31:36 +02:00
Gina Häußge 885b48911e Preparing release of 1.2.12 (part two)
Another update of the CHANGELOG after fixing a bug. Shifted release date
to tomorrow to leave more time for final tests that was now eaten up by the
last minute bug fix.

Also updated CONTRIBUTING file to explain new prerelease branch.
2016-06-08 16:48:39 +02:00
Gina Häußge d7ef60b4d2 Slight change in function definition of reused functions (JS) 2016-06-08 16:33:08 +02:00
Gina Häußge 63cec660ca Solve a race condition that could cause 401 responses and a broken UI
Closes #1364. See ticket for details.
2016-06-08 16:21:25 +02:00
Gina Häußge 4c34cb84c7 Preparing release of 1.2.12 2016-06-08 13:09:04 +02:00
Gina Häußge d3d4d4e407 Merge branch 'prerelease' into maintenance 2016-06-08 11:21:22 +02:00
Gina Häußge e9f80c6616 Added new prerelease branch to versioneer config
Can be used in the future for tracking prereleases and testing
proper version updates without having to push to master directly.
2016-06-08 11:19:21 +02:00
Gina Häußge 5006b019af Add events for slicing profile manipulation
Events SlicingProfile(Added|Modified|Deleted). Initially thought to be necessary
to properly refresh available profiles in slicing dialog, not needed for that after
all but still left in and documented, might be useful for someone.
2016-06-06 18:12:32 +02:00
Gina Häußge 4f3e4f7f38 Force rescanning of available slicing profiles for slicer on update
Should make newly uploaded profiles available in the slicing dialog without
having to first deselect and then reselected the current slicer.
2016-06-06 16:20:47 +02:00
Gina Häußge a0697f8bad Use movie prefix for timelapse notifications
Also added a missing lock.

Also part of the fix for #1320
2016-06-02 12:03:57 +02:00
Gina Häußge 2833372603 Allow deletion of *.mp4 timelapse files
That one was missing in a00faf2.

Fixes #1320
2016-06-02 11:11:06 +02:00
Gina Häußge 8ce1eafd5d Properly track unrendered timelapses that are being processed
UI removes action buttons for them and displays a spinner
indicating that the timelapse in question is either being
recorded or being rendered at the moment.

Should prevent users from accidentally trying to render an
incomplete timelapse.
2016-06-02 10:11:54 +02:00
Gina Häußge 21a4033f73 Don't concurrently delete unrendered timelapses
Could trigger lots of errors if an unrendered timelapse currently
being collected was deleted from a separate thread from right
under the collection thread.

Also only log errors while processing already deleted files
if debug logging is enabled.

Finally trigger MovieDone event AFTER deleting unrendered
files (otherwise just rendered timelapse might still be present
when list of timelapses is queried right after).

Should solve #1326
2016-06-02 10:05:44 +02:00
Gina Häußge 51a1953d99 Move timelapse event processing to timelapse viewmodel 2016-06-01 13:24:29 +02:00
Gina Häußge 30b6211157 Whitelist .g extensions on sd file upload
That way uploading something like auto0.g will not
cause a rename to auto0.gco anymore.

Closes #1314
2016-06-01 12:29:42 +02:00
Gina Häußge 36ec9c4741 Do not sort events in the event queue alphabetically
This should never have been a PriorityQueue, or at the very least it should
never have the data itself in a sortable structure.

Thanks to processing speed of the event queue that seldomly showed,
only in cases where two events entered the queue almost simultanously,
e.g. when starting to render a timelapse movie and immediately failing.

Should solve #1343
2016-06-01 10:29:47 +02:00
Gina Häußge 1581ebbead Fix error when trying to confirm the edit-user-dialog
Closes #1357
2016-05-31 13:32:14 +02:00
Gina Häußge 436ebd7c18 Add help text re units for disk space thresholds
Closes #1338
2016-05-20 11:04:42 +02:00
Gina Häußge 801d60388a Also report 0% print progress to plugins
Fixes #1344
2016-05-20 10:24:47 +02:00
Gina Häußge 821fa4299b Let's go all in and use keyword parameters
Way less error prone than positional arguments!
2016-05-19 18:35:02 +02:00
Gina Häußge b018a56e4c Merge branch 'maintenance-pid_cleanup' of https://github.com/kevans91/OctoPrint into fix/1324 2016-05-19 18:32:46 +02:00
Gina Häußge b1e75a1033 Make connection dialog visible for users again
Should actually not have been limited to admins-only, that was an accident
during switching to 1.2.0 implementation.

Once #1110 is tackled, this should be something configurable based on the role
as well.
2016-05-19 10:42:27 +02:00
Kyle Evans 86fbbefb6e Complete backport of pid cleanup fix for #1324 2016-05-15 09:16:53 -05:00
Gina Häußge 2c0fa7c1d1 Added @kevans91 to AUTHORS.md
(cherry picked from commit 425fa8e)
2016-05-12 10:52:25 +02:00
Kyle Evans 8263c6072a Make Server class octoprint_daemon-aware, make sure terminated() gets invoked on it upon SIGTERM and update respective test
(cherry picked from commit 75f8fac)
2016-05-12 10:44:27 +02:00
Gina Häußge 91b5fc6b0d Force synchronization of sockjs message sending 2016-05-10 09:48:20 +02:00
Gina Häußge 1225a2501d Fix a stupid mistake in the german translation 2016-05-09 15:27:17 +02:00
Gina Häußge 34c068b964 maintenance branch is now 1.2.12.dev 2016-05-09 10:12:46 +02:00
36 changed files with 748 additions and 467 deletions

No files matched your search

+7 -5
View File
@@ -7,18 +7,20 @@
# The file is processed from top to bottom, the first matching line wins. If <tag> or <reference commit> are left out,
# the lookup table does not apply to the matched branches
# master shall not use the lookup table, only tags
# master, prerelease and rc shall not use the lookup table, only tags
master
prerelease
rc
# neither should disconnected checkouts, e.g. 'git checkout <tag>'
HEAD
\(detached.*
# maintenance is currently the branch for preparation of maintenance release 1.2.11
# maintenance is currently the branch for preparation of maintenance release 1.2.12
# so are any fix/... and improve/... branches
maintenance 1.2.11 692166f067329cd3d6fdc84389e0dd76184c5e0c pep440-dev
fix/.* 1.2.11 692166f067329cd3d6fdc84389e0dd76184c5e0c pep440-dev
improve/.* 1.2.11 692166f067329cd3d6fdc84389e0dd76184c5e0c pep440-dev
maintenance 1.2.12 e79703ba6eec1ecdfa21cf8f2a9efbc1eb6120e3 pep440-dev
fix/.* 1.2.12 e79703ba6eec1ecdfa21cf8f2a9efbc1eb6120e3 pep440-dev
improve/.* 1.2.12 e79703ba6eec1ecdfa21cf8f2a9efbc1eb6120e3 pep440-dev
# every other branch is a development branch and thus gets resolved to 1.3.0-dev for now
.* 1.3.0 198d3450d94be1a2 pep440-dev
+1
View File
@@ -60,6 +60,7 @@ date of first contribution):
* [Siim Raud](https://github.com/2ndalpha)
* ["geoporalis"](https://github.com/geoporalis)
* [Andrew Malota](https://github.com/2bitoperations)
* [Kyle Evans](https://github.com/kevans91)
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
+26
View File
@@ -1,5 +1,31 @@
# OctoPrint Changelog
## 1.2.12 (2016-06-09)
### Improvements
* [#1338](https://github.com/foosel/OctoPrint/issues/1338): Threshold configuration fields now include information about how to specify the thresholds.
* Mark unrendered timelapses currently being processed (recording or rendering) in the list and remove action buttons so no accidental double-processing can take place.
* Removed file extension from "rendering" and "rendered" notifications, was misleading when using the [mp4 wrapper script](https://github.com/guysoft/OctoPi/issues/184).
* Added some new events for manipulation of slicing profiles.
* Small fix of the german translation.
### Bug Fixes
* [#1314](https://github.com/foosel/OctoPrint/issues/1314): Do not change the extension of `.g` files being uploaded to SD (e.g. `auto0.g`)
* [#1320](https://github.com/foosel/OctoPrint/issues/1320): Allow deletion of *.mp4 timelapse files (see [this wrapper script](https://github.com/guysoft/OctoPi/issues/184)).
* [#1324](https://github.com/foosel/OctoPrint/issues/1324): Make daemonized OctoPrint properly clean up its pid file again (see also [#1330](https://github.com/foosel/OctoPrint/pull/1330)).
* [#1326](https://github.com/foosel/OctoPrint/issues/1326): Do not try to clean up an unrendered timelapse while it is already being deleted (and produce way too much logging output in the process).
* [#1343](https://github.com/foosel/OctoPrint/issues/1343): Events are now processed in the order they are fired in, making e.g. the "timelapse rendering" message always appear before "timelapse failed" and hence not stay on forever in case of a failed timelapse.
* [#1344](https://github.com/foosel/OctoPrint/issues/1344): `ProgressPlugin`s now get also notified about a progress of 0%.
* [#1357](https://github.com/foosel/OctoPrint/issues/1357): Fixed wrongly named method call on editing access control options for a user, causing that to not work properly.
* [#1361](https://github.com/foosel/OctoPrint/issues/1361): Properly reload profile list for currently selected slicer in the slicing dialog on change of profiles.
* [#1364](https://github.com/foosel/OctoPrint/issues/1364): Fixed a race condition that could cause the UI to not initialize correctly due to 401 errors, leaving it in an unusable state until a reload.
* Fixed concurrent message pushing to the frontend being able to break push messages for the session by forcing synchronization of SockJS message sending.
* Do not require admin rights for connecting/disconnecting, like it was in 1.1.x (note that this is supposed to become configurable behaviour once [#1110](https://github.com/foosel/OctoPrint/issues/1110) gets implemented)
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.11...1.2.12))
## 1.2.11 (2016-05-04)
### Important Announcement
+9
View File
@@ -302,6 +302,11 @@ There are three main branches in OctoPrint:
the scheme `x.y.z` (e.g. `1.2.9`) or - if it's absolutely necessary to
add a commit after release to this branch - `x.y.z.post<commits since x.y.z>`
(e.g. `1.2.9.post1`).
* `prerelease`: This branch is only used during the short period where a
future release has "graduated" from the `maintenance` branch and is already
tagged, but still marked on Github as a pre-release. This is mostly used for
update testing just before new releases. Version number follows the scheme
`x.y.z` (e.g. `1.2.9`), just like the `master` branch.
* `maintenance`: Improvements and fixes of the current release that make up
the next release go here. More or less continously updated. You can consider
this a preview of the next release version. It should be very stable at all
@@ -329,6 +334,9 @@ Those usually have one of the following prefixes:
`maintenance` and `devel` branches.
* `dev/...` or `feature/...`: New functionality under development that is to be merged
into the `devel` branch.
* `rc`: A branch similar in nature to the `prerelease` branch, only that it will be
used to provide current release candidates of the next stable version to be derived
from the `devel` branch.
There is also the `gh-pages` branch, which holds OctoPrint's web page, and a couple of
older development branches that are slowly being migrated or deleted.
@@ -367,6 +375,7 @@ the local version identifier to allow for an exact determination of the active c
* 2016-02-16: Added requirement to add information from template to existing
tickets as well, explained issue with "me too" red herrings.
* 2016-03-14: Some more requirements for PRs, and a PR template.
* 2016-06-08: New `prerelease` and `rc` branches explained.
## Footnotes
* [1] - If you are wondering why, the problem is that anything that you add
+28 -3
View File
@@ -7,35 +7,60 @@ thanks to everyone who contributed!
## Patreon Patrons
* 3D Moniak
* alephobjects
* Andrew Moorby
* Arnljot Arntsen
* Aurelio Bernal Ramírez
* Bart Zudell
* Brad Jackson
* Brent Fiegle
* Brian E. Tyler
* Charles Mitchell
* Christian Petropolis
* COLLE+McVOY
* CreativeTools
* D Brian Kimmel
* DeltaMaker 3D Printers
* Doug Johnson
* E3D BigBox
* Erik de Bruijn
* Ernesto Martinez
* Exovite
* Frank Sander
* georgeroblesjr
* Gregor Luetolf
* Jason Galarneau
* Joe Korzeniewski
* Joshua Gregory
* Kaile Riser
* Kale Stedman
* Kevin Freeheart
* Kyle Gress
* Makespace Madrid
* Mark Lane
* Mark Qvist
* Mark Walker
* Masayoshi Mitsui
* Michael McDargh
* Miguel Angel Salmeron
* MikeyDK
* Mikey
* Miles Flavel
* Mohammed Khorakiwala
* Noe Ruiz
* Paul Generes
* Peter Schmehl
* Roger Strolz
* Roy Cortes
* Samer Najia
* SD3D
* Shane Ekerbicer
* Simon
* Stefan Krister
* stefi davis
* Steven Pearson
* Sven Mueller
* Tom
* Thomas Hatley
* Thomas Sanladerer
* Trent Shumay
and 414 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
and 734 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
+24
View File
@@ -365,6 +365,30 @@ SlicingFailed
* ``gcode``: the sliced GCODE's filename
* ``reason``: the reason for the slicing having failed
SlicingProfileAdded
A new slicing profile was added.
Payload:
* ``slicer``: the slicer for which the profile was added
* ``profile``: the profile that was added
SlicingProfileModified
A new slicing profile was modified.
Payload:
* ``slicer``: the slicer for which the profile was modified
* ``profile``: the profile that was modified
SlicingProfileDeleted
A slicing profile was deleted.
Payload:
* ``slicer``: the slicer for which the profile was deleted
* ``profile``: the profile that was deleted
Settings
--------
+15 -2
View File
@@ -24,7 +24,14 @@ class Main(Daemon):
self._logConf = logConf
def run(self):
octoprint = Server(self._configfile, self._basedir, self._host, self._port, self._debug, self._allowRoot)
octoprint = Server(configfile=self._configfile,
basedir=self._basedir,
host=self._host,
port=self._port,
debug=self._debug,
allowRoot=self._allowRoot,
logConf=self._logConf,
octoprint_daemon=self)
octoprint.run()
def main():
@@ -77,7 +84,13 @@ def main():
elif "restart" == args.daemon:
daemon.restart()
else:
octoprint = Server(args.config, args.basedir, args.host, args.port, args.debug, args.allowRoot, args.logConf)
octoprint = Server(configfile=args.config,
basedir=args.basedir,
host=args.host,
port=args.port,
debug=args.debug,
allowRoot=args.allowRoot,
logConf=args.logConf)
octoprint.run()
if __name__ == "__main__":
+28 -28
View File
@@ -12,35 +12,35 @@ class Daemon:
Usage: subclass the daemon class and override the run() method."""
def __init__(self, pidfile): self.pidfile = pidfile
def daemonize(self):
"""Deamonize class. UNIX double fork mechanism."""
try:
pid = os.fork()
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError as err:
sys.exit(0)
except OSError as err:
sys.stderr.write('fork #1 failed: {0}\n'.format(err))
sys.exit(1)
# decouple from parent environment
os.chdir('/')
os.setsid()
os.chdir('/')
os.setsid()
os.umask(002)
# do second fork
try:
pid = os.fork()
try:
pid = os.fork()
if pid > 0:
# exit from second parent
sys.exit(0)
except OSError as err:
sys.exit(0)
except OSError as err:
sys.stderr.write('fork #2 failed: {0}\n'.format(err))
sys.exit(1)
sys.exit(1)
# redirect standard file descriptors
sys.stdout.flush()
sys.stderr.flush()
@@ -51,18 +51,14 @@ class Daemon:
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# write pidfile
pid = str(os.getpid())
with open(self.pidfile,'w+') as f:
f.write(pid + '\n')
# register listener for SIGTERM
signal.signal(signal.SIGTERM, self.term)
def term(self, _signo, _stack_frame):
os.remove(self.pidfile)
sys.exit(0)
def terminated(self):
self.remove_pidfile()
def start(self):
"""Start the daemon."""
@@ -74,13 +70,13 @@ class Daemon:
pid = int(pf.read().strip())
except IOError:
pid = None
if pid:
message = "pidfile {0} already exist. " + \
"Daemon already running?\n"
sys.stderr.write(message.format(self.pidfile))
sys.exit(1)
# Start the daemon
self.daemonize()
self.run()
@@ -94,14 +90,14 @@ class Daemon:
pid = int(pf.read().strip())
except IOError:
pid = None
if not pid:
message = "pidfile {0} does not exist. " + \
"Daemon not running?\n"
sys.stderr.write(message.format(self.pidfile))
return # not an error in a restart
# Try killing the daemon process
# Try killing the daemon process
try:
while 1:
os.kill(pid, signal.SIGTERM)
@@ -122,7 +118,11 @@ class Daemon:
def run(self):
"""You should override this method when you subclass Daemon.
It will be called after the process has been daemonized by
It will be called after the process has been daemonized by
start() or restart()."""
def remove_pidfile(self):
"""Removes the pidfile."""
if os.path.isfile(self.pidfile):
os.remove(self.pidfile)
+12 -5
View File
@@ -86,6 +86,14 @@ class Events(object):
SLICING_DONE = "SlicingDone"
SLICING_FAILED = "SlicingFailed"
SLICING_CANCELLED = "SlicingCancelled"
SLICING_PROFILE_ADDED = "SlicingProfileAdded"
SLICING_PROFILE_MODIFIED = "SlicingProfileModified"
SLICING_PROFILE_DELETED = "SlicingProfileDeleted"
# Printer Profiles
PRINTER_PROFILE_ADDED = "PrinterProfileAdded"
PRINTER_PROFILE_MODIFIED = "PrinterProfileModified"
PRINTER_PROFILE_DELETED = "PrinterProfileDeleted"
# Settings
SETTINGS_UPDATED = "SettingsUpdated"
@@ -107,7 +115,7 @@ class EventManager(object):
self._registeredListeners = collections.defaultdict(list)
self._logger = logging.getLogger(__name__)
self._queue = Queue.PriorityQueue()
self._queue = Queue.Queue()
self._worker = threading.Thread(target=self._work)
self._worker.daemon = True
self._worker.start()
@@ -115,7 +123,7 @@ class EventManager(object):
def _work(self):
try:
while True:
(event, payload) = self._queue.get(True)
event, payload = self._queue.get(True)
eventListeners = self._registeredListeners[event]
self._logger.debug("Firing event: %s (Payload: %r)" % (event, payload))
@@ -144,7 +152,7 @@ class EventManager(object):
payload being a payload object specific to the event.
"""
self._queue.put((event, payload), 0)
self._queue.put((event, payload))
if event == Events.UPDATED_FILES and "type" in payload and payload["type"] == "printables":
# when sending UpdatedFiles with type "printables", also send another event with deprecated type "gcode"
@@ -152,8 +160,7 @@ class EventManager(object):
import copy
legacy_payload = copy.deepcopy(payload)
legacy_payload["type"] = "gcode"
self._queue.put((event, legacy_payload), 0)
self._queue.put((event, legacy_payload))
def subscribe(self, event, callback):
"""
@@ -49,6 +49,10 @@ class AnnouncementPlugin(octoprint.plugin.AssetPlugin,
type="rss",
url="http://octoprint.org/feeds/important.xml",
read_until=1449446400),
_news=dict(name="OctoPrint News",
priority=2,
type="rss",
url="http://octoprint.org/feeds/news.xml"),
_releases=dict(name="OctoPrint Release Announcements",
priority=2,
type="rss",
-3
View File
@@ -191,9 +191,6 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
return octoprint.slicing.SlicingProfile(properties["type"], "unknown", profile_dict, display_name=display_name, description=description)
def save_slicer_profile(self, path, profile, allow_overwrite=True, overrides=None):
if os.path.exists(path) and not allow_overwrite:
raise octoprint.slicing.ProfileAlreadyExists("cura", profile.name)
new_profile = Profile.merge_profile(profile.data, overrides=overrides)
if profile.display_name is not None:
+5 -2
View File
@@ -528,7 +528,10 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self.refresh_sd_files(blocking=True)
existingSdFiles = map(lambda x: x[0], self._comm.getSdFiles())
remoteName = util.get_dos_filename(filename, existing_filenames=existingSdFiles, extension="gco")
remoteName = util.get_dos_filename(filename,
existing_filenames=existingSdFiles,
extension="gco",
whitelisted_extensions=["gco", "g"])
self._timeEstimationData = TimeEstimationHelper()
self._comm.startFileTransfer(absolutePath, filename, "/" + remoteName)
@@ -629,7 +632,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
printTimeLeft = totalPrintTime - cleanedPrintTime if (totalPrintTime is not None and cleanedPrintTime is not None) else None
if progress:
if progress is not None:
progress_int = int(progress * 100)
if self._lastProgressReport != progress_int:
self._lastProgressReport = progress_int
+7 -1
View File
@@ -114,7 +114,7 @@ def load_user(id):
class Server(object):
def __init__(self, configfile=None, basedir=None, host="0.0.0.0", port=5000, debug=False, allowRoot=False, logConf=None):
def __init__(self, configfile=None, basedir=None, host="0.0.0.0", port=5000, debug=False, allowRoot=False, logConf=None, octoprint_daemon=None):
self._configfile = configfile
self._basedir = basedir
self._host = host
@@ -123,6 +123,7 @@ class Server(object):
self._allowRoot = allowRoot
self._logConf = logConf
self._server = None
self._octoprint_daemon = octoprint_daemon
self._logger = None
@@ -505,6 +506,11 @@ class Server(object):
observer.join()
octoprint.plugin.call_plugin(octoprint.plugin.ShutdownPlugin,
"on_shutdown")
if self._octoprint_daemon is not None:
self._logger.info("Cleaning up daemon pidfile")
self._octoprint_daemon.terminated()
self._logger.info("Goodbye!")
atexit.register(on_shutdown)
+3 -1
View File
@@ -14,7 +14,7 @@ from octoprint.server.api import api, NO_CONTENT
from octoprint.settings import settings as s, valid_boolean_trues
from octoprint.slicing import UnknownSlicer, SlicerNotConfigured, ProfileAlreadyExists, UnknownProfile
from octoprint.slicing import UnknownSlicer, SlicerNotConfigured, ProfileAlreadyExists, UnknownProfile, CouldNotDeleteProfile
@api.route("/slicing", methods=["GET"])
@@ -147,6 +147,8 @@ def slicingDelSlicerProfile(slicer, name):
slicingManager.delete_profile(slicer, name)
except UnknownSlicer:
return make_response("Unknown slicer {slicer}".format(**locals()), 404)
except CouldNotDeleteProfile as e:
return make_response("Could not delete profile {profile} for slicer {slicer}: {cause}".format(profile=name, slicer=slicer, cause=str(e.cause)), 500)
return NO_CONTENT
+1 -1
View File
@@ -62,7 +62,7 @@ def downloadTimelapse(filename):
@api.route("/timelapse/<filename>", methods=["DELETE"])
@restricted_access
def deleteTimelapse(filename):
if util.is_allowed_file(filename, ["mpg"]):
if util.is_allowed_file(filename, ["mpg", "mpeg", "mp4"]):
timelapse_folder = settings().getBaseFolder("timelapse")
full_path = os.path.realpath(os.path.join(timelapse_folder, filename))
if full_path.startswith(timelapse_folder) and os.path.exists(full_path):
+7 -4
View File
@@ -43,6 +43,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer.
self._lastCurrent = 0
self._baseRateLimit = 0.5
self._emit_mutex = threading.RLock()
def _getRemoteAddress(self, info):
forwardedFor = info.headers.get("X-Forwarded-For")
if forwardedFor is not None:
@@ -194,7 +196,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer.
self.sendEvent(event, payload)
def _emit(self, type, payload):
try:
self.send({type: payload})
except Exception as e:
self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e)))
with self._emit_mutex:
try:
self.send({type: payload})
except Exception as e:
self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e)))
+1 -1
View File
@@ -128,7 +128,7 @@ def index():
# sidebar
templates["sidebar"]["entries"]= dict(
connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isAdmin")),
connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isUser")),
state=(gettext("State"), dict(template="sidebar/state.jinja2", _div="state", icon="info-sign")),
files=(gettext("Files"), dict(template="sidebar/files.jinja2", _div="files", icon="list", classes_content=["overflow_visible"], template_header="sidebar/files_header.jinja2"))
)
+23 -4
View File
@@ -407,7 +407,18 @@ class SlicingManager(object):
profile.description = description
path = self.get_profile_path(slicer, name)
is_overwrite = os.path.exists(path)
if is_overwrite and not allow_overwrite:
raise ProfileAlreadyExists(slicer, profile.name)
self._save_profile_to_path(slicer, path, profile, overrides=overrides, allow_overwrite=allow_overwrite)
payload = dict(slicer=slicer,
profile=name)
event = octoprint.events.Events.SLICING_PROFILE_MODIFIED if is_overwrite else octoprint.events.Events.SLICING_PROFILE_ADDED
octoprint.events.eventManager().fire(event, payload)
return profile
def _temporary_profile(self, slicer, name=None, overrides=None):
@@ -436,6 +447,7 @@ class SlicingManager(object):
Raises:
~octoprint.slicing.exceptions.UnknownSlicer: The slicer ``slicer`` is unknown.
~octoprint.slicing.exceptions.CouldNotDeleteProfile: There was an error while deleting the profile.
"""
if not slicer in self.registered_slicers:
@@ -445,10 +457,17 @@ class SlicingManager(object):
raise ValueError("name must be set")
try:
path = self.get_profile_path(slicer, name, must_exist=True)
except UnknownProfile:
return
os.remove(path)
try:
path = self.get_profile_path(slicer, name, must_exist=True)
except UnknownProfile:
return
os.remove(path)
except ProfileException as e:
raise e
except Exception as e:
raise CouldNotDeleteProfile(slicer, name, cause=e)
else:
octoprint.events.eventManager().fire(octoprint.events.Events.SLICING_PROFILE_DELETED, dict(slicer=slicer, profile=name))
def all_profiles(self, slicer, require_configured=False):
"""
+13
View File
@@ -105,3 +105,16 @@ class ProfileAlreadyExists(ProfileException):
def __init__(self, slicer, profile, *args, **kwargs):
ProfileException.__init__(self, slicer, profile, *args, **kwargs)
self.message = "Profile {profile} for slicer {slicer} already exists".format(profile=profile, slicer=slicer)
class CouldNotDeleteProfile(ProfileException):
"""
Raised if there is an unexpected error trying to delete a known profile.
"""
def __init__(self, slicer, profile, cause=None, *args, **kwargs):
ProfileException.__init__(self, slicer, profile, *args, **kwargs)
self.cause = cause
if cause:
self.message = "Could not delete profile {profile} for slicer {slicer}: {cause}".format(profile=profile, slicer=slicer, cause=str(cause))
else:
self.message = "Could not delete profile {profile} for slicer {slicer}".format(profile=profile, slicer=slicer)
+12 -91
View File
@@ -16,14 +16,16 @@ function DataUpdater(allViewModels) {
self._lastProcessingTimes = [];
self._lastProcessingTimesSize = 20;
self._timelapse_popup = undefined;
self._connectCallback = undefined;
self.connect = function() {
self.connect = function(callback) {
var options = {};
if (SOCKJS_DEBUG) {
options["debug"] = true;
}
self._connectCallback = callback;
self._socket = new SockJS(SOCKJS_URI, undefined, options);
self._socket.onopen = self._onconnect;
self._socket.onclose = self._onclose;
@@ -186,6 +188,13 @@ function DataUpdater(allViewModels) {
self.setThrottle(1);
log.info("Connected to the server");
if (self._connectCallback) {
self._connectCallback();
self._connectCallback = undefined;
}
break;
}
case "history": {
@@ -218,96 +227,10 @@ function DataUpdater(allViewModels) {
var type = data["type"];
var payload = data["payload"];
var html = "";
var format = {};
log.debug("Got event " + type + " with payload: " + JSON.stringify(payload));
if (type == "MovieRendering") {
if (self._timelapse_popup !== undefined) {
self._timelapse_popup.remove();
}
self._timelapse_popup = new PNotify({
title: gettext("Rendering timelapse"),
text: _.sprintf(gettext("Now rendering timelapse %(movie_basename)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."), payload),
hide: false,
callbacks: {
before_close: function() {
self._timelapse_popup = undefined;
}
}
});
} else if (type == "MovieDone") {
if (self._timelapse_popup !== undefined) {
self._timelapse_popup.remove();
}
self._timelapse_popup = new PNotify({
title: gettext("Timelapse ready"),
text: _.sprintf(gettext("New timelapse %(movie_basename)s is done rendering."), payload),
type: "success",
callbacks: {
before_close: function(notice) {
if (self._timelapse_popup == notice) {
self._timelapse_popup = undefined;
}
}
}
});
} else if (type == "MovieFailed") {
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_basename)s failed with return code %(returncode)s"), payload) + "</p>";
html += pnotifyAdditionalInfo('<pre style="overflow: auto">' + payload.error + '</pre>');
if (self._timelapse_popup !== undefined) {
self._timelapse_popup.remove();
}
self._timelapse_popup = new PNotify({
title: gettext("Rendering failed"),
text: html,
type: "error",
hide: false,
callbacks: {
before_close: function(notice) {
if (self._timelapse_popup == notice) {
self._timelapse_popup = undefined;
}
}
}
});
} else if (type == "PostRollStart") {
var title = gettext("Capturing timelapse postroll");
var text;
if (!payload.postroll_duration) {
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take only a moment..."), format);
} else {
format = {
time: moment().add(payload.postroll_duration, "s").format("LT")
};
if (payload.postroll_duration > 60) {
format.duration = _.sprintf(gettext("%(minutes)d min"), {minutes: payload.postroll_duration / 60});
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."), format);
} else {
format.duration = _.sprintf(gettext("%(seconds)d sec"), {seconds: payload.postroll_duration});
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take approximately %(duration)s..."), format);
}
}
if (self._timelapse_popup !== undefined) {
self._timelapse_popup.remove();
}
self._timelapse_popup = new PNotify({
title: title,
text: text,
hide: false,
callbacks: {
before_close: function(notice) {
if (self._timelapse_popup == notice) {
self._timelapse_popup = undefined;
}
}
}
});
} else if (type == "SlicingStarted") {
if (type == "SlicingStarted") {
gcodeUploadProgress.addClass("progress-striped").addClass("active");
gcodeUploadProgressBar.css("width", "100%");
if (payload.progressAvailable) {
@@ -422,6 +345,4 @@ function DataUpdater(allViewModels) {
}
}
};
self.connect();
}
+20 -11
View File
@@ -276,8 +276,6 @@ $(function() {
}
log.info("... dependency resolution done");
var dataUpdater = new DataUpdater(allViewModels);
//~~ Custom knockout.js bindings
ko.bindingHandlers.popover = {
@@ -517,14 +515,6 @@ $(function() {
// reload overlay
$("#reloadui_overlay_reload").click(function() { location.reload(); });
//~~ Starting up the app
_.each(allViewModels, function(viewModel) {
if (viewModel.hasOwnProperty("onStartup")) {
viewModel.onStartup();
}
});
//~~ view model binding
var bindViewModels = function() {
@@ -614,12 +604,31 @@ $(function() {
}
});
});
log.info("Application startup complete");
};
if (!_.has(viewModelMap, "settingsViewModel")) {
throw new Error("settingsViewModel is missing, can't run UI")
}
viewModelMap["settingsViewModel"].requestData(bindViewModels);
var dataUpdaterConnectCallback = function() {
log.info("Finalizing application startup");
//~~ Starting up the app
_.each(allViewModels, function(viewModel) {
if (viewModel.hasOwnProperty("onStartup")) {
viewModel.onStartup();
}
});
viewModelMap["settingsViewModel"].requestData(bindViewModels);
};
log.info("Initial application setup done, connecting to server...");
var dataUpdater = new DataUpdater(allViewModels);
dataUpdater.connect(dataUpdaterConnectCallback);
}
);
@@ -93,7 +93,7 @@ $(function() {
} else if (!self.isOperational() && !connectionTab.hasClass("in")) {
connectionTab.collapse("show");
}
}
};
self._processStateData = function(data) {
self.previousIsOperational = self.isOperational();
@@ -106,7 +106,7 @@ $(function() {
self.isReady(data.flags.ready);
self.isLoading(data.flags.loading);
if (self.loginState.isAdmin() && self.previousIsOperational != self.isOperational()) {
if (self.loginState.isUser() && self.previousIsOperational != self.isOperational()) {
// only open or close if the panel is visible (for admins) and
// the state just changed to avoid thwarting manual open/close
self.openOrCloseOnStateChange();
@@ -442,12 +442,7 @@ $(function() {
self.requestData(payload.remote, "sdcard");
};
self.onServerConnect = function(payload) {
self._enableDragNDrop(true);
self.requestData();
};
self.onServerReconnect = function(payload) {
self.onServerConnect = self.onServerReconnect = function(payload) {
self._enableDragNDrop(true);
self.requestData();
};
@@ -129,11 +129,7 @@ $(function() {
self.allViewModels = allViewModels;
};
self.onDataUpdaterReconnect = function() {
self.requestData();
};
self.onStartupComplete = function() {
self.onServerConnect = self.onServerReconnect = function() {
self.requestData();
};
}
@@ -102,6 +102,7 @@ $(function() {
if (selectedSlicer != undefined) {
self.slicer(selectedSlicer);
self.profilesForSlicer(selectedSlicer);
}
self.defaultSlicer = selectedSlicer;
@@ -4,6 +4,8 @@ $(function() {
self.loginState = parameters[0];
self.timelapsePopup = undefined;
self.defaultFps = 25;
self.defaultPostRoll = 0;
self.defaultInterval = 10;
@@ -227,11 +229,88 @@ $(function() {
});
};
self.displayTimelapsePopup = function(options) {
if (self.timelapsePopup !== undefined) {
self.timelapsePopup.remove();
}
_.extend(options, {
callbacks: {
before_close: function(notice) {
if (self.timelapsePopup == notice) {
self.timelapsePopup = undefined;
}
}
}
});
self.timelapsePopup = new PNotify(options);
};
self.onDataUpdaterReconnect = function() {
self.requestData();
};
self.onEventPostRollStart = function(payload) {
var title = gettext("Capturing timelapse postroll");
var text;
if (!payload.postroll_duration) {
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take only a moment..."), format);
} else {
var format = {
time: moment().add(payload.postroll_duration, "s").format("LT")
};
if (payload.postroll_duration > 60) {
format.duration = _.sprintf(gettext("%(minutes)d min"), {minutes: payload.postroll_duration / 60});
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."), format);
} else {
format.duration = _.sprintf(gettext("%(seconds)d sec"), {seconds: payload.postroll_duration});
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take approximately %(duration)s..."), format);
}
}
self.displayTimelapsePopup({
title: title,
text: text,
hide: false
});
};
self.onEventMovieRendering = function(payload) {
self.displayTimelapsePopup({
title: gettext("Rendering timelapse"),
text: _.sprintf(gettext("Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."), payload),
hide: false
});
};
self.onEventMovieFailed = function(payload) {
var html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s failed with return code %(returncode)s"), payload) + "</p>";
html += pnotifyAdditionalInfo('<pre style="overflow: auto">' + payload.error + '</pre>');
self.displayTimelapsePopup({
title: gettext("Rendering failed"),
text: html,
type: "error",
hide: false
});
};
self.onEventMovieDone = function(payload) {
self.displayTimelapsePopup({
title: gettext("Timelapse ready"),
text: _.sprintf(gettext("New timelapse %(movie_prefix)s is done rendering."), payload),
type: "success",
callbacks: {
before_close: function(notice) {
if (self.timelapsePopup == notice) {
self.timelapsePopup = undefined;
}
}
}
});
self.requestData();
};
@@ -107,7 +107,7 @@
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Abort') }}</button>
<button class="btn btn-primary" data-bind="click: function() { $root.users.confirmUserSettingsDialog(); }">{{ _('Confirm') }}</button>
<button class="btn btn-primary" data-bind="click: function() { $root.users.confirmEditUser(); }">{{ _('Confirm') }}</button>
</div>
</div>
@@ -55,4 +55,6 @@
<input type="text" class="input-mini text-right" data-bind="value: server_diskspace_critical_str">
</div>
</div>
<p>{% trans %}Provide values including size unit. Allowed units are: b, byte, bytes, kb, mb, gb, tb (case insensitive). Example: <code>5MB</code>, <code>500KB</code>{% endtrans %}</p>
</form>
@@ -94,7 +94,10 @@
<td class="timelapse_unrendered_name" data-bind="text: name"></td>
<td class="timelapse_unrendered_count" data-bind="text: count"></td>
<td class="timelapse_unrendered_size" data-bind="text: size"></td>
<td class="timelapse_unrendered_action"><a href="javascript:void(0)" title="{{ _('Delete unrendered timelapse') }}" class="icon-trash" data-bind="click: function() { if ($root.loginState.isUser()) { $parent.removeUnrendered($data.name); } else { return; } }, css: {disabled: !$root.loginState.isUser()}"></a>&nbsp;|&nbsp;<a href="javascript:void(0)" title="{{ _('Render timelapse') }}" class="icon-facetime-video" data-bind="click: function() { if ($root.loginState.isUser() && !$root.isBusy()) { $parent.renderUnrendered($data.name); } else { return; } }, css: {disabled: !$root.loginState.isUser() || $root.isBusy()}"></a></td>
<td class="timelapse_unrendered_action">
<span data-bind="visible: processing"><i class="icon-refresh icon-spin"></i></span>
<span data-bind="visible: !processing"><a href="javascript:void(0)" title="{{ _('Delete unrendered timelapse') }}" class="icon-trash" data-bind="click: function() { if ($root.loginState.isUser()) { $parent.removeUnrendered($data.name); } else { return; } }, css: {disabled: !$root.loginState.isUser()}"></a>&nbsp;|&nbsp;<a href="javascript:void(0)" title="{{ _('Render timelapse') }}" class="icon-facetime-video" data-bind="click: function() { if ($root.loginState.isUser() && !$root.isBusy()) { $parent.renderUnrendered($data.name); } else { return; } }, css: {disabled: !$root.loginState.isUser() || $root.isBusy()}"></a></span>
</td>
</tr>
</tbody>
</table>
+83 -39
View File
@@ -44,6 +44,12 @@ _valid_timelapse_types = ["off", "timed", "zchange"]
# callbacks for timelapse config updates
_update_callbacks = []
# lock for timelapse cleanup, must be re-entrant
_cleanup_lock = threading.RLock()
# lock for timelapse job
_job_lock = threading.RLock()
def _extract_prefix(filename):
"""
@@ -75,10 +81,14 @@ def get_finished_timelapses():
def get_unrendered_timelapses():
global _job_lock
global current
delete_old_unrendered_timelapses()
basedir = settings().getBaseFolder("timelapse_tmp")
jobs = collections.defaultdict(lambda: dict(count=0, size=None, bytes=0, date=None, timestamp=None))
for osFile in os.listdir(basedir):
if not fnmatch.fnmatch(osFile, "*.jpg"):
continue
@@ -93,23 +103,37 @@ def get_unrendered_timelapses():
if jobs[prefix]["timestamp"] is None or statResult.st_ctime < jobs[prefix]["timestamp"]:
jobs[prefix]["timestamp"] = statResult.st_ctime
def finalize_fields(job):
job["size"] = util.get_formatted_size(job["bytes"])
job["date"] = util.get_formatted_datetime(datetime.datetime.fromtimestamp(job["timestamp"]))
del job["timestamp"]
return job
with _job_lock:
global current_render_job
return sorted([util.dict_merge(dict(name=key), finalize_fields(value)) for key, value in jobs.items()], key=lambda x: x["name"])
def finalize_fields(prefix, job):
currently_recording = current is not None and current.prefix == prefix
currently_rendering = current_render_job is not None and current_render_job["prefix"] == prefix
job["size"] = util.get_formatted_size(job["bytes"])
job["date"] = util.get_formatted_datetime(datetime.datetime.fromtimestamp(job["timestamp"]))
job["recording"] = currently_recording
job["rendering"] = currently_rendering
job["processing"] = currently_recording or currently_rendering
del job["timestamp"]
return job
return sorted([util.dict_merge(dict(name=key), finalize_fields(key, value)) for key, value in jobs.items()], key=lambda x: x["name"])
def delete_unrendered_timelapse(name):
global _cleanup_lock
basedir = settings().getBaseFolder("timelapse_tmp")
for filename in os.listdir(basedir):
try:
if fnmatch.fnmatch(filename, "{}*.jpg".format(name)):
os.remove(os.path.join(basedir, filename))
except:
logging.getLogger(__name__).exception("Error while processing file {} during cleanup".format(filename))
with _cleanup_lock:
for filename in os.listdir(basedir):
try:
if fnmatch.fnmatch(filename, "{}*.jpg".format(name)):
os.remove(os.path.join(basedir, filename))
except:
if logging.getLogger(__name__).isEnabledFor(logging.DEBUG):
logging.getLogger(__name__).exception("Error while processing file {} during cleanup".format(filename))
def render_unrendered_timelapse(name, gcode=None, postfix=None, fps=25):
@@ -131,53 +155,65 @@ def render_unrendered_timelapse(name, gcode=None, postfix=None, fps=25):
def delete_old_unrendered_timelapses():
global _cleanup_lock
basedir = settings().getBaseFolder("timelapse_tmp")
clean_after_days = settings().getInt(["webcam", "cleanTmpAfterDays"])
cutoff = time.time() - clean_after_days * 24 * 60 * 60
prefixes_to_clean = []
for filename in os.listdir(basedir):
try:
path = os.path.join(basedir, filename)
prefix = _extract_prefix(filename)
if prefix is None:
# might be an old tmp_00000.jpg kinda frame. we can't
# render those easily anymore, so delete that stuff
if _old_capture_format_re.match(filename):
os.remove(path)
continue
with _cleanup_lock:
for filename in os.listdir(basedir):
try:
path = os.path.join(basedir, filename)
if prefix in prefixes_to_clean:
continue
prefix = _extract_prefix(filename)
if prefix is None:
# might be an old tmp_00000.jpg kinda frame. we can't
# render those easily anymore, so delete that stuff
if _old_capture_format_re.match(filename):
os.remove(path)
continue
if os.path.getmtime(path) < cutoff:
prefixes_to_clean.append(prefix)
except:
logging.getLogger(__name__).exception("Error while processing file {} during cleanup".format(filename))
if prefix in prefixes_to_clean:
continue
for prefix in prefixes_to_clean:
delete_unrendered_timelapse(prefix)
if os.path.getmtime(path) < cutoff:
prefixes_to_clean.append(prefix)
except:
if logging.getLogger(__name__).isEnabledFor(logging.DEBUG):
logging.getLogger(__name__).exception("Error while processing file {} during cleanup".format(filename))
for prefix in prefixes_to_clean:
delete_unrendered_timelapse(prefix)
logging.getLogger(__name__).info("Deleted old unrendered timelapse {}".format(prefix))
def _create_render_start_handler(name, gcode=None):
def f(movie):
global current_render_job
event_payload = {"gcode": gcode if gcode is not None else "unknown",
"movie": movie,
"movie_basename": os.path.basename(movie)}
current_render_job = event_payload
global _job_lock
with _job_lock:
global current_render_job
event_payload = {"gcode": gcode if gcode is not None else "unknown",
"movie": movie,
"movie_basename": os.path.basename(movie),
"movie_prefix": name}
current_render_job = dict(prefix=name)
current_render_job.update(event_payload)
eventManager().fire(Events.MOVIE_RENDERING, event_payload)
return f
def _create_render_success_handler(name, gcode=None):
def f(movie):
delete_unrendered_timelapse(name)
event_payload = {"gcode": gcode if gcode is not None else "unknown",
"movie": movie,
"movie_basename": os.path.basename(movie)}
"movie_basename": os.path.basename(movie),
"movie_prefix": name}
eventManager().fire(Events.MOVIE_DONE, event_payload)
delete_unrendered_timelapse(name)
return f
@@ -185,7 +221,8 @@ def _create_render_fail_handler(name, gcode=None):
def f(movie, returncode=255, stdout="Unknown error", stderr="Unknown error"):
event_payload = {"gcode": gcode if gcode is not None else "unknown",
"movie": movie,
"movie_basename": os.path.basename(movie)}
"movie_basename": os.path.basename(movie),
"movie_prefix": name}
payload = dict(event_payload)
payload.update(dict(returncode=returncode, error=stderr))
eventManager().fire(Events.MOVIE_FAILED, payload)
@@ -195,7 +232,9 @@ def _create_render_fail_handler(name, gcode=None):
def _create_render_always_handler(name, gcode=None):
def f(movie):
global current_render_job
current_render_job = None
global _job_lock
with _job_lock:
current_render_job = None
return f
@@ -264,6 +303,7 @@ class Timelapse(object):
self._image_number = None
self._in_timelapse = False
self._gcode_file = None
self._file_prefix = None
self._post_roll = post_roll
self._on_post_roll_done = None
@@ -290,6 +330,10 @@ class Timelapse(object):
for (event, callback) in self.event_subscriptions():
eventManager().subscribe(event, callback)
@property
def prefix(self):
return self._file_prefix
@property
def post_roll(self):
return self._post_roll
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-05-04 13:26+0200\n"
"PO-Revision-Date: 2016-05-04 13:27+0100\n"
"POT-Creation-Date: 2016-06-08 11:03+0200\n"
"PO-Revision-Date: 2016-06-08 11:04+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19
msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know <strong>before</strong> upgrading."
msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du <strong>for</strong> dem Softwareupdate wissen solltest."
msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du <strong>vor</strong> dem Softwareupdate wissen solltest."
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22
#: src/octoprint/templates/dialogs/confirmation.jinja2:8
@@ -976,128 +976,73 @@ msgstr "Zugriff"
msgid "Interface"
msgstr "Interface"
#: src/octoprint/static/js/app/dataupdater.js:94
#: src/octoprint/static/js/app/dataupdater.js:129
#: src/octoprint/static/js/app/dataupdater.js:92
#: src/octoprint/static/js/app/dataupdater.js:127
#: src/octoprint/static/js/app/helpers.js:451
#: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline"
msgstr "Der Server ist offline"
#: src/octoprint/static/js/app/dataupdater.js:95
#: src/octoprint/static/js/app/dataupdater.js:93
msgid "The server appears to be offline, at least I'm not getting any response from it. I'll try to reconnect automatically <strong>over the next couple of minutes</strong>, however you are welcome to try a manual reconnect anytime using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich werde <strong>in den nächsten Minuten</strong> versuchen mich erneut zu verbinden, aber Du kannst mittels des folgenden Buttons auch jederzeit einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:130
#: src/octoprint/static/js/app/dataupdater.js:128
msgid "The server appears to be offline, at least I'm not getting any response from it. I <strong>could not reconnect automatically</strong>, but you may try a manual reconnect using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich <strong>konnte mich nicht automatisch neu verbinden</strong>, aber Du kannst mittels des folgenden Buttons einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:208
#: src/octoprint/static/js/app/dataupdater.js:314
#: src/octoprint/static/js/app/dataupdater.js:206
#: src/octoprint/static/js/app/dataupdater.js:226
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/dataupdater.js:230
msgid "Rendering timelapse"
msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid "Now rendering timelapse %(movie_basename)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_basename)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/dataupdater.js:244
msgid "Timelapse ready"
msgstr "Zeitrafferaufnahme fertig"
#: src/octoprint/static/js/app/dataupdater.js:245
#, python-format
msgid "New timelapse %(movie_basename)s is done rendering."
msgstr "Neue Zeitrafferaufnahme %(movie_basename)s wurde fertig gerendert"
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Rendering of timelapse %(movie_basename)s failed with return code %(returncode)s"
msgstr "Rendering der Zeitrafferaufnahme %(movie_basename)s fehlgeschlagen mit Returncode %(returncode)s"
#: src/octoprint/static/js/app/dataupdater.js:263
msgid "Rendering failed"
msgstr "Rendering fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:276
msgid "Capturing timelapse postroll"
msgstr "Zeichne Timelapse-Postroll auf"
#: src/octoprint/static/js/app/dataupdater.js:280
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird nur einen Moment dauern..."
#: src/octoprint/static/js/app/dataupdater.js:287
#, python-format
msgid "%(minutes)d min"
msgstr "%(minutes)d Min"
#: src/octoprint/static/js/app/dataupdater.js:288
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern (also etwa bis %(time)s)..."
#: src/octoprint/static/js/app/dataupdater.js:290
#, python-format
msgid "%(seconds)d sec"
msgstr "%(seconds) Sek"
#: src/octoprint/static/js/app/dataupdater.js:291
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern..."
#: src/octoprint/static/js/app/dataupdater.js:316
#: src/octoprint/static/js/app/dataupdater.js:228
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:332
#: src/octoprint/static/js/app/dataupdater.js:244
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/dataupdater.js:333
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:337
#: src/octoprint/static/js/app/dataupdater.js:249
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/dataupdater.js:343
#: src/octoprint/static/js/app/dataupdater.js:255
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:344
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:350
#: src/octoprint/static/js/app/dataupdater.js:358
#: src/octoprint/static/js/app/dataupdater.js:262
#: src/octoprint/static/js/app/dataupdater.js:270
msgid "Unhandled communication error"
msgstr "Unbehandelter Kommunikationsfehler"
#: src/octoprint/static/js/app/dataupdater.js:351
#: src/octoprint/static/js/app/dataupdater.js:263
#, python-format
msgid "There was an unhandled error while talking to the printer. Due to that the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher wurder der laufende Druckauftrag abgebrochen. Fehler: %(firmwareError)s"
#: src/octoprint/static/js/app/dataupdater.js:359
#: src/octoprint/static/js/app/dataupdater.js:271
#, python-format
msgid "The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher hat OctoPrint die Verbindung getrennt. Fehler: %(error)s"
@@ -1550,6 +1495,61 @@ msgstr "zeige %(displayed)d Zeilen (Buffer voll)"
msgid "showing %(displayed)d lines"
msgstr "zeige %(displayed)d Zeilen"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:255
msgid "Capturing timelapse postroll"
msgstr "Zeichne Timelapse-Postroll auf"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:259
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird nur einen Moment dauern..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:266
#, python-format
msgid "%(minutes)d min"
msgstr "%(minutes)d Min"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:267
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern (also etwa bis %(time)s)..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:269
#, python-format
msgid "%(seconds)d sec"
msgstr "%(seconds) Sek"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:270
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:283
msgid "Rendering timelapse"
msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:284
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:290
#, python-format
msgid "Rendering of timelapse %(movie_prefix)s failed with return code %(returncode)s"
msgstr "Rendering der Zeitrafferaufnahme %(movie_prefix)s fehlgeschlagen mit Returncode %(returncode)s"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:294
msgid "Rendering failed"
msgstr "Rendering fehlgeschlagen"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:303
msgid "Timelapse ready"
msgstr "Zeitrafferaufnahme fertig"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:304
#, python-format
msgid "New timelapse %(movie_prefix)s is done rendering."
msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
#: src/octoprint/static/js/app/viewmodels/usersettings.js:10
msgid "Site default"
msgstr "Seitenvoreinstellung"
@@ -1994,6 +1994,10 @@ msgstr "Warnung"
msgid "Critical"
msgstr "Kritisch"
#: src/octoprint/templates/dialogs/settings/folders.jinja2:59
msgid "Provide values including size unit. Allowed units are: b, byte, bytes, kb, mb, gb, tb (case insensitive). Example: <code>5MB</code>, <code>500KB</code>"
msgstr "Wert inklusive Größeneinheit. Erlaubte Einheiten sind: b, byte, bytes, kb, mb, gb, tb (Groß-/Kleinschreibung irrelevant). Beispiel: <code>5MB</code>, <code>500KB</code>"
#: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3
msgid "Before print job starts"
msgstr "Vor dem Start eines Druckjobs"
@@ -2826,11 +2830,11 @@ msgstr "Ungerenderte Zeitrafferaufnahmen"
msgid "Frames"
msgstr "Frames"
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Delete unrendered timelapse"
msgstr "Ungerenderte Zeitrafferaufnahme löschen"
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Render timelapse"
msgstr "Zeitrafferaufnahme rendern"
+72 -9
View File
@@ -206,7 +206,7 @@ def get_free_bytes(path):
return psutil.disk_usage(path).free
def get_dos_filename(origin, existing_filenames=None, extension=None, **kwargs):
def get_dos_filename(input, existing_filenames=None, extension=None, whitelisted_extensions=None, **kwargs):
"""
Converts the provided input filename to a 8.3 DOS compatible filename. If ``existing_filenames`` is provided, the
conversion result will be guaranteed not to collide with any of the filenames provided thus.
@@ -219,6 +219,8 @@ def get_dos_filename(origin, existing_filenames=None, extension=None, **kwargs):
Optional.
extension (string): The .3 file extension to use for the generated filename. If not provided, the extension of
the provided ``filename`` will simply be truncated to 3 characters.
whitelisted_extensions (list): A list of extensions on ``input`` that will be left as-is instead of
exchanging for ``extension``.
kwargs (dict): Additional keyword arguments to provide to :func:`find_collision_free_name`.
Returns:
@@ -228,16 +230,43 @@ def get_dos_filename(origin, existing_filenames=None, extension=None, **kwargs):
Raises:
ValueError: No 8.3 compatible name could be found that doesn't collide with the provided ``existing_filenames``.
Examples:
>>> get_dos_filename("test1234.gco")
u'test1234.gco'
>>> get_dos_filename("test1234.gcode")
u'test1234.gco'
>>> get_dos_filename("test12345.gco")
u'test12~1.gco'
>>> get_dos_filename("test1234.fnord", extension="gco")
u'test1234.gco'
>>> get_dos_filename("auto0.g", extension="gco")
u'auto0.gco'
>>> get_dos_filename("auto0.g", extension="gco", whitelisted_extensions=["g"])
u'auto0.g'
>>> get_dos_filename(None)
>>> get_dos_filename("foo")
u'foo'
"""
if origin is None:
if input is None:
return None
if existing_filenames is None:
existing_filenames = []
filename, ext = os.path.splitext(origin)
if extension is None:
if extension is not None:
extension = extension.lower()
if whitelisted_extensions is None:
whitelisted_extensions = []
filename, ext = os.path.splitext(input)
ext = ext.lower()
ext = ext[1:] if ext.startswith(".") else ext
if ext in whitelisted_extensions or extension is None:
extension = ext
return find_collision_free_name(filename, extension, existing_filenames, **kwargs)
@@ -286,9 +315,36 @@ def find_collision_free_name(filename, extension, existing_filenames, max_power=
Raises:
ValueError: No collision free name could be found.
"""
# TODO unit test!
Examples:
>>> find_collision_free_name("test1234", "gco", [])
u'test1234.gco'
>>> find_collision_free_name("test1234", "gcode", [])
u'test1234.gco'
>>> find_collision_free_name("test12345", "gco", [])
u'test12~1.gco'
>>> find_collision_free_name("test 123", "gco", [])
u'test_123.gco'
>>> find_collision_free_name("test1234", "g o", [])
u'test1234.g_o'
>>> find_collision_free_name("test12345", "gco", ["test12~1.gco"])
u'test12~2.gco'
>>> many_files = ["test12~{}.gco".format(x) for x in range(10)[1:]]
>>> find_collision_free_name("test12345", "gco", many_files)
u'test1~10.gco'
>>> many_more_files = many_files + ["test1~{}.gco".format(x) for x in range(10, 99)]
>>> find_collision_free_name("test12345", "gco", many_more_files)
u'test1~99.gco'
>>> many_more_files_plus_one = many_more_files + ["test1~99.gco"]
>>> find_collision_free_name("test12345", "gco", many_more_files_plus_one)
Traceback (most recent call last):
...
ValueError: Can't create a collision free filename
>>> find_collision_free_name("test12345", "gco", many_more_files_plus_one, max_power=3)
u'test~100.gco'
"""
if not isinstance(filename, unicode):
filename = unicode(filename)
@@ -302,14 +358,21 @@ def find_collision_free_name(filename, extension, existing_filenames, max_power=
extension = make_valid(extension)
extension = extension[:3] if len(extension) > 3 else extension
if len(filename) <= 8 and not filename + "." + extension in existing_filenames:
full_name_format = u"{filename}.{extension}" if extension else u"{filename}"
result = full_name_format.format(filename=filename,
extension=extension)
if len(filename) <= 8 and not result in existing_filenames:
# early exit
return filename + "." + extension
return result
counter = 1
power = 1
prefix_format = u"{segment}~{counter}"
while counter < (10 ** max_power):
result = filename[:(6 - power + 1)] + "~" + str(counter) + "." + extension
prefix = prefix_format.format(segment=filename[:(6 - power + 1)], counter=str(counter))
result = full_name_format.format(filename=prefix,
extension=extension)
if result not in existing_filenames:
return result
counter += 1
Binary file not shown.
+82 -78
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-05-04 13:26+0200\n"
"PO-Revision-Date: 2016-05-04 13:27+0100\n"
"POT-Creation-Date: 2016-06-08 11:03+0200\n"
"PO-Revision-Date: 2016-06-08 11:04+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19
msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know <strong>before</strong> upgrading."
msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du <strong>for</strong> dem Softwareupdate wissen solltest."
msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du <strong>vor</strong> dem Softwareupdate wissen solltest."
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22
#: src/octoprint/templates/dialogs/confirmation.jinja2:8
@@ -976,128 +976,73 @@ msgstr "Zugriff"
msgid "Interface"
msgstr "Interface"
#: src/octoprint/static/js/app/dataupdater.js:94
#: src/octoprint/static/js/app/dataupdater.js:129
#: src/octoprint/static/js/app/dataupdater.js:92
#: src/octoprint/static/js/app/dataupdater.js:127
#: src/octoprint/static/js/app/helpers.js:451
#: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline"
msgstr "Der Server ist offline"
#: src/octoprint/static/js/app/dataupdater.js:95
#: src/octoprint/static/js/app/dataupdater.js:93
msgid "The server appears to be offline, at least I'm not getting any response from it. I'll try to reconnect automatically <strong>over the next couple of minutes</strong>, however you are welcome to try a manual reconnect anytime using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich werde <strong>in den nächsten Minuten</strong> versuchen mich erneut zu verbinden, aber Du kannst mittels des folgenden Buttons auch jederzeit einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:130
#: src/octoprint/static/js/app/dataupdater.js:128
msgid "The server appears to be offline, at least I'm not getting any response from it. I <strong>could not reconnect automatically</strong>, but you may try a manual reconnect using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich <strong>konnte mich nicht automatisch neu verbinden</strong>, aber Du kannst mittels des folgenden Buttons einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:208
#: src/octoprint/static/js/app/dataupdater.js:314
#: src/octoprint/static/js/app/dataupdater.js:206
#: src/octoprint/static/js/app/dataupdater.js:226
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/dataupdater.js:230
msgid "Rendering timelapse"
msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid "Now rendering timelapse %(movie_basename)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_basename)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/dataupdater.js:244
msgid "Timelapse ready"
msgstr "Zeitrafferaufnahme fertig"
#: src/octoprint/static/js/app/dataupdater.js:245
#, python-format
msgid "New timelapse %(movie_basename)s is done rendering."
msgstr "Neue Zeitrafferaufnahme %(movie_basename)s wurde fertig gerendert"
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Rendering of timelapse %(movie_basename)s failed with return code %(returncode)s"
msgstr "Rendering der Zeitrafferaufnahme %(movie_basename)s fehlgeschlagen mit Returncode %(returncode)s"
#: src/octoprint/static/js/app/dataupdater.js:263
msgid "Rendering failed"
msgstr "Rendering fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:276
msgid "Capturing timelapse postroll"
msgstr "Zeichne Timelapse-Postroll auf"
#: src/octoprint/static/js/app/dataupdater.js:280
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird nur einen Moment dauern..."
#: src/octoprint/static/js/app/dataupdater.js:287
#, python-format
msgid "%(minutes)d min"
msgstr "%(minutes)d Min"
#: src/octoprint/static/js/app/dataupdater.js:288
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern (also etwa bis %(time)s)..."
#: src/octoprint/static/js/app/dataupdater.js:290
#, python-format
msgid "%(seconds)d sec"
msgstr "%(seconds) Sek"
#: src/octoprint/static/js/app/dataupdater.js:291
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern..."
#: src/octoprint/static/js/app/dataupdater.js:316
#: src/octoprint/static/js/app/dataupdater.js:228
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:332
#: src/octoprint/static/js/app/dataupdater.js:244
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/dataupdater.js:333
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:337
#: src/octoprint/static/js/app/dataupdater.js:249
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/dataupdater.js:343
#: src/octoprint/static/js/app/dataupdater.js:255
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:344
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:350
#: src/octoprint/static/js/app/dataupdater.js:358
#: src/octoprint/static/js/app/dataupdater.js:262
#: src/octoprint/static/js/app/dataupdater.js:270
msgid "Unhandled communication error"
msgstr "Unbehandelter Kommunikationsfehler"
#: src/octoprint/static/js/app/dataupdater.js:351
#: src/octoprint/static/js/app/dataupdater.js:263
#, python-format
msgid "There was an unhandled error while talking to the printer. Due to that the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher wurder der laufende Druckauftrag abgebrochen. Fehler: %(firmwareError)s"
#: src/octoprint/static/js/app/dataupdater.js:359
#: src/octoprint/static/js/app/dataupdater.js:271
#, python-format
msgid "The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher hat OctoPrint die Verbindung getrennt. Fehler: %(error)s"
@@ -1550,6 +1495,61 @@ msgstr "zeige %(displayed)d Zeilen (Buffer voll)"
msgid "showing %(displayed)d lines"
msgstr "zeige %(displayed)d Zeilen"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:255
msgid "Capturing timelapse postroll"
msgstr "Zeichne Timelapse-Postroll auf"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:259
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird nur einen Moment dauern..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:266
#, python-format
msgid "%(minutes)d min"
msgstr "%(minutes)d Min"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:267
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s (so until %(time)s)..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern (also etwa bis %(time)s)..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:269
#, python-format
msgid "%(seconds)d sec"
msgstr "%(seconds) Sek"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:270
#, python-format
msgid "Now capturing timelapse post roll, this will take approximately %(duration)s..."
msgstr "Zeichne jetzt Timelapse-Postroll auf, dies wird voraussichtlich %(duration)s dauern..."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:283
msgid "Rendering timelapse"
msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:284
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:290
#, python-format
msgid "Rendering of timelapse %(movie_prefix)s failed with return code %(returncode)s"
msgstr "Rendering der Zeitrafferaufnahme %(movie_prefix)s fehlgeschlagen mit Returncode %(returncode)s"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:294
msgid "Rendering failed"
msgstr "Rendering fehlgeschlagen"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:303
msgid "Timelapse ready"
msgstr "Zeitrafferaufnahme fertig"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:304
#, python-format
msgid "New timelapse %(movie_prefix)s is done rendering."
msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
#: src/octoprint/static/js/app/viewmodels/usersettings.js:10
msgid "Site default"
msgstr "Seitenvoreinstellung"
@@ -1994,6 +1994,10 @@ msgstr "Warnung"
msgid "Critical"
msgstr "Kritisch"
#: src/octoprint/templates/dialogs/settings/folders.jinja2:59
msgid "Provide values including size unit. Allowed units are: b, byte, bytes, kb, mb, gb, tb (case insensitive). Example: <code>5MB</code>, <code>500KB</code>"
msgstr "Wert inklusive Größeneinheit. Erlaubte Einheiten sind: b, byte, bytes, kb, mb, gb, tb (Groß-/Kleinschreibung irrelevant). Beispiel: <code>5MB</code>, <code>500KB</code>"
#: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3
msgid "Before print job starts"
msgstr "Vor dem Start eines Druckjobs"
@@ -2826,11 +2830,11 @@ msgstr "Ungerenderte Zeitrafferaufnahmen"
msgid "Frames"
msgstr "Frames"
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Delete unrendered timelapse"
msgstr "Ungerenderte Zeitrafferaufnahme löschen"
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Render timelapse"
msgstr "Zeitrafferaufnahme rendern"
+92 -86
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.2.11.dev32+g76959e0.dirty\n"
"Project-Id-Version: OctoPrint 1.2.12.dev21+g5006b01.dirty\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-05-04 13:26+0200\n"
"POT-Creation-Date: 2016-06-08 11:03+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"
@@ -1045,14 +1045,14 @@ msgstr ""
msgid "Interface"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:94
#: src/octoprint/static/js/app/dataupdater.js:129
#: src/octoprint/static/js/app/dataupdater.js:92
#: src/octoprint/static/js/app/dataupdater.js:127
#: src/octoprint/static/js/app/helpers.js:451
#: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:95
#: src/octoprint/static/js/app/dataupdater.js:93
msgid ""
"The server appears to be offline, at least I'm not getting any response "
"from it. I'll try to reconnect automatically <strong>over the next couple"
@@ -1060,131 +1060,67 @@ msgid ""
"anytime using the button below."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:130
#: src/octoprint/static/js/app/dataupdater.js:128
msgid ""
"The server appears to be offline, at least I'm not getting any response "
"from it. I <strong>could not reconnect automatically</strong>, but you "
"may try a manual reconnect using the button below."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:208
#: src/octoprint/static/js/app/dataupdater.js:314
#: src/octoprint/static/js/app/dataupdater.js:206
#: src/octoprint/static/js/app/dataupdater.js:226
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:230
msgid "Rendering timelapse"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid ""
"Now rendering timelapse %(movie_basename)s. Due to performance reasons it"
" is not recommended to start a print job while a movie is still "
"rendering."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:244
msgid "Timelapse ready"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:245
#, python-format
msgid "New timelapse %(movie_basename)s is done rendering."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid ""
"Rendering of timelapse %(movie_basename)s failed with return code "
"%(returncode)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:263
msgid "Rendering failed"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:276
msgid "Capturing timelapse postroll"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:280
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:287
#, python-format
msgid "%(minutes)d min"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:288
#, python-format
msgid ""
"Now capturing timelapse post roll, this will take approximately "
"%(duration)s (so until %(time)s)..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:290
#, python-format
msgid "%(seconds)d sec"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:291
#, python-format
msgid ""
"Now capturing timelapse post roll, this will take approximately "
"%(duration)s..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:316
#: src/octoprint/static/js/app/dataupdater.js:228
msgid "Slicing ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
msgid "Slicing done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:322
#: src/octoprint/static/js/app/dataupdater.js:234
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:332
#: src/octoprint/static/js/app/dataupdater.js:244
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:333
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing failed"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:337
#: src/octoprint/static/js/app/dataupdater.js:249
msgid "Streaming ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:343
#: src/octoprint/static/js/app/dataupdater.js:255
msgid "Streaming done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:344
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:350
#: src/octoprint/static/js/app/dataupdater.js:358
#: src/octoprint/static/js/app/dataupdater.js:262
#: src/octoprint/static/js/app/dataupdater.js:270
msgid "Unhandled communication error"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:351
#: src/octoprint/static/js/app/dataupdater.js:263
#, python-format
msgid ""
"There was an unhandled error while talking to the printer. Due to that "
"the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:359
#: src/octoprint/static/js/app/dataupdater.js:271
#, python-format
msgid ""
"The was an unhandled error while talking to the printer. Due to that "
@@ -1655,6 +1591,69 @@ msgstr ""
msgid "showing %(displayed)d lines"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:255
msgid "Capturing timelapse postroll"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:259
msgid "Now capturing timelapse post roll, this will take only a moment..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:266
#, python-format
msgid "%(minutes)d min"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:267
#, python-format
msgid ""
"Now capturing timelapse post roll, this will take approximately "
"%(duration)s (so until %(time)s)..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:269
#, python-format
msgid "%(seconds)d sec"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:270
#, python-format
msgid ""
"Now capturing timelapse post roll, this will take approximately "
"%(duration)s..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:283
msgid "Rendering timelapse"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:284
#, python-format
msgid ""
"Now rendering timelapse %(movie_prefix)s. Due to performance reasons it "
"is not recommended to start a print job while a movie is still rendering."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:290
#, python-format
msgid ""
"Rendering of timelapse %(movie_prefix)s failed with return code "
"%(returncode)s"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:294
msgid "Rendering failed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:303
msgid "Timelapse ready"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/timelapse.js:304
#, python-format
msgid "New timelapse %(movie_prefix)s is done rendering."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/usersettings.js:10
msgid "Site default"
msgstr ""
@@ -2109,6 +2108,13 @@ msgstr ""
msgid "Critical"
msgstr ""
#: src/octoprint/templates/dialogs/settings/folders.jinja2:59
msgid ""
"Provide values including size unit. Allowed units are: b, byte, bytes, "
"kb, mb, gb, tb (case insensitive). Example: <code>5MB</code>, "
"<code>500KB</code>"
msgstr ""
#: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3
msgid "Before print job starts"
msgstr ""
@@ -3006,11 +3012,11 @@ msgstr ""
msgid "Frames"
msgstr ""
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Delete unrendered timelapse"
msgstr ""
#: src/octoprint/templates/tabs/timelapse.jinja2:97
#: src/octoprint/templates/tabs/timelapse.jinja2:99
msgid "Render timelapse"
msgstr ""