Skip to content

Commit

Permalink
0.1.3 (#57)
Browse files Browse the repository at this point in the history
* reduced greediness of regular expression
* fix state panel image not showing in OctoPrint 1.5.0
* added release channels available in OctoPrint 1.5.0
  • Loading branch information
jneilliii authored Nov 30, 2020
1 parent ecfb947 commit d79bfb3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 44 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Check out my other plugins [here](https://plugins.octoprint.org/by_author/#jneil
- @tideline3d
- [SimplyPrint](https://simplyprint.dk/)
- [Andrew Beeman](https://github.com/Kiendeleo)
- [Calanish](https://github.com/calanish)

### Support My Efforts
I, jneilliii, programmed this plugin for fun and do my best effort to support those that have issues with it, please return the favor and leave me a tip or become a Patron if you find this plugin helpful and want me to continue future development.
Expand Down
14 changes: 12 additions & 2 deletions octoprint_prusaslicerthumbnails/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_template_configs(self):
def _extract_thumbnail(self, gcode_filename, thumbnail_filename):
import re
import base64
regex = r"(?:^; thumbnail begin \d+x\d+ \d+)(?:\n|\r\n?)((?:.+(?:\n|\r\n?))+)(?:^; thumbnail end)"
regex = r"(?:^; thumbnail begin \d+x\d+ \d+)(?:\n|\r\n?)((?:.+(?:\n|\r\n?))+?)(?:^; thumbnail end)"
lineNum = 0
collectedString = ""
with open(gcode_filename,"rb") as gcode_file:
Expand Down Expand Up @@ -159,9 +159,19 @@ def get_update_information(self):
user="jneilliii",
repo="OctoPrint-PrusaSlicerThumbnails",
current=self._plugin_version,
stable_branch=dict(
name="Stable", branch="master", comittish=["master"]
),
prerelease_branches=[
dict(
name="Release Candidate",
branch="rc",
comittish=["rc", "master"],
)
],

# update method: pip
pip="https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/releases/latest/download/{target_version}.zip"
pip="https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/{target_version}.zip"
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ $(function() {
if($('#prusalicer_state_thumbnail').length) {
$('#prusalicer_state_thumbnail > img').attr('src', file_data.thumbnail);
} else {
$('#state > div > hr:nth-child(4)').after('<div id="prusalicer_state_thumbnail" class="row-fluid"><img src="'+file_data.thumbnail+'" width="100%"/>\n<hr/></div>');
$('#state > div > hr:first').after('<div id="prusalicer_state_thumbnail" class="row-fluid"><img src="'+file_data.thumbnail+'" width="100%"/>\n<hr/></div>');
}
} else {
$('#prusalicer_state_thumbnail').remove();
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "PrusaSlicer Thumbnails"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.2"
plugin_version = "0.1.3"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit d79bfb3

Please sign in to comment.