-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
155 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# coding=utf-8 | ||
import sqlite3 | ||
import csv | ||
import os | ||
from multiprocessing import Lock | ||
|
||
__author__ = "Sven Lohrmann <[email protected]>" | ||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" | ||
__copyright__ = "Copyright (C) 2017 Sven Lohrmann - Released under terms of the AGPLv3 License" | ||
|
||
import sqlite3 | ||
import io | ||
import os | ||
from backports import csv | ||
from multiprocessing import Lock | ||
|
||
|
||
class FilamentManager(object): | ||
|
||
|
@@ -204,7 +206,7 @@ def import_data(self, dirpath): | |
|
||
def _import_from_csv(self, dirpath, tablename): | ||
filepath = os.path.join(dirpath, tablename + ".csv") | ||
with open(filepath, "r") as csv_file: | ||
with io.open(filepath, mode="r", encoding="utf-8") as csv_file: | ||
csv_reader = csv.reader(csv_file) | ||
header = next(csv_reader) | ||
columns = ",".join(header) | ||
|
@@ -219,7 +221,7 @@ def _export_to_csv(self, dirpath, tablename): | |
with self._db_lock, self._db as db: | ||
cursor = db.execute("SELECT * FROM " + tablename) | ||
filepath = os.path.join(dirpath, tablename + ".csv") | ||
with open(filepath, "w") as csv_file: | ||
with io.open(filepath, mode="w", encoding="utf-8") as csv_file: | ||
csv_writer = csv.writer(csv_file) | ||
csv_writer.writerow([i[0] for i in cursor.description]) | ||
csv_writer.writerows(cursor) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# coding=utf-8 | ||
import re | ||
|
||
__author__ = "Sven Lohrmann <[email protected]>" | ||
__author__ = "Sven Lohrmann <[email protected]> based on work by Gina Häußge <[email protected]>" | ||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" | ||
__copyright__ = "Copyright (C) 2017 Sven Lohrmann - Released under terms of the AGPLv3 License" | ||
|
||
|
@@ -29,7 +29,6 @@ def reset_extruded_length(self): | |
self.totalExtrusion = [0.0] * tools | ||
|
||
def parse(self, gcode, cmd): | ||
# taken from gcodeInterpreter.py | ||
if gcode == "G1" or gcode == "G0": # move | ||
e = self._get_float(cmd, self.regexE) | ||
if e is not None: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+171 Bytes
(100%)
octoprint_filamentmanager/translations/de/LC_MESSAGES/messages.mo
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: OctoPrint-FilamentManager 0.1.0\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2017-11-12 00:49+0100\n" | ||
"PO-Revision-Date: 2017-11-12 01:02+0100\n" | ||
"POT-Creation-Date: 2017-11-14 20:39+0100\n" | ||
"PO-Revision-Date: 2017-11-14 20:44+0100\n" | ||
"Last-Translator: Sven Lohrmann <[email protected]>\n" | ||
"Language: de\n" | ||
"Language-Team: de <[email protected]>\n" | ||
|
@@ -68,75 +68,91 @@ msgstr "" | |
msgid "Could not delete profile" | ||
msgstr "Konnte Profil nicht löschen" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:537 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:538 | ||
msgid "Delete profile?" | ||
msgstr "Profil löschen?" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:539 | ||
#, python-format | ||
msgid "" | ||
"You are about to delete the filament profile \"%s (%s)\". Please notice that it " | ||
"is not possible to delete profiles with associated spools." | ||
"You are about to delete the filament profile <strong>%s (%s)</strong>. Please " | ||
"note that it is not possible to delete profiles with associated spools." | ||
msgstr "" | ||
"Du bist im Begriff das Filamentprofil \"%s (%s)\" zu löschen. Bitte beachte, " | ||
"dass es nicht möglich ist Profile zu löschen die Spulen zugewiesen wurden." | ||
"Du bist im Begriff das Filament-Profil <strong>%s (%s)</strong> zu löschen. " | ||
"Bitte beachte, dass es nicht möglich ist Profile zu löschen die Spulen " | ||
"zugewiesen wurden." | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:585 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:542 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:645 | ||
#: octoprint_filamentmanager/templates/settings_profiledialog.jinja2:15 | ||
msgid "Delete" | ||
msgstr "Löschen" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:590 | ||
msgid "" | ||
"There was an unexpected error while saving the filament spool, please consult " | ||
"the logs." | ||
msgstr "" | ||
"Unerwarteter Fehler beim speichern der Filamentspule, bitte konsultiere das Log." | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:587 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:592 | ||
msgid "Could not add spool" | ||
msgstr "Konnte Spule nicht hinzufügen" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:610 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:615 | ||
msgid "" | ||
"There was an unexpected error while updating the filament spool, please consult " | ||
"the logs." | ||
msgstr "" | ||
"Unerwarteter Fehler beim Aktualisieren der Filamentspule, bitte konsultiere das " | ||
"Log." | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:612 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:617 | ||
msgid "Could not update spool" | ||
msgstr "Konnte Spule nicht aktualisieren" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:629 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:634 | ||
msgid "" | ||
"There was an unexpected error while removing the filament spool, please consult " | ||
"the logs." | ||
msgstr "" | ||
"Unerwarteter Fehler beim Löschen der Filamentspule, bitte konsultiere das Log." | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:631 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:636 | ||
msgid "Could not delete spool" | ||
msgstr "Konnte Spule nicht löschen" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:636 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:642 | ||
msgid "Delete spool?" | ||
msgstr "Spule löschen?" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:643 | ||
#, python-format | ||
msgid "You are about to delete the filament spool \"%s - %s (%s)\"." | ||
msgstr "Du bist im Begriff die Filamentspule \"%s - %s (%s)\" zu löschen." | ||
msgid "You are about to delete the filament spool <strong>%s - %s (%s)</strong>." | ||
msgstr "" | ||
"Du bist im Begriff die Filament-Spule <strong>%s - %s (%s)</strong> zu löschen." | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:681 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:691 | ||
msgid "Data import successfull" | ||
msgstr "Daten-Import erfolgreich" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:701 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:711 | ||
msgid "Data import failed" | ||
msgstr "Daten-Import fehlgeschlagen" | ||
|
||
#: octoprint_filamentmanager/static/js/filamentmanager.js:702 | ||
#: octoprint_filamentmanager/static/js/filamentmanager.js:712 | ||
msgid "Something went wrong, please consult the logs." | ||
msgstr "Etwas ist schief gelaufen, bitte konsultiere das Log." | ||
|
||
#: octoprint_filamentmanager/static/js/warning.js:95 | ||
#: octoprint_filamentmanager/static/js/warning.js:103 | ||
msgid "" | ||
"The current print job needs more material than what's remaining on the selected " | ||
"spool." | ||
msgstr "" | ||
"Der aktuelle Druckauftrag benötigt mehr Material als auf der ausgewählten Spule " | ||
"vorhanden ist." | ||
|
||
#: octoprint_filamentmanager/static/js/warning.js:96 | ||
#: octoprint_filamentmanager/static/js/warning.js:104 | ||
msgid "Insufficient filament" | ||
msgstr "Filament nicht ausreichend" | ||
|
||
|
@@ -292,10 +308,6 @@ msgstr "--- Neues Profil ---" | |
msgid "New" | ||
msgstr "Neu" | ||
|
||
#: octoprint_filamentmanager/templates/settings_profiledialog.jinja2:15 | ||
msgid "Delete" | ||
msgstr "Löschen" | ||
|
||
#: octoprint_filamentmanager/templates/settings_profiledialog.jinja2:16 | ||
msgid "Save profile" | ||
msgstr "Profil speichern" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,13 @@ | |
plugin_identifier = "filamentmanager" | ||
plugin_package = "octoprint_filamentmanager" | ||
plugin_name = "OctoPrint-FilamentManager" | ||
plugin_version = "0.4.0" | ||
plugin_version = "0.4.1" | ||
plugin_description = "Manage your spools and keep track of remaining filament on them" | ||
plugin_author = "Sven Lohrmann" | ||
plugin_author_email = "[email protected]" | ||
plugin_url = "https://github.com/malnvenshorn/OctoPrint-FilamentManager" | ||
plugin_license = "AGPLv3" | ||
plugin_requires = [] | ||
plugin_requires = ["backports.csv>=1.0.5,<1.1"] | ||
plugin_additional_data = [] | ||
plugin_additional_packages = [] | ||
plugin_ignored_packages = [] | ||
|
Binary file not shown.
Oops, something went wrong.