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 + + +