Skip to content

Commit de48dba

Browse files
committed
For udl-list.json attribute description, make required/optional more clear
1 parent 02a0ebf commit de48dba

1 file changed

Lines changed: 42 additions & 24 deletions

File tree

CONTRIBUTING.md

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,49 @@ To be accepted, your submission _must_ meet the following **requirement**s and _
4545
**Do _not_ edit [udl-list.md](https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.md): that file is auto-generated from the JSON to save effort and maintain consistency.**
4646

4747
When you make a submission, you should edit the [udl-list.json](https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.json) file, following these definitions:
48-
- The `id-name` attribute will match the name of the UDL file, without the `.xml`.
49-
- The `display-name` attribute will match the `<UserLang name="...">` from the submitted UDL file, if possible.
50-
- Please note that autoCompletion file names must match this `name="..."` attribute from the UDL, so that attribute needs to be a valid filename.
51-
- The `version` attribute can have a `v1.00`-style version or just a last-edited date like `2020-Jan-12`.
52-
- The `repository` attribute will be left blank for UDL files uploaded to this repository; if the UDL resides in an external repository (or if you want to add a link to the original source file, but still keep a copy in this repository), use this attribute to hold the full URL of the external file
53-
- The `description` attribute is an optional description of the UDL language (it could be the based on the `id-name` or `display-name`, but with spaces instead of underscores, hyphens, and/or periods).
54-
- The `author` attribute should be your name or GitHub username or email address.
55-
- The `homepage` attribute could be a link to your GitHub repository for the UDL language or your GitHub user page.
56-
- The `autoCompletion` attribute should be included if you are supplying an autoCompletion file. It can either be a Boolean (`true` or `false`), or it can be a string.
57-
- If it's `true`, then it will use the same file name as the UDL's .xml, but in the `autoCompletion\` directory instead of the `UDLs\` directory.
58-
- If it's a string, it can either be the name of the autoCompletion file (without the `.xml`, similar to the `id-name` entry), or the URL to the external file (similar to the `repository` attribute).
59-
- If it is `false` or not supplied, then it indicates there is no autoCompletion file in the submission.
60-
- **Requirement**: The filename for the autoCompletion must match the the `<UserLang name="...">` from the submitted UDL (and thus _should_ match the `display-name` in the JSON)
61-
- If the JSON's `autoCompletion` value is `true`, then the `id-name` **must** match the `<UserLang name="...">` as well.
62-
- If the JSON's `autoCompletion` value is a string, that string **must** match the `<UserLang name="...">`.
63-
- The `autoCompletionAuthor` attribute should be set to the name of the author of the autoCompletion definition, if it's a different author than the UDL.
64-
- For example, the [RenderMan UDL](./UDLs/RenderMan-RSL_byStefanGustavson.xml) was written by Stefan Gustavson, but the [RenderMan autoCompletion](./autoCompletion/RenderMan-RSL_by-focus_gfx.xml) was supplied by focus_gfx, so `autoCompletionAuthor` is set in order to give proper credit to both.
65-
- The `functionList` attribute should be included if you are supplying a functionList definition file. It can either be a Boolean (`true` or `false`), or it can be a string.
66-
- If it's `true`, then it will use the same file name as the UDL's .xml, but in the `functionList\` directory instead of the `UDLs` directory.
67-
- If it's a string, it can either be the name of the functionList file (without the `.xml`, similar to the `id-name` entry), or the URL to the external file (similar to the `repository` attribute).
68-
- If it is `false` or not supplied, then it indicates there is no functionList definition file in the submission.
69-
- The `functionListAuthor` attribute should be set to the name of the author of the functionList definition, if it's a different author than the UDL.
48+
- Required Attributes
49+
- `id-name`:
50+
- **requirement**: Attribute must match the name of the UDL file, without the `.xml`.
51+
- `display-name`:
52+
- **recommendation**: Attribute should match the `<UserLang name="...">` from the submitted UDL file, if possible.
53+
- **requirement**: Please note that autoCompletion file names **must** match this `name="..."` attribute from the UDL (with `.xml` appended), so this attribute **must** only include characters valid for a Windows filename.
54+
- `version`:
55+
- Attribute can have a `v1.00`-style version or just a last-edited date like `2020-Jan-12`.
56+
- `repository`:
57+
- **requirement**: Attribute must be left blank for UDL files uploaded to this repository (`"repository": ""`)
58+
- If the UDL resides in an external repository (or if you want to add a link to the original source file, but still keep a copy in this repository), use this attribute to hold the full URL of the external file (`"repository": "https://url.example/blah"`)
59+
- `description`:
60+
- Attribute is a description of the UDL language (it could be the based on the `id-name` or `display-name`, but with spaces instead of underscores, hyphens, and/or periods).
61+
- **requirement**: If there is no description, attribute must be left blank (`"description": ""`) rather than being omitted.
62+
- `author`:
63+
- Attribute should be your name or GitHub username or email address
64+
- Can include both, using mailto syntax: `Name <mailto:email@url.example>`
65+
- Optional Attributes
66+
- `homepage`:
67+
- Attribute could be a link to your GitHub repository for the UDL language or your GitHub user page.
68+
- `autoCompletion`:
69+
- Attribute should be included if you are supplying an autoCompletion file.
70+
- It can either be a Boolean (`true` or `false`), or it can be a string.
71+
- If it's `true`, then it will use the same file name as the UDL's .xml, but in the `autoCompletion\` directory instead of the `UDLs\` directory.
72+
- If it's a string, it can either be the name of the autoCompletion file (without the `.xml`, similar to the `id-name` entry), or the URL to the external file (similar to the `repository` attribute).
73+
- If it is `false` or not supplied, then it indicates there is no autoCompletion file in the submission.
74+
- **Requirement**: The filename for the autoCompletion must match the the `<UserLang name="...">` from the submitted UDL (and thus _should_ match the `display-name` in the JSON)
75+
- If the JSON's `autoCompletion` value is `true`, then the `id-name` **must** match the `<UserLang name="...">` as well.
76+
- If the JSON's `autoCompletion` value is a string, that string **must** match the `<UserLang name="...">`.
77+
- `autoCompletionAuthor`:
78+
- Attribute should be set to the name of the author of the autoCompletion definition, if it's a different author than the UDL.
79+
- For example, the [RenderMan UDL](./UDLs/RenderMan-RSL_byStefanGustavson.xml) was written by Stefan Gustavson, but the [RenderMan autoCompletion](./autoCompletion/RenderMan-RSL_by-focus_gfx.xml) was supplied by focus_gfx, so `autoCompletionAuthor` is set in order to give proper credit to both.
80+
- `functionList`
81+
- Attribute should be included if you are supplying a functionList definition file. It can either be a Boolean (`true` or `false`), or it can be a string.
82+
- If it's `true`, then it will use the same file name as the UDL's .xml, but in the `functionList\` directory instead of the `UDLs` directory.
83+
- If it's a string, it can either be the name of the functionList file (without the `.xml`, similar to the `id-name` entry), or the URL to the external file (similar to the `repository` attribute).
84+
- If it is `false` or not supplied, then it indicates there is no functionList definition file in the submission.
85+
- `functionListAuthor`:
86+
- Attribute should be set to the name of the author of the functionList definition, if it's a different author than the UDL.
7087
- The `functionListAuthor` is set in order to give proper credit to both, even if they are made to work together.
71-
- The `sample` attribute maybe be included if you have submitted a file in the `UDL-samples\` directory.
72-
- **Requirement**: if you have submitted a `functionList`, you _MUST_ also submit a `sample` file.
88+
- `sample`:
89+
- **Requirement**: Attribute must be included if you have submitted a file in the `UDL-samples\` directory.
90+
- **Requirement**: If you have submitted a `functionList`, you _MUST_ also submit a `sample` file.
7391
- If the attribute value is `true`, then the filename in `UDL-samples\` directory must exactly match the `id-name` (so the file will have no extension).
7492
- If the attribute is a string, then the filename in `UDL-samples\` directory must exactly match that string.
7593
- If the attribute value is `false` or the attribute is not supplied, then you are not mapping this UDL to a sample file. This will flag as an error if a `functionList` is defined for this UDL.

0 commit comments

Comments
 (0)