Skip to content

Commit f238799

Browse files
committed
New Version 1.15.2
- EB #175, #179 Version check of 3rd party plugins, instead of just checking "is available" - B #178 "NoneCheck" if filesize is None Small enhancments - E #177 Notifier "Filamenttracking not possible" could be disabled - E GitHub Action for building the plugin instead of Travis
1 parent aaa642c commit f238799

File tree

8 files changed

+178
-82
lines changed

8 files changed

+178
-82
lines changed

.github/workflows/RELEASE_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [BugFix]
2+
- #xxx
3+
4+
## [Enhancement]
5+
- #xxx
6+
7+
## Counter
8+
![downloaded](https://img.shields.io/github/downloads/OllisGit/OctoPrint-FilamentManager/xxx/total)
9+
10+
## Support my Efforts
11+
12+
This plugin, as well as my [other plugins](https://github.com/OllisGit/) were developed in my spare time.
13+
If you like it, I would be thankful about a cup of coffee :)
14+
15+
[![More coffee, more code](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6SW5R6ZUKLB5E&source=url)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
###
2+
### Script for:
3+
### - build a zip file of the needed files/directories
4+
### - extract the version number from setup.py
5+
### - deploy a draft-release into github repository
6+
###
7+
name: Build Plugin Release - Action
8+
on: [push]
9+
jobs:
10+
Build-Release-ZIP-Action:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v2
15+
16+
- run: echo "Read current plugin version..."
17+
- run: export PLUGIN_VERSION=$(cat setup.py | grep 'plugin_version = "*"' | cut -d '"' -f2)
18+
- run: echo "Plugin Version $PLUGIN_VERSION ${PLUGIN_VERSION}"
19+
20+
- run: echo "Build ZIP"
21+
- run: zip -r master.zip * -i '\octoprint_*' 'translations' 'README.md' 'requirements.txt' 'setup.py'
22+
- name: List files in the repository
23+
run: |
24+
ls ${{ github.workspace }}
25+
26+
- name: version
27+
run: echo "::set-output name=version::$(cat setup.py | grep 'plugin_version = "*"' | cut -d '"' -f2)"
28+
id: version
29+
30+
- name: release
31+
uses: actions/create-release@v1
32+
id: create_release
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}
35+
with:
36+
draft: true
37+
prerelease: false
38+
release_name: V${{ steps.version.outputs.version }}-draft
39+
tag_name: ${{ steps.version.outputs.version }}-draft
40+
body_path: .github/workflows/RELEASE_TEMPLATE.md
41+
42+
- name: upload master.zip to release
43+
uses: actions/upload-release-asset@v1
44+
env:
45+
GITHUB_TOKEN: ${{ github.token }}
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: master.zip
49+
asset_name: master.zip
50+
asset_content_type: application/gzip
51+
52+
- run: echo "🍏 This job's status is ${{ job.status }}."
File renamed without changes.

octoprint_PrintJobHistory/__init__.py

+92-81
Large diffs are not rendered by default.

octoprint_PrintJobHistory/common/SettingsKeys.py

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44
class SettingsKeys():
55

6+
# All dependent P3rd Party Plugins
7+
PLUGIN_PREHEAT = { "key": "preheat", "minVersion": "0.4.0"}
8+
PLUGIN_FILAMENT_MANAGER = { "key": "filamentmanager", "minVersion": "1.7.2"}
9+
PLUGIN_DISPLAY_LAYER_PROGRESS = { "key": "DisplayLayerProgress", "minVersion": "1.26.0"}
10+
PLUGIN_SPOOL_MANAGER = { "key": "SpoolManager", "minVersion": "1.4.2"}
11+
PLUGIN_ULTIMAKER_FORMAT_PACKAGE = { "key": "UltimakerFormatPackage", "minVersion": "1.0.0"}
12+
PLUGIN_PRUSA_SLICER_THUMNAIL = { "key": "prusaslicerthumbnails", "minVersion": "1.0.0"}
13+
PLUGIN_COST_ESTIMATION = { "key": "costestimation", "minVersion": "3.4.0"}
14+
PLUGIN_PRINT_HISTORY = { "key": "printhistory", "minVersion": None}
15+
616
## General
717
SETTINGS_KEY_PLUGIN_DEPENDENCY_CHECK = "pluginCheckActivated"
818
SETTINGS_KEY_SHOW_PRINTJOB_DIALOG_AFTER_PRINT = "showPrintJobDialogAfterPrint"
@@ -22,6 +32,8 @@ class SettingsKeys():
2232
KEY_SELECTED_SPOOLMANAGER_PLUGIN = "SpoolManager Plugin" # visible inn plugin-settings
2333
KEY_SELECTED_FILAMENTMANAGER_PLUGIN = "FilamentManager Plugin" # visible inn plugin-settings
2434
KEY_SELECTED_NONE_PLUGIN = "none"
35+
SETTINGS_KEY_NO_NOTIFICATION_FILAMENTTRACKERING_PLUGIN_SELECTION = "noNotificationTrackingPluginSelection"
36+
2537

2638
SETTINGS_KEY_CURRENCY_SYMBOL = "currencySymbol"
2739
SETTINGS_KEY_CURRENCY_FORMAT = "currencyFormat"
@@ -58,3 +70,4 @@ class SettingsKeys():
5870

5971
# Other stuff
6072
SETTINGS_KEY_MESSAGE_CONFIRM_DATA = "messageConfirmData"
73+
SETTINGS_KEY_LAST_PLUGIN_DEPENDENCY_CHECK = "lastPluginDependencyCheck"

octoprint_PrintJobHistory/common/StringUtils.py

+2
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def get_formatted_size(num):
224224
Returns:
225225
string: The formatted byte count.
226226
"""
227+
if num is None:
228+
return ""
227229

228230
for x in ["B","KB","MB","GB"]:
229231
if num < 1024.0:

octoprint_PrintJobHistory/templates/PrintJobHistory_settings.jinja2

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
<label class="checkbox">
7272
<input style="margin-top:-4px" type="radio" name="selectedFilamentTrackerPlugin" value="FilamentManager Plugin" data-bind="checked: pluginSettings.selectedFilamentTrackerPlugin, enable:isFilamentManagerInstalled()"> FilamentManager-Plugin (Version 1.7.2+)
7373
</label>
74+
<label class="checkbox">
75+
<input type="checkbox" data-bind="checked: pluginSettings.noNotificationTrackingPluginSelection" > Don't notify me again
76+
</label>
7477
</label>
7578
</div>
7679
</div>

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "Print Job History"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "1.15.1"
17+
plugin_version = "1.15.2"
1818

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

0 commit comments

Comments
 (0)