From 06675f8314fb4b3e74048ce82d06b0ff232a1c51 Mon Sep 17 00:00:00 2001 From: Jaye Evins Date: Sun, 22 Feb 2026 16:54:07 -0500 Subject: [PATCH] Create template style guide and minor updates to templates and docs (#314) * Add style guide for creating product template submissions. * Some updates to TODO.md. (#270) * Remove Meta nodes with deprecated product_url attributes. --- docs/CONTRIBUTING.md | 2 +- docs/PRODUCT-TEMPLATES.md | 6 +- docs/TEMPLATE-STYLE.md | 120 +++++++++++++ docs/TODO.md | 12 +- templates/avery-iso-templates.xml | 1 - templates/begalabel-templates.xml | 69 +------- templates/desmat-templates.xml | 10 +- templates/endisch-templates.xml | 63 ------- templates/geha-iso-templates.xml | 29 ---- templates/hisago-templates.xml | 208 ----------------------- templates/mayspies-templates.xml | 1 - templates/microapp-templates.xml | 1 - templates/misc-iso-templates.xml | 1 - templates/misc-other-templates.xml | 1 - templates/misc-us-templates.xml | 1 - templates/online-templates.xml | 226 +++---------------------- templates/pearl-iso-templates.xml | 49 ------ templates/rayfilm-templates.xml | 179 +------------------- templates/sheetlabels-us-templates.xml | 64 +------ 19 files changed, 167 insertions(+), 876 deletions(-) create mode 100644 docs/TEMPLATE-STYLE.md diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 97af0a8..5250983 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -26,7 +26,7 @@ How To Contribute to gLabels ### Would you like to submit new product templates? -* Before submitting, please read [PRODUCT-TEMPLATES.md](PRODUCT-TEMPLATES.md) located in this directory. +* Before submitting, please read [PRODUCT-TEMPLATES.md](PRODUCT-TEMPLATES.md) and [TEMPLATE-STYLE.md](TEMPLATE-STYLE.md) located in this directory. * [Open an issue](https://github.com/j-evins/glabels-qt/issues/new) and attach your completed product template file(s). diff --git a/docs/PRODUCT-TEMPLATES.md b/docs/PRODUCT-TEMPLATES.md index 9c2a904..633028c 100644 --- a/docs/PRODUCT-TEMPLATES.md +++ b/docs/PRODUCT-TEMPLATES.md @@ -1,7 +1,9 @@ Manually Creating Product Templates =================================== -This document is a reference for manually creating *gLabels* product templates. +This document is a reference for manually creating *gLabels* product templates. See +[TEMPLATE-STYLE.md](TEMPLATE-STYLE.md) located in this directory for style guidelines +for product template submissions. *gLabels* searches for templates in several locations as described here:

@@ -83,7 +85,7 @@ Property | Type | Description *_description* | string | Translatable description of stationery product. Used in predefined labels instead of description. *width* | distance | Page width. Only valid if `size="other"` or `size="roll"`. *height* | distance | Page height. Only valid if `size="other"`. Value is ignored if `size="roll"`. -*equiv* | string | Equivalent part number. If this property is present, the template is a clone of another template of the same brand. The template will inherit all properties, except brand and name from the other template. This equiv property must refer to a previously defined template - *gLabels* does not currently support forward references. +*equiv* | string | Equivalent part number. If this property is present, the template is a clone of another template of the same brand. The template will inherit all properties, except *part* from the other template. This equiv property must refer to a previously defined template - *gLabels* does not currently support forward references. ### Guidelines for Creating Product Descriptions diff --git a/docs/TEMPLATE-STYLE.md b/docs/TEMPLATE-STYLE.md new file mode 100644 index 0000000..13f94d2 --- /dev/null +++ b/docs/TEMPLATE-STYLE.md @@ -0,0 +1,120 @@ +gLabels Product Template Style Guide +==================================== + +This file describes the prefered style for product template submissions. See +[PRODUCT-TEMPLATES.md](PRODUCT-TEMPLATES.md) located in this directory for detailed +systax documentation. + + +Organization +------------ + +Template files are located in the [templates](../templates/) directory. The following +is the naming convention for these files: + +
brand-class-templates.xml
+ +Where *brand* is the lowercase brand name, and *class* is the media size class (currently +`iso`, `us`, and `other`). + +Templates should be sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order) +by part number within each file. An exception to this rule is to group equivalent templates +directly below their referenced template. For example: + +```xml + + +