Hi there, I would find it useful if the announcement plugin channels could be made user configurable i.e the user could add additional rss feeds to monitor for changes.
For instance I have a Prusa Mk3 and would appreciate it if I could be informed upon Octoprint startup that a new firmware is available. Therefore I would like to add the Github release-rss-feed of the Prusa repo to the channel list.
I already tinkered a bit with adding a new entry into the announcement dict but that did not end in the expected outcome. I will have to invest a bit of time in understanding the way the plugin works, in order to implement the editability.
Any tips or thoughts about it, help is also appreciated?
How important is it to implement a sanity check for the user entered data? Can the plugin cause any harm if it try's to check a non existent feed or any gibberish the user entered?
If so, is there a best practice for implementing the integrity check, or what conventions need to be enforced?
Thank you, I think in combination with the M115 command and the upgrade firmware plugin it will make keeping the firmware up to date more comfortable.
I tried your example and it successfully created a cache for the new feed, but it did not display the contents. The mentioned bug seems to throw an exception which in turn stops the routine and leaves the message table unpopulated. Thus displaying no information for any stream.
I assume the handling of the open and close tags (partially converted to html) in the github feed is causing some parsing troubles?
On another note, can the config.yaml also be used to add a button to the upgrade firmware plugin which sends an M115 command to the printer and displays the returned text in a textbox next to it, or something like that?
wow, that's what I call fast support, works like a charm.
Thank you.
Ok, was just a guess from a short compare of the .xml and .atom feeds
Ok, I thought the config.yaml could override the layout or plugin properties of every part of octoprint. But it can only modify the values that are stored/read from the config.yaml.
So if I would like to add this Button, it needs to be added directly to the upgrade firmware plugin.
Sry, but I have not much experience with programming web applications/applications with a gui. I will need to learn how this is done in octoprint, is there a particular tutorial for the spare time coder, that you would recommend?
Yes you can patch it yourself.
That's what I did with my 1.3.9 version of octoprint.
Just replace the __init__.py file in the /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements folder with the fixed one.