├── .gitattributes.template ├── .gitignore.template ├── .pr-preview.json.template ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml.template │ ├── 0-new-issue.yml.template │ └── 1-new-feature.yml.template └── workflows │ └── build.yml.template ├── .editorconfig.template ├── README.md ├── Makefile.template ├── PULL_REQUEST_TEMPLATE.md.template ├── README.md.template ├── README.md.anne.template-part ├── factory.json ├── factory.py ├── LICENSE └── LICENSE.template /.gitattributes.template: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.bs diff=html linguist-language=HTML 3 | -------------------------------------------------------------------------------- /.gitignore.template: -------------------------------------------------------------------------------- 1 | /@@shortname@@.spec.whatwg.org/ 2 | /deploy.sh 3 | /@@bs@@.html@@.gitignore@@ 4 | -------------------------------------------------------------------------------- /.pr-preview.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "src_file": "@@bs@@.bs", 3 | "type": "bikeshed", 4 | "params": { 5 | "force": 1, 6 | "md-status": "LS-PR", 7 | "md-Text-Macro": "PR-NUMBER {{ pull_request.number }}" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_size = 2 8 | indent_style = space 9 | trim_trailing_whitespace = true 10 | 11 | [Makefile.template] 12 | indent_style = tab 13 | 14 | [*.py] 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml.template: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Chat 4 | url: https://whatwg.org/chat 5 | about: Please do reach out with questions and feedback! 6 | - name: Stack Overflow 7 | url: https://stackoverflow.com/ 8 | about: If you're having trouble building a web page, this is not the right repository. Consider asking your question on Stack Overflow instead. 9 | -------------------------------------------------------------------------------- /.editorconfig.template: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_size = 2 8 | indent_style = space 9 | trim_trailing_whitespace = true 10 | max_line_length = 100 11 | 12 | [Makefile] 13 | indent_style = tab 14 | 15 | [*.md] 16 | max_line_length = off 17 | 18 | [*.bs] 19 | indent_size = @@bikeshed_indent_size@@@@bikeshed_max_line_length@@ 20 | 21 | [*.py] 22 | indent_size = 4 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository enables repositories of WHATWG standards to be organized centrally to a certain extent. This is useful for the support files (the files with the `.template` and `.template-part` extensions), which are often nearly identical and prone to errors. 2 | 3 | `factory.py` takes care of updating existing WHATWG standard repositories. It assumes they are in parallel directories using their "shortname" as directory name. `factory.json` supplies data for a exceptional cases. 4 | -------------------------------------------------------------------------------- /.github/workflows/build.yml.template: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | push: 8 | branches: 9 | - main 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | name: Build 15 | runs-on: ubuntu-24.04 16 | steps: 17 | - uses: actions/checkout@v6 18 | with: 19 | fetch-depth: 2 20 | - uses: actions/setup-python@v6 21 | with: 22 | python-version: "3.14"@@build_with_node@@ 23 | - run: pip install bikeshed && bikeshed update 24 | # Note: `make deploy` will do a deploy dry run on PRs. 25 | - run: make deploy 26 | env: 27 | SERVER: ${{ secrets.MARQUEE_SERVER }} 28 | SERVER_PUBLIC_KEY: ${{ secrets.MARQUEE_PUBLIC_KEY }} 29 | SERVER_DEPLOY_KEY: ${{ secrets.MARQUEE_DEPLOY_KEY }} 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/0-new-issue.yml.template: -------------------------------------------------------------------------------- 1 | name: New issue 2 | description: File a new issue against the @@h1@@ Standard. 3 | body: 4 | - type: markdown 5 | attributes: 6 | value: | 7 | Before filling out this form, please familiarize yourself with the [Code of Conduct](https://whatwg.org/code-of-conduct). You might also find the [FAQ](https://whatwg.org/faq) and [Working Mode](https://whatwg.org/working-mode) useful. 8 | 9 | If at any point you have questions, please reach out to us on [Chat](https://whatwg.org/chat). 10 | - type: textarea 11 | attributes: 12 | label: "What is the issue with the @@h1@@ Standard?" 13 | validations: 14 | required: true 15 | - type: markdown 16 | attributes: 17 | value: "Thank you for taking the time to improve the @@h1@@ Standard!" 18 | -------------------------------------------------------------------------------- /Makefile.template: -------------------------------------------------------------------------------- 1 | SHELL=/bin/bash -o pipefail 2 | .PHONY: local remote deploy 3 | 4 | remote: @@bs@@.bs 5 | @ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \ 6 | --output @@bs@@.html \ 7 | --write-out "%{http_code}" \ 8 | --header "Accept: text/plain, text/html" \ 9 | -F die-on=warning \ 10 | -F md-Text-Macro="COMMIT-SHA LOCAL COPY" \ 11 | -F file=@@@bs@@.bs) && \ 12 | [[ "$$HTTP_STATUS" -eq "200" ]]) || ( \ 13 | echo ""; cat @@bs@@.html; echo ""; \ 14 | rm -f @@bs@@.html; \ 15 | exit 22 \ 16 | ); 17 | 18 | local: @@bs@@.bs 19 | bikeshed spec @@bs@@.bs @@bs@@.html --md-Text-Macro="COMMIT-SHA LOCAL-COPY" 20 | 21 | deploy: @@bs@@.bs 22 | curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh@@extra_files@@@@post_build_step@@ 23 | bash ./deploy.sh 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-new-feature.yml.template: -------------------------------------------------------------------------------- 1 | name: New feature 2 | description: Request a new feature in the @@h1@@ Standard. 3 | labels: ["addition/proposal", "needs implementer interest"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before filling out this form, please familiarize yourself with the [Code of Conduct](https://whatwg.org/code-of-conduct), [FAQ](https://whatwg.org/faq), and [Working Mode](https://whatwg.org/working-mode). They help with setting expectations and making sure you know what is required. The FAQ ["How should I go about proposing new features to WHATWG standards?"](https://whatwg.org/faq#adding-new-features) is especially relevant. 9 | 10 | If at any point you have questions, please reach out to us on [Chat](https://whatwg.org/chat). 11 | - type: textarea 12 | attributes: 13 | label: "What problem are you trying to solve?" 14 | validations: 15 | required: true 16 | - type: textarea 17 | attributes: 18 | label: "What solutions exist today?" 19 | - type: textarea 20 | attributes: 21 | label: "How would you solve it?" 22 | - type: textarea 23 | attributes: 24 | label: "Anything else?" 25 | - type: markdown 26 | attributes: 27 | value: "Thank you for taking the time to improve the @@h1@@ Standard!" 28 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md.template: -------------------------------------------------------------------------------- 1 | 8 | 9 | - [ ] At least two implementers are interested (and none opposed): 10 | * … 11 | * … 12 | - [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at: 13 | * … 14 | - [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed: 15 | * Chromium: … 16 | * Gecko: … 17 | * WebKit: …@@extra_implementers@@@@a11y-check@@ 18 | - [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: … 19 | - [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. 20 | 21 | (See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.) 22 | -------------------------------------------------------------------------------- /README.md.template: -------------------------------------------------------------------------------- 1 | This repository hosts the [@@h1@@ Standard](https://@@shortname@@.spec.whatwg.org/). 2 | 3 | ## Code of conduct 4 | 5 | We are committed to providing a friendly, safe, and welcoming environment for all. Please read and respect the [Code of Conduct](https://whatwg.org/code-of-conduct). 6 | 7 | ## Contribution opportunities 8 | 9 | Folks notice minor and larger issues with the @@h1@@ Standard all the time and we'd love your help fixing those. Pull requests for typographical and grammar errors are also most welcome. 10 | 11 | Issues labeled ["good first issue"](https://github.com/whatwg/@@shortname@@/labels/good%20first%20issue) are a good place to get a taste for editing the @@h1@@ Standard. Note that we don't assign issues and there's no reason to ask for availability either, just provide a pull request. 12 | 13 | If you are thinking of suggesting a new feature, read through the [FAQ](https://whatwg.org/faq) and [Working Mode](https://whatwg.org/working-mode) documents to get yourself familiarized with the process. 14 | 15 | We'd be happy to help you with all of this [on Chat](https://whatwg.org/chat). 16 | 17 | ## Pull requests 18 | 19 | In short, change `@@source@@` and submit your patch, with a [good commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md). 20 | 21 | Please add your name to the Acknowledgments section in your first pull request, even for trivial fixes. The names are sorted lexicographically. 22 | 23 | To ensure your patch meets all the necessary requirements, please also see the [Contributor Guidelines](https://github.com/whatwg/meta/blob/main/CONTRIBUTING.md). Editors of the @@h1@@ Standard are expected to follow the [Maintainer Guidelines](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md). 24 | 25 | ## Tests 26 | 27 | Tests are an essential part of the standardization process and will need to be created or adjusted as changes to the standard are made. Tests for the @@h1@@ Standard can be found in the `@@shortname@@/` directory of [`web-platform-tests/wpt`](https://github.com/web-platform-tests/wpt). 28 | 29 | A dashboard showing the tests running against browser engines can be seen at [wpt.fyi/results/@@shortname@@](https://wpt.fyi/results/@@shortname@@). 30 | 31 | ## Building "locally" 32 | 33 | For quick local iteration, run `make`; this will use a web service to build the standard, so that you don't have to install anything. See more in the [Contributor Guidelines](https://github.com/whatwg/meta/blob/main/CONTRIBUTING.md#building). 34 | -------------------------------------------------------------------------------- /README.md.anne.template-part: -------------------------------------------------------------------------------- 1 | ## Formatting 2 | 3 | Use a column width of 100 characters. 4 | 5 | Do not use newlines inside "inline" elements, even if that means exceeding the column width requirement. 6 | ```html 7 |
The
8 | remove(tokens…)
9 | method, when invoked, must run these steps:
10 | ```
11 | is okay and
12 | ```html
13 |
The remove(tokens…) method, when
15 | invoked, must run these steps:
16 | ```
17 | is not.
18 |
19 | Using newlines between "inline" element tag names and their content is also forbidden. (This actually alters the content, by adding spaces.) That is
20 | ```html
21 | token
22 | ```
23 | is fine and
24 | ```html
25 | token
26 |
27 | ```
28 | is not.
29 |
30 | An `
` element inside it, unless it's a child of `
For each token in tokens, in given order, that is not in 37 | tokens, append token to tokens. 38 | ``` 39 | is not indented, but 40 | ```html 41 |
For each token in tokens, run these substeps: 44 | 45 |
If token is the empty string, throw a {{SyntaxError}} exception. 47 | ``` 48 | is. 49 | 50 | End tags may be included (if done consistently) and attributes may be quoted (using double quotes), though the prevalent theme is to omit end tags and not quote attributes (unless they contain a space). 51 | 52 | Place one newline between paragraphs (including list elements). Place three newlines before `
Do not place a newline above. 56 | 57 |
Place a newline above. 58 |
Place a newline above. 61 | 62 | 63 |
A request has an associated 73 | redirect mode,... 74 | ``` 75 | ```html 76 |
Let redirectMode be request's redirect mode.
77 | ```
78 |
--------------------------------------------------------------------------------
/factory.json:
--------------------------------------------------------------------------------
1 | {
2 | "compat": {
3 | "extra_files": "*.png"
4 | },
5 | "console": {
6 | "extra_files": "images/*.*",
7 | "not_these_templates": [".editorconfig"],
8 | "extra_implementers": ["Deno", "Node.js"]
9 | },
10 | "dom": {
11 | "extra_implementers": [
12 | "Deno (only for aborting and events)",
13 | "Node.js (only for aborting and events)"
14 | ],
15 | "readme": "README.md.anne.template-part"
16 | },
17 | "encoding": {
18 | "extra_files": "*.txt *.json *.css",
19 | "post_build_step": "python visualize.py \"$$DIR/\"",
20 | ".gitignore": ["/UnicodeData.txt"],
21 | "extra_implementers": ["Deno", "Node.js"],
22 | "readme": "README.md.anne.template-part"
23 | },
24 | "fetch": {
25 | "extra_implementers": ["Deno (not for CORS changes)"],
26 | "readme": "README.md.anne.template-part"
27 | },
28 | "html": {
29 | "not_these_templates": [".editorconfig", ".gitattributes", ".github/workflows/build.yml", ".gitignore", ".pr-preview.json", "Makefile", "README.md"],
30 | "extra_implementers": [
31 | "Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage)",
32 | "Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution)"
33 | ],
34 | "a11y-check": true
35 | },
36 | "infra": {
37 | "not_these_templates": ["PULL_REQUEST_TEMPLATE.md"],
38 | "readme": "README.md.anne.template-part"
39 | },
40 | "notifications": {
41 | "readme": "README.md.anne.template-part"
42 | },
43 | "storage": {
44 | ".gitignore": ["/node_modules/", "/package-lock.json"],
45 | "extra_files": "assets/*",
46 | "readme": "README.md.anne.template-part"
47 | },
48 | "streams": {
49 | "extra_files": "demos/* demos/**/*",
50 | "not_these_templates": [".editorconfig", "README.md"],
51 | "extra_implementers": ["Deno", "Node.js"]
52 | },
53 | "url": {
54 | "extra_implementers": ["Deno", "Node.js"],
55 | "readme": "README.md.anne.template-part"
56 | },
57 | "urlpattern": {
58 | "extra_implementers": [
59 | "Deno",
60 | "kenchris/urlpattern-polyfill"
61 | ],
62 | "bikeshed_indent_size": 2,
63 | "bikeshed_max_line_length": "off"
64 | },
65 | "webidl": {
66 | ".gitignore": ["/node_modules/", "/package-lock.json"],
67 | "bikeshed_indent_size": 4,
68 | "build_with_node": true,
69 | "post_build_step": "node ./check-grammar.js \"$$DIR/index.html\" && npm run webidl-grammar-post-processor -- --input \"$$DIR/index.html\"",
70 | "not_these_templates": ["README.md"],
71 | "extra_implementers": ["Deno", "Node.js", "webidl2.js", "widlparser"]
72 | },
73 | "websockets": {
74 | "extra_implementers": ["Deno"]
75 | },
76 | "xhr": {
77 | "readme": "README.md.anne.template-part"
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/factory.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import argparse, os, subprocess, uuid, json, requests
4 |
5 | OBSOLETE_FILES = [".travis.yml", "deploy_key.enc"]
6 | TEMPLATES = {}
7 | TEMPLATE_PARTS = {}
8 | DB = json.loads(requests.get("https://github.com/whatwg/sg/raw/main/db.json").text)
9 | FACTORY_DB = {}
10 |
11 | def read_file(file):
12 | return open(file, "r", encoding="utf-8", newline="\n").read()
13 |
14 | def write_file(file, contents):
15 | dirs = os.path.dirname(file)
16 | if dirs:
17 | os.makedirs(dirs, exist_ok=True)
18 | open(file, "w", encoding="utf-8", newline="\n").write(contents)
19 |
20 | def href_to_shortname(href):
21 | return href[len("https://"):href.index(".")]
22 |
23 | def find_files_with_extension(extension, recurse=True):
24 | paths = []
25 | for root, dirs, files in os.walk("."):
26 | for file in files:
27 | if file.endswith(extension):
28 | path = os.path.relpath(os.path.join(root, file), start=".")
29 | paths.append(path)
30 | if not recurse:
31 | del dirs[:]
32 | return paths
33 |
34 |
35 | def gather_files(extension):
36 | files = {}
37 | for path in find_files_with_extension(extension):
38 | files[path] = read_file(path)
39 | return files
40 |
41 |
42 | def copy_and_fill_templates(variables):
43 | output = {}
44 | for template in TEMPLATES:
45 | output_name = template[:-len(".template")]
46 | output_contents = TEMPLATES[template]
47 | if output_name == "README.md":
48 | if variables["readme"]:
49 | output_contents += "\n" + TEMPLATE_PARTS[variables["readme"]]
50 | if os.path.isfile("READMEEND.md"):
51 | output_contents += "\n" + read_file("READMEEND.md")
52 | output[output_name] = fill_template(output_contents, variables)
53 | return output
54 |
55 | def fill_template(contents, variables):
56 | for variable, data in variables.items():
57 | if variable in ("not_these_templates", "readme"):
58 | continue
59 | elif variable == "extra_files" and data != "":
60 | data = "\n\tEXTRA_FILES=\"{}\" \\".format(data)
61 | elif variable == "bikeshed_indent_size":
62 | data = str(data)
63 | elif variable == "bikeshed_max_line_length" and data != "":
64 | data = "\nmax_line_length = {}".format(data)
65 | elif variable == "build_with_node" and data != "":
66 | data = """
67 | - uses: actions/setup-node@v4
68 | with:
69 | node-version: 20
70 | - run: npm install"""
71 | elif variable == "post_build_step" and data != "":
72 | data = "\n\tPOST_BUILD_STEP='{}' \\".format(data)
73 | elif variable == ".gitignore":
74 | output = ""
75 | for entry in data:
76 | output += "\n{}".format(entry)
77 | data = output
78 | elif variable == "extra_implementers":
79 | output = ""
80 | for entry in data:
81 | output += "\n * {}: …".format(entry)
82 | data = output
83 | elif variable == "a11y-check":
84 | output = ""
85 | if data:
86 | output = "\n- [ ] Corresponding [HTML AAM](https://w3c.github.io/html-aam/) & [ARIA in HTML](https://w3c.github.io/html-aria/) issues & PRs:"
87 | data = output
88 | contents = contents.replace("@@{}@@".format(variable), data)
89 | return contents
90 |
91 |
92 | def update_files(shortname, name, in_main=False):
93 | os.chdir("../{}".format(shortname))
94 |
95 | variables = {
96 | "source": "source",
97 | "shortname": shortname,
98 | "h1": name,
99 | "extra_files": "",
100 | "bikeshed_indent_size": 1,
101 | "bikeshed_max_line_length": "",
102 | "build_with_node": "",
103 | "post_build_step": "",
104 | ".gitignore": [],
105 | "not_these_templates": None,
106 | "extra_implementers": [],
107 | "a11y-check": False,
108 | "readme": None
109 | }
110 | if shortname in FACTORY_DB:
111 | variables.update(FACTORY_DB[shortname])
112 |
113 |
114 | # HTML does not use Bikeshed (yet). We do want some output for comparison purposes
115 | if variables["shortname"] != "html":
116 | [bs_file] = find_files_with_extension(".bs", recurse=False)
117 | bs = bs_file[:-len(".bs")]
118 | variables["bs"] = bs
119 | variables["source"] = bs + ".bs"
120 |
121 | files = copy_and_fill_templates(variables)
122 |
123 | if in_main:
124 | subprocess.run(["git", "checkout", "main"], capture_output=True)
125 | subprocess.run(["git", "pull"], capture_output=True)
126 |
127 | for file in files:
128 | if variables["not_these_templates"] and file in variables["not_these_templates"]:
129 | continue
130 | write_file(file, files[file])
131 | for file in OBSOLETE_FILES:
132 | if os.path.isfile(file):
133 | os.remove(file)
134 |
135 | os.chdir(".")
136 |
137 |
138 | def create_pr(shortname):
139 | os.chdir("../{}".format(shortname))
140 |
141 | subprocess.run(["git", "add", "-A"], capture_output=True)
142 | if b"Changes to be committed" in subprocess.run(["git", "status"], capture_output=True).stdout:
143 | branch = "meta-template/{}".format(uuid.uuid1())
144 | subprocess.run(["git", "checkout", "-b", branch], capture_output=True)
145 | subprocess.run(["git", "commit", "-m", "Meta: update repository files\n\nSee https://github.com/whatwg/spec-factory for details."], capture_output=True)
146 | subprocess.run(["git", "push", "-u", "origin", branch], capture_output=True)
147 | subprocess.run(["gh", "pr", "create", "-f"])
148 |
149 | os.chdir(".")
150 |
151 |
152 | def update_all_standards(create_prs = False):
153 | for workstream in DB["workstreams"]:
154 | for standard in workstream["standards"]:
155 | shortname = href_to_shortname(standard["href"])
156 |
157 | update_files(shortname, standard["name"], True)
158 |
159 | if create_prs:
160 | create_pr(shortname)
161 |
162 |
163 | def main():
164 | global TEMPLATES, FACTORY_DB, TEMPLATE_PARTS
165 |
166 | TEMPLATES = gather_files(".template")
167 | FACTORY_DB = json.loads(read_file("factory.json"))
168 | TEMPLATE_PARTS = gather_files(".template-part")
169 |
170 | parser = argparse.ArgumentParser()
171 | parser.add_argument("--single", nargs=2, type=str, metavar=(""), help="generate a single standard, e.g., --single xhr XMLHttpRequest")
172 | parser.add_argument("--all", action="store_true", help="generate all standards (as per SG's db.json)")
173 | parser.add_argument("--create-prs", action="store_true", help="create PRs; can only be used in combination with --all")
174 | args = parser.parse_args()
175 |
176 | if args.single and not args.create_prs:
177 | update_files(args.single[0], args.single[1])
178 | elif args.all:
179 | update_all_standards(args.create_prs)
180 | else:
181 | parser.print_help()
182 | exit(1)
183 | exit(0)
184 |
185 | main()
186 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/LICENSE.template:
--------------------------------------------------------------------------------
1 | Copyright © WHATWG (Apple, Google, Mozilla, Microsoft).
2 |
3 | This work is licensed under a Creative Commons Attribution 4.0 International
4 | License. To the extent portions of it are incorporated into source code,
5 | such portions in the source code are licensed under the BSD 3-Clause License instead.
6 |
7 | - - - -
8 |
9 | Creative Commons Attribution 4.0 International Public License
10 |
11 | By exercising the Licensed Rights (defined below), You accept and agree
12 | to be bound by the terms and conditions of this Creative Commons
13 | Attribution 4.0 International Public License ("Public License"). To the
14 | extent this Public License may be interpreted as a contract, You are
15 | granted the Licensed Rights in consideration of Your acceptance of
16 | these terms and conditions, and the Licensor grants You such rights in
17 | consideration of benefits the Licensor receives from making the
18 | Licensed Material available under these terms and conditions.
19 |
20 |
21 | Section 1 -- Definitions.
22 |
23 | a. Adapted Material means material subject to Copyright and Similar
24 | Rights that is derived from or based upon the Licensed Material
25 | and in which the Licensed Material is translated, altered,
26 | arranged, transformed, or otherwise modified in a manner requiring
27 | permission under the Copyright and Similar Rights held by the
28 | Licensor. For purposes of this Public License, where the Licensed
29 | Material is a musical work, performance, or sound recording,
30 | Adapted Material is always produced where the Licensed Material is
31 | synched in timed relation with a moving image.
32 |
33 | b. Adapter's License means the license You apply to Your Copyright
34 | and Similar Rights in Your contributions to Adapted Material in
35 | accordance with the terms and conditions of this Public License.
36 |
37 | c. Copyright and Similar Rights means copyright and/or similar rights
38 | closely related to copyright including, without limitation,
39 | performance, broadcast, sound recording, and Sui Generis Database
40 | Rights, without regard to how the rights are labeled or
41 | categorized. For purposes of this Public License, the rights
42 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
43 | Rights.
44 |
45 | d. Effective Technological Measures means those measures that, in the
46 | absence of proper authority, may not be circumvented under laws
47 | fulfilling obligations under Article 11 of the WIPO Copyright
48 | Treaty adopted on December 20, 1996, and/or similar international
49 | agreements.
50 |
51 | e. Exceptions and Limitations means fair use, fair dealing, and/or
52 | any other exception or limitation to Copyright and Similar Rights
53 | that applies to Your use of the Licensed Material.
54 |
55 | f. Licensed Material means the artistic or literary work, database,
56 | or other material to which the Licensor applied this Public
57 | License.
58 |
59 | g. Licensed Rights means the rights granted to You subject to the
60 | terms and conditions of this Public License, which are limited to
61 | all Copyright and Similar Rights that apply to Your use of the
62 | Licensed Material and that the Licensor has authority to license.
63 |
64 | h. Licensor means the individual(s) or entity(ies) granting rights
65 | under this Public License.
66 |
67 | i. Share means to provide material to the public by any means or
68 | process that requires permission under the Licensed Rights, such
69 | as reproduction, public display, public performance, distribution,
70 | dissemination, communication, or importation, and to make material
71 | available to the public including in ways that members of the
72 | public may access the material from a place and at a time
73 | individually chosen by them.
74 |
75 | j. Sui Generis Database Rights means rights other than copyright
76 | resulting from Directive 96/9/EC of the European Parliament and of
77 | the Council of 11 March 1996 on the legal protection of databases,
78 | as amended and/or succeeded, as well as other essentially
79 | equivalent rights anywhere in the world.
80 |
81 | k. You means the individual or entity exercising the Licensed Rights
82 | under this Public License. Your has a corresponding meaning.
83 |
84 |
85 | Section 2 -- Scope.
86 |
87 | a. License grant.
88 |
89 | 1. Subject to the terms and conditions of this Public License,
90 | the Licensor hereby grants You a worldwide, royalty-free,
91 | non-sublicensable, non-exclusive, irrevocable license to
92 | exercise the Licensed Rights in the Licensed Material to:
93 |
94 | a. reproduce and Share the Licensed Material, in whole or
95 | in part; and
96 |
97 | b. produce, reproduce, and Share Adapted Material.
98 |
99 | 2. Exceptions and Limitations. For the avoidance of doubt, where
100 | Exceptions and Limitations apply to Your use, this Public
101 | License does not apply, and You do not need to comply with
102 | its terms and conditions.
103 |
104 | 3. Term. The term of this Public License is specified in Section
105 | 6(a).
106 |
107 | 4. Media and formats; technical modifications allowed. The
108 | Licensor authorizes You to exercise the Licensed Rights in
109 | all media and formats whether now known or hereafter created,
110 | and to make technical modifications necessary to do so. The
111 | Licensor waives and/or agrees not to assert any right or
112 | authority to forbid You from making technical modifications
113 | necessary to exercise the Licensed Rights, including
114 | technical modifications necessary to circumvent Effective
115 | Technological Measures. For purposes of this Public License,
116 | simply making modifications authorized by this Section 2(a)
117 | (4) never produces Adapted Material.
118 |
119 | 5. Downstream recipients.
120 |
121 | a. Offer from the Licensor -- Licensed Material. Every
122 | recipient of the Licensed Material automatically
123 | receives an offer from the Licensor to exercise the
124 | Licensed Rights under the terms and conditions of this
125 | Public License.
126 |
127 | b. No downstream restrictions. You may not offer or impose
128 | any additional or different terms or conditions on, or
129 | apply any Effective Technological Measures to, the
130 | Licensed Material if doing so restricts exercise of the
131 | Licensed Rights by any recipient of the Licensed
132 | Material.
133 |
134 | 6. No endorsement. Nothing in this Public License constitutes or
135 | may be construed as permission to assert or imply that You
136 | are, or that Your use of the Licensed Material is, connected
137 | with, or sponsored, endorsed, or granted official status by,
138 | the Licensor or others designated to receive attribution as
139 | provided in Section 3(a)(1)(A)(i).
140 |
141 | b. Other rights.
142 |
143 | 1. Moral rights, such as the right of integrity, are not
144 | licensed under this Public License, nor are publicity,
145 | privacy, and/or other similar personality rights; however, to
146 | the extent possible, the Licensor waives and/or agrees not to
147 | assert any such rights held by the Licensor to the limited
148 | extent necessary to allow You to exercise the Licensed
149 | Rights, but not otherwise.
150 |
151 | 2. Patent and trademark rights are not licensed under this
152 | Public License.
153 |
154 | 3. To the extent possible, the Licensor waives any right to
155 | collect royalties from You for the exercise of the Licensed
156 | Rights, whether directly or through a collecting society
157 | under any voluntary or waivable statutory or compulsory
158 | licensing scheme. In all other cases the Licensor expressly
159 | reserves any right to collect such royalties.
160 |
161 |
162 | Section 3 -- License Conditions.
163 |
164 | Your exercise of the Licensed Rights is expressly made subject to the
165 | following conditions.
166 |
167 | a. Attribution.
168 |
169 | 1. If You Share the Licensed Material (including in modified
170 | form), You must:
171 |
172 | a. retain the following if it is supplied by the Licensor
173 | with the Licensed Material:
174 |
175 | i. identification of the creator(s) of the Licensed
176 | Material and any others designated to receive
177 | attribution, in any reasonable manner requested by
178 | the Licensor (including by pseudonym if
179 | designated);
180 |
181 | ii. a copyright notice;
182 |
183 | iii. a notice that refers to this Public License;
184 |
185 | iv. a notice that refers to the disclaimer of
186 | warranties;
187 |
188 | v. a URI or hyperlink to the Licensed Material to the
189 | extent reasonably practicable;
190 |
191 | b. indicate if You modified the Licensed Material and
192 | retain an indication of any previous modifications; and
193 |
194 | c. indicate the Licensed Material is licensed under this
195 | Public License, and include the text of, or the URI or
196 | hyperlink to, this Public License.
197 |
198 | 2. You may satisfy the conditions in Section 3(a)(1) in any
199 | reasonable manner based on the medium, means, and context in
200 | which You Share the Licensed Material. For example, it may be
201 | reasonable to satisfy the conditions by providing a URI or
202 | hyperlink to a resource that includes the required
203 | information.
204 |
205 | 3. If requested by the Licensor, You must remove any of the
206 | information required by Section 3(a)(1)(A) to the extent
207 | reasonably practicable.
208 |
209 | 4. If You Share Adapted Material You produce, the Adapter's
210 | License You apply must not prevent recipients of the Adapted
211 | Material from complying with this Public License.
212 |
213 |
214 | Section 4 -- Sui Generis Database Rights.
215 |
216 | Where the Licensed Rights include Sui Generis Database Rights that
217 | apply to Your use of the Licensed Material:
218 |
219 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
220 | to extract, reuse, reproduce, and Share all or a substantial
221 | portion of the contents of the database;
222 |
223 | b. if You include all or a substantial portion of the database
224 | contents in a database in which You have Sui Generis Database
225 | Rights, then the database in which You have Sui Generis Database
226 | Rights (but not its individual contents) is Adapted Material; and
227 |
228 | c. You must comply with the conditions in Section 3(a) if You Share
229 | all or a substantial portion of the contents of the database.
230 |
231 | For the avoidance of doubt, this Section 4 supplements and does not
232 | replace Your obligations under this Public License where the Licensed
233 | Rights include other Copyright and Similar Rights.
234 |
235 |
236 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
237 |
238 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
239 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
240 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
241 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
242 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
243 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
244 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
245 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
246 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
247 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
248 |
249 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
250 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
251 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
252 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
253 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
254 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
255 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
256 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
257 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
258 |
259 | c. The disclaimer of warranties and limitation of liability provided
260 | above shall be interpreted in a manner that, to the extent
261 | possible, most closely approximates an absolute disclaimer and
262 | waiver of all liability.
263 |
264 |
265 | Section 6 -- Term and Termination.
266 |
267 | a. This Public License applies for the term of the Copyright and
268 | Similar Rights licensed here. However, if You fail to comply with
269 | this Public License, then Your rights under this Public License
270 | terminate automatically.
271 |
272 | b. Where Your right to use the Licensed Material has terminated under
273 | Section 6(a), it reinstates:
274 |
275 | 1. automatically as of the date the violation is cured, provided
276 | it is cured within 30 days of Your discovery of the
277 | violation; or
278 |
279 | 2. upon express reinstatement by the Licensor.
280 |
281 | For the avoidance of doubt, this Section 6(b) does not affect any
282 | right the Licensor may have to seek remedies for Your violations
283 | of this Public License.
284 |
285 | c. For the avoidance of doubt, the Licensor may also offer the
286 | Licensed Material under separate terms or conditions or stop
287 | distributing the Licensed Material at any time; however, doing so
288 | will not terminate this Public License.
289 |
290 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
291 | License.
292 |
293 |
294 | Section 7 -- Other Terms and Conditions.
295 |
296 | a. The Licensor shall not be bound by any additional or different
297 | terms or conditions communicated by You unless expressly agreed.
298 |
299 | b. Any arrangements, understandings, or agreements regarding the
300 | Licensed Material not stated herein are separate from and
301 | independent of the terms and conditions of this Public License.
302 |
303 |
304 | Section 8 -- Interpretation.
305 |
306 | a. For the avoidance of doubt, this Public License does not, and
307 | shall not be interpreted to, reduce, limit, restrict, or impose
308 | conditions on any use of the Licensed Material that could lawfully
309 | be made without permission under this Public License.
310 |
311 | b. To the extent possible, if any provision of this Public License is
312 | deemed unenforceable, it shall be automatically reformed to the
313 | minimum extent necessary to make it enforceable. If the provision
314 | cannot be reformed, it shall be severed from this Public License
315 | without affecting the enforceability of the remaining terms and
316 | conditions.
317 |
318 | c. No term or condition of this Public License will be waived and no
319 | failure to comply consented to unless expressly agreed to by the
320 | Licensor.
321 |
322 | d. Nothing in this Public License constitutes or may be interpreted
323 | as a limitation upon, or waiver of, any privileges and immunities
324 | that apply to the Licensor or You, including from the legal
325 | processes of any jurisdiction or authority.
326 |
327 | - - - -
328 |
329 | BSD 3-Clause License
330 |
331 | Redistribution and use in source and binary forms, with or without
332 | modification, are permitted provided that the following conditions are met:
333 |
334 | 1. Redistributions of source code must retain the above copyright notice, this
335 | list of conditions and the following disclaimer.
336 |
337 | 2. Redistributions in binary form must reproduce the above copyright notice,
338 | this list of conditions and the following disclaimer in the documentation
339 | and/or other materials provided with the distribution.
340 |
341 | 3. Neither the name of the copyright holder nor the names of its
342 | contributors may be used to endorse or promote products derived from
343 | this software without specific prior written permission.
344 |
345 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
346 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
347 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
348 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
349 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
350 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
351 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
352 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
353 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
354 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
355 |
356 | - - - -
357 |
--------------------------------------------------------------------------------