I plan to add additional data to the file that beside the filament length also information about the spool is shown like (material: PLA, name: Blabla,...)
I checked the API and found set_additional_metadata in the filemanager API (octoprint.filemanager — OctoPrint master documentation). But to avoid creating everything I am sure that there is another plugin adding metainformation to the uploaded file. Does anybody know if there is some out?
Not sure if it has all the details, but PrintJobHistory in combination with SpoolManager may get you where you want to be? But to answer your question, my thumbnail plugins use this option to add thumbnail url to the metadata and changes the web UI to allow showing the thumbnail in the file list.
@fieldOfView added variables to Cura for me to add material name,... in Gcode. I plan to enhance my plugin that it also adds this to the Gcode metadata which can be read from SpoolManager, ... in the future or simply shows for which material the Gcode was generated. That was a feature I missed...
I handled to overwrite the function generated the HTML code but I cannot merge the content. If I tried I does not see the string returned I see an "object Object" Text. I am totally not familiar with JS so what is going wrong? How can I convert the object (if everything is right) to a string that I can add some lines? I am sure this must be very easy.
You shouldn't have to do that, you should be able to inject your own text bits to the view model and just make sure that their binding is to the original scope. Here's an example for the inline thumbnail.
ich hab mich jetzt etwas damit befasst und folgender Code funktioniert. Ich hab mir nur überlegt ob es nicht eine elegantere Methode gibt und mich etwas mit JQuery beschäftigt (bin da totaler Neuling).
Ich hab mich aber gefragt ob es nicht schöner ist es vor jeder DOM Element einzufügen. Das Beispiel hab ich mal mit "size" probiert, aber es funktioniert nicht.