Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickthetait <tait@alephobjects.com>2016-05-16 21:00:40 +0300
committernickthetait <tait@alephobjects.com>2016-05-17 00:16:27 +0300
commitcbe1e5fbac0f3d8ed7b5c59c37a8a993ac527014 (patch)
tree4457d58ecd16a70bc4b04d99e30372b62ce962eb /scripts
parentb79f5f2e823c2308210a065e965a48049b3aae76 (diff)
Refactor profile linker script to improve maintainability
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/recreate_lulzbot_profiles.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/scripts/recreate_lulzbot_profiles.py b/scripts/recreate_lulzbot_profiles.py
index 9661818d4b..48d0964d2d 100755
--- a/scripts/recreate_lulzbot_profiles.py
+++ b/scripts/recreate_lulzbot_profiles.py
@@ -460,6 +460,20 @@ def get_material_display_name(material):
material_name += material_names[material]
return material_name
+
+def get_description(material):
+ description_data = ""
+ if is_experimental(material):
+ description_data = \
+ " * Experimental profile\n" + \
+ " use at your own risk!"
+ elif material in bed_prep_materials:
+ description_data = \
+ " Bed preparation required: \n" + \
+ " Apply a PVA-based glue stick \n" + \
+ " to bed surface before printing."
+ return description_data
+
def create_machine_type(machine_type, path, dir):
files = glob.glob(os.path.join(path, "*.ini"))
path = os.path.join(CURA_QUICKPRINT_DIR, machine_type)
@@ -489,15 +503,9 @@ def create_machine_type(machine_type, path, dir):
types = "Experimental"
f.write("material_types = %s\n" % types)
f.write("order = %d\n" % order)
- if is_experimental(material):
- f.write("description = \
- * Experimental profile\n\
- use at your own risk!")
- elif material in bed_prep_materials:
- f.write("description = \
- Bed preparation required: \n\
- Apply a PVA-based glue stick \n\
- to bed surface before printing.\n")
+ description_data = get_description(material)
+ if description_data is not "":
+ f.write("description = %s\n" % description_data)
if material_url.has_key(material):
referer = "?pk_campaign=software-cura"
f.write("url = %s%s\n" %(material_url[material], referer) )