textflowkit 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. textflowkit/__init__.py +8 -0
  2. textflowkit/adapters/__init__.py +11 -0
  3. textflowkit/adapters/http_server.py +465 -0
  4. textflowkit/adapters/mcp_server.py +554 -0
  5. textflowkit/cli.py +473 -0
  6. textflowkit/core/__init__.py +5 -0
  7. textflowkit/core/batch.py +186 -0
  8. textflowkit/core/bind.py +66 -0
  9. textflowkit/core/cancel.py +19 -0
  10. textflowkit/core/checkpoint.py +389 -0
  11. textflowkit/core/diarize.py +229 -0
  12. textflowkit/core/engine.py +127 -0
  13. textflowkit/core/executor.py +301 -0
  14. textflowkit/core/jobs.py +241 -0
  15. textflowkit/core/model.py +98 -0
  16. textflowkit/core/paths.py +226 -0
  17. textflowkit/core/pipeline.py +368 -0
  18. textflowkit/core/retrieval.py +148 -0
  19. textflowkit/core/runner.py +146 -0
  20. textflowkit/core/service.py +146 -0
  21. textflowkit/core/sqlite_store.py +233 -0
  22. textflowkit/core/submission.py +220 -0
  23. textflowkit/core/timeutil.py +20 -0
  24. textflowkit/core/translate.py +244 -0
  25. textflowkit/render/__init__.py +191 -0
  26. textflowkit/render/docx.py +71 -0
  27. textflowkit/render/fonts/NotoSans.ttf +0 -0
  28. textflowkit/render/fonts/NotoSansArabic.ttf +0 -0
  29. textflowkit/render/fonts/NotoSansSC.ttf +0 -0
  30. textflowkit/render/fonts/OFL-NotoSans.txt +94 -0
  31. textflowkit/render/fonts/OFL-NotoSansSC.txt +93 -0
  32. textflowkit/render/fonts/README.md +19 -0
  33. textflowkit/render/markdown.py +33 -0
  34. textflowkit/render/pdf.py +136 -0
  35. textflowkit/render/srt.py +22 -0
  36. textflowkit/render/txt.py +19 -0
  37. textflowkit/render/vtt.py +20 -0
  38. textflowkit/sources/__init__.py +16 -0
  39. textflowkit/sources/acquire.py +437 -0
  40. textflowkit/sources/detect.py +200 -0
  41. textflowkit/sources/scratch.py +32 -0
  42. textflowkit-0.1.3.dist-info/METADATA +266 -0
  43. textflowkit-0.1.3.dist-info/RECORD +46 -0
  44. textflowkit-0.1.3.dist-info/WHEEL +4 -0
  45. textflowkit-0.1.3.dist-info/entry_points.txt +4 -0
  46. textflowkit-0.1.3.dist-info/licenses/LICENSE +203 -0
@@ -0,0 +1,266 @@
1
+ Metadata-Version: 2.5
2
+ Name: textflowkit
3
+ Version: 0.1.3
4
+ Summary: Cross-platform media transcription toolkit: URL or file in, timestamped transcripts and subtitle files out.
5
+ Project-URL: Homepage, https://github.com/scottconverse/textflowkit
6
+ Project-URL: Issues, https://github.com/scottconverse/textflowkit/issues
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ Keywords: speech-to-text,srt,subtitles,transcription,vtt,whisper,yt-dlp
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
19
+ Classifier: Topic :: Text Processing
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: openai-whisper>=20240930
22
+ Requires-Dist: yt-dlp>=2025.1.1
23
+ Provides-Extra: all
24
+ Requires-Dist: fastapi>=0.115; extra == 'all'
25
+ Requires-Dist: mcp>=2.0; extra == 'all'
26
+ Requires-Dist: pyannote-audio>=4.0; extra == 'all'
27
+ Requires-Dist: pydantic>=2.7; extra == 'all'
28
+ Requires-Dist: python-docx>=1.1; extra == 'all'
29
+ Requires-Dist: reportlab>=4.0; extra == 'all'
30
+ Requires-Dist: uvicorn>=0.30; extra == 'all'
31
+ Provides-Extra: dev
32
+ Requires-Dist: pypdf>=5; extra == 'dev'
33
+ Requires-Dist: pytest>=8; extra == 'dev'
34
+ Requires-Dist: ruff>=0.6; extra == 'dev'
35
+ Requires-Dist: typing-extensions>=4.8; (python_version < '3.11') and extra == 'dev'
36
+ Provides-Extra: diarize
37
+ Requires-Dist: pyannote-audio>=4.0; extra == 'diarize'
38
+ Provides-Extra: export
39
+ Requires-Dist: python-docx>=1.1; extra == 'export'
40
+ Requires-Dist: reportlab>=4.0; extra == 'export'
41
+ Provides-Extra: http
42
+ Requires-Dist: fastapi>=0.115; extra == 'http'
43
+ Requires-Dist: pydantic>=2.7; extra == 'http'
44
+ Requires-Dist: uvicorn>=0.30; extra == 'http'
45
+ Provides-Extra: mcp
46
+ Requires-Dist: mcp>=2.0; extra == 'mcp'
47
+ Description-Content-Type: text/markdown
48
+
49
+ # textflowkit
50
+
51
+ Cross-platform media transcription toolkit. **One core, one CLI, thin adapters.**
52
+
53
+ [Project landing page](https://scottconverse.github.io/textflowkit/) ·
54
+ [GitHub releases](https://github.com/scottconverse/textflowkit/releases)
55
+
56
+ Paste a URL or point at a file; get timestamped transcripts and subtitle files back.
57
+ Built as a reusable primitive for developers — designed to sit under multiple
58
+ products, AI harnesses, and agents.
59
+
60
+ ---
61
+
62
+ > ## ⚠️ NO WARRANTY — AS IS
63
+ >
64
+ > **This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND**, express or
65
+ > implied, including but not limited to the warranties of MERCHANTABILITY, FITNESS
66
+ > FOR A PARTICULAR PURPOSE, and NONINFRINGEMENT. See [LICENSE](LICENSE) (Apache-2.0,
67
+ > §7–8) for the full disclaimer and limitation of liability.
68
+ >
69
+ > **You are responsible for what you transcribe.** textflowkit can fetch media from
70
+ > third-party platforms. Copyright, terms-of-service, and privacy obligations for any
71
+ > media you choose to process are **yours alone**. See [LEGAL.md](LEGAL.md).
72
+
73
+ ---
74
+
75
+ ## What it does
76
+
77
+ ```
78
+ URL or file ─► detect platform ─► acquire media ─► ffmpeg
79
+ │
80
+ ┌───────────────────────────┘
81
+ ▼
82
+ speech-to-text (Whisper)
83
+ │
84
+ ▼
85
+ canonical transcript (JSON)
86
+ │
87
+ ┌─────────┬───────────┼───────────┬──────────┐
88
+ ▼ ▼ ▼ ▼ ▼
89
+ TXT SRT VTT JSON Markdown
90
+ ```
91
+
92
+ ## Architecture
93
+
94
+ The design principle is **one engine, three doors**. Everything of substance lives in
95
+ the core; the interfaces are thin.
96
+
97
+ | Layer | Path | Responsibility |
98
+ |---|---|---|
99
+ | **Core** | `src/textflowkit/core` | Canonical transcript model, pipeline orchestration |
100
+ | **Sources** | `src/textflowkit/sources` | Per-platform URL normalization + media acquisition |
101
+ | **Renderers** | `src/textflowkit/render` | TXT / SRT / VTT / JSON / Markdown output |
102
+ | **CLI** | `src/textflowkit/cli.py` | Reference interface (subprocess-friendly) |
103
+ | **MCP** | `src/textflowkit/adapters/mcp_server.py` | stdio + Streamable HTTP, for AI harnesses |
104
+ | **HTTP** | `src/textflowkit/adapters/http_server.py` | JSON API, for software products and web frontends |
105
+
106
+ Because the core owns the pipeline, adding a door is cheap — and adding a platform
107
+ means writing one source adapter, not another tool.
108
+
109
+ ## Recognized sources
110
+
111
+ YouTube · TikTok · Facebook · Instagram · Vimeo · Twitch · Bilibili · Rumble ·
112
+ Kick · Zoom · Medal · Loom · Dropbox — plus **direct media URLs and local files**.
113
+
114
+ All 13 are recognised through `yt-dlp`; only YouTube has an opt-in, maintained
115
+ [live end-to-end smoke](docs/release-checklist.md). It is run on a Windows
116
+ maintainer machine before a release, not on GitHub-hosted runners or every pull
117
+ request. Local files have also been transcribed live. The other
118
+ 12 are not release-verified end to end, and some sources require cookies or
119
+ change their access rules frequently. See [docs/sources.md](docs/sources.md).
120
+
121
+ ## Install
122
+
123
+ Requires **Python ≥ 3.10** and **ffmpeg** on `PATH`.
124
+
125
+ ```bash
126
+ git clone https://github.com/scottconverse/textflowkit
127
+ cd textflowkit
128
+ pip install -e .
129
+ ```
130
+
131
+ Or install the built wheel from the release page:
132
+
133
+ ```bash
134
+ pip install https://github.com/scottconverse/textflowkit/releases/download/v0.1.3/textflowkit-0.1.3-py3-none-any.whl
135
+ ```
136
+
137
+ Not published to PyPI; the repository and its releases are the distribution path.
138
+ The release page lists each artifact's SHA-256. (Those values are deliberately
139
+ kept out of this file: the README is bundled into the wheel as its description,
140
+ so a hash written here would change the artifact it describes.)
141
+ Optional extras:
142
+
143
+ ```bash
144
+ pip install -e ".[mcp]" # MCP server adapter
145
+ pip install -e ".[http]" # HTTP API adapter
146
+ pip install -e ".[dev]" # tests + linter
147
+ ```
148
+
149
+ ## Usage
150
+
151
+ ```bash
152
+ # transcribe a URL or a local file
153
+ textflowkit transcribe "https://www.youtube.com/watch?v=..."
154
+
155
+ # pick formats and an output directory
156
+ textflowkit transcribe ./talk.mp4 --formats srt,vtt,txt,json --output-dir ./out
157
+
158
+ # force a language instead of auto-detecting
159
+ textflowkit transcribe "$URL" --language en
160
+
161
+ # translate the transcript (uses the configured backend)
162
+ textflowkit transcribe "$URL" --translate-to Spanish
163
+
164
+ # label speakers (requires the optional extra and a Hugging Face token)
165
+ textflowkit transcribe "$URL" --diarize
166
+
167
+ # resume a previous run instead of starting over
168
+ textflowkit transcribe "$URL" --resume
169
+ ```
170
+
171
+ **Resume** reuses completed work from an earlier run. It needs two things: the
172
+ same source, model, language, and options as the original run, and a durable job
173
+ store (`TEXTFLOWKIT_DB`) - a checkpoint cannot outlive a process that kept it in
174
+ memory. For a local file, a completed-job resume checks the file still exists
175
+ and matches its checkpointed normalized path, size, and SHA-256 content digest.
176
+ Missing or changed files fail with an actionable error; v0.1.1-era local
177
+ checkpoints without a fingerprint must be resubmitted without `--resume`.
178
+ For URLs, resume deliberately reuses the saved transcript by URL/options; it
179
+ does **not** assert that the remote bytes are still identical.
180
+
181
+ ```bash
182
+
183
+ # re-render an existing transcript in another format
184
+ textflowkit export ./transcript.json --format vtt
185
+ ```
186
+
187
+ ## Use as an MCP server
188
+
189
+ ```bash
190
+ pip install -e ".[mcp]"
191
+ textflowkit-mcp # stdio
192
+ textflowkit-mcp --transport http --port 8766 # Streamable HTTP
193
+ ```
194
+
195
+ Tools: `transcribe_media`, `submit_batch_media`, `resume_job`,
196
+ `get_job_status`, `get_transcript`,
197
+ `export_transcript`, `list_sources`, `list_jobs`, `cancel_job`,
198
+ `search_transcript`.
199
+
200
+ **Connection-smoked against DSH, Claude Code, OpenCode, and Codex desktop.**
201
+ These checks are not end-to-end transcription runs driven by each harness:
202
+
203
+ - **DSH** - the server spawned as a child of the harness's MCP client, which
204
+ then completed an MCP handshake, discovered the tools, and returned real
205
+ data from a `list_sources` call.
206
+ - **Claude Code** - `claude mcp list` reports `textflowkit: √ Connected` (stdio).
207
+ - **OpenCode** - `opencode mcp list` reports `textflowkit connected` over
208
+ Streamable HTTP.
209
+
210
+ - **Codex desktop** - after repair of an unrelated model-catalog issue, a live
211
+ `list_jobs` tool call succeeded. This does not prove every tool or a full
212
+ transcription in Codex.
213
+
214
+ There is also a protocol test that launches the server as a real subprocess and
215
+ speaks newline-delimited JSON-RPC over stdio, so the entry point, framing, and
216
+ version negotiation are covered on every CI run (`tests/test_stdio_protocol.py`).
217
+ See [docs/adapters.md](docs/adapters.md) for per-harness configuration.
218
+
219
+ ## Use as an HTTP API
220
+
221
+ ```bash
222
+ pip install -e ".[http]"
223
+ textflowkit-http --port 8767
224
+ ```
225
+
226
+ Submit a job, poll it, fetch the transcript. Developer mode is unauthenticated
227
+ and defaults to localhost. The opt-in JSON HTTP production profile requires a
228
+ Bearer token, explicit roots, durable SQLite jobs, and request/rate/media/output
229
+ limits; URL input additionally requires an SSRF-filtering egress proxy. See
230
+ [adapter deployment details](docs/adapters.md#developer-mode-and-production-profile).
231
+
232
+ ## Durable, bounded, cancellable
233
+
234
+ ```bash
235
+ TEXTFLOWKIT_DB=./jobs.db # job state survives restart (SQLite)
236
+ TEXTFLOWKIT_MAX_CONCURRENCY=1 # default; Whisper saturates a GPU alone
237
+ ```
238
+
239
+ `cancel_job` stops a queued job immediately, or a running job at its next stage
240
+ boundary. See [docs/adapters.md](docs/adapters.md).
241
+
242
+ ## Long jobs never block
243
+
244
+ The MCP and HTTP adapters are **job-based**: submission returns a job id
245
+ immediately and clients poll for completion. The CLI uses the same core but
246
+ waits for the result. This lets AI harnesses, software products, and a future
247
+ web frontend share the job contract without blocking a request.
248
+
249
+ ## Status
250
+
251
+ **v0.1.3 release.** Core, CLI, MCP, and HTTP have automated
252
+ coverage; Windows-native ROCm and a dated local Windows YouTube run were verified.
253
+ The GitHub-hosted YouTube attempt was blocked by a bot challenge, so hosted
254
+ live transcription is not verified.
255
+ This does not imply that all 13 platforms or every harness workflow has been
256
+ tested end to end. See [docs/roadmap.md](docs/roadmap.md).
257
+
258
+ ## License
259
+
260
+ Apache-2.0 — see [LICENSE](LICENSE). Includes an explicit patent grant and a
261
+ limitation of liability.
262
+
263
+ ## Contributing
264
+
265
+ Issues and PRs welcome. Please read [LEGAL.md](LEGAL.md) before adding a source
266
+ adapter.
@@ -0,0 +1,46 @@
1
+ textflowkit/__init__.py,sha256=2XX-cZWWneK_rvcXfTeGrvD3crwn9wrjq7uwXXpR3RY,290
2
+ textflowkit/cli.py,sha256=he8qVyBo3hpgpjOQEPEBIcio5015Y88716BZMJUv9q0,18164
3
+ textflowkit/adapters/__init__.py,sha256=FcJuTzTDjAAqtRPZupoRHVQ3b5sQ6ZGe-WJYwaxDrjs,468
4
+ textflowkit/adapters/http_server.py,sha256=G9RDOzUMupLvIc8juhpHRyO_Gh2bkZWeVnewC-GMmuE,16636
5
+ textflowkit/adapters/mcp_server.py,sha256=aqwuKJ-2rzWDcn6lIQQmaDTRk2Cu9I4hBbmYvkgl0qA,19236
6
+ textflowkit/core/__init__.py,sha256=Bz8x8ARai-serUf0ljZd5XqjUa6REWXyLuqwDsksdiY,156
7
+ textflowkit/core/batch.py,sha256=KYAizv0xkPc34IKjGZhOJMzpXP6P4bv2ahEol40uDkg,6446
8
+ textflowkit/core/bind.py,sha256=gMFr3HeaBnJw1_9jx1gQhnZ-UcCMcXsQDFSOzknW_Xg,2241
9
+ textflowkit/core/cancel.py,sha256=zgUylSl6yqowXsbsijYo14SNzNLZaTdMqRlW3CfDn3k,646
10
+ textflowkit/core/checkpoint.py,sha256=vOeyv1wQ7TKEfoghCzAhz4wP8Xdhxe1wbur0RC5dWN8,14255
11
+ textflowkit/core/diarize.py,sha256=eCuKzJto6NDY_fmWYdkQGB_yENKh-et3jURpBXzcWi0,8939
12
+ textflowkit/core/engine.py,sha256=zMLur16HvMkBS7WCjC6CrjO7oSM2vz07vYrRInIIeHQ,3744
13
+ textflowkit/core/executor.py,sha256=dWBe6w0D1jLDSUxwNMcGZdYV-AyNf3ChipsAY1PAd0M,10802
14
+ textflowkit/core/jobs.py,sha256=-najvieWwiOt9EtJPav5xRyGa3QDG6noVXZX1qIEdtA,7737
15
+ textflowkit/core/model.py,sha256=C7mloBh5RrAZyz5pMgFsZ3O1L3jHdqHdxHPtAvg9tAk,2965
16
+ textflowkit/core/paths.py,sha256=z1iVLCqCMtfSrdzUBqSaFj_k4McMEB31na8Z6uyc9SQ,8903
17
+ textflowkit/core/pipeline.py,sha256=hlnMOqVpsUlCmfq5ovHtgIh8ODd0DX9SilmZGCPibwc,14377
18
+ textflowkit/core/retrieval.py,sha256=nm262UeKBxpjERZPWk0_2ZkKvnTvJ07JX-iy-L6FM10,4462
19
+ textflowkit/core/runner.py,sha256=oomG-nFIt4Nec-zGO-k-W_hoo37ZEfFHYDvzK3bPLtQ,5102
20
+ textflowkit/core/service.py,sha256=Q2UVktckJZMdhe1GgspFvLYE9ZCuo3wUWXSGmQgGYYU,6341
21
+ textflowkit/core/sqlite_store.py,sha256=zdCaz9drBrvuZBoPlH_iW8z0wt6FQuLw-uqCgEib7Ow,8256
22
+ textflowkit/core/submission.py,sha256=2hVhvgcq40vVIDAh4JV9Xnk01WuVb1Vs_yeE8BY3x10,8925
23
+ textflowkit/core/timeutil.py,sha256=nDMj_L62OTEI9h2M2Z1icHOCjWSZT_JuM91tHy51N70,548
24
+ textflowkit/core/translate.py,sha256=irmx3dFybnGXFgHitzD3TaZ1mUNbKC30e7C1bWdQS6w,9373
25
+ textflowkit/render/__init__.py,sha256=hI6VcbGqekUqm8bSEkweCXq6dHEDGhMKojJfuzGifRg,6332
26
+ textflowkit/render/docx.py,sha256=8KqJmk0X6HOd2GPjiOJAtjea_zZf-MmpLaBJmkRkhdU,2367
27
+ textflowkit/render/markdown.py,sha256=-4aJS_mrbKQRrhNzenA_tdng0VKY5Dh6l2cYDYlM1bo,1125
28
+ textflowkit/render/pdf.py,sha256=EfRRzWE9BX6NzYIVMr5E15Wz-F-nEb8KY33uuoN0vHU,4845
29
+ textflowkit/render/srt.py,sha256=FNdbRwg0BQmfaSBRIhCERQkAfGujuIF8Qqm4RfkZxPA,689
30
+ textflowkit/render/txt.py,sha256=UujKy3xidc4tJBpH4P5mTNNnc4H6SKU4clycuVoFM6w,594
31
+ textflowkit/render/vtt.py,sha256=THF1MuAEZGybIR5dkBc0Iq2BwHkzUByHzLQI4aDq82E,681
32
+ textflowkit/render/fonts/NotoSans.ttf,sha256=uFw47OqKfPs5wk45WkAHR0-lpPyGT27jMwnrSUjSMtU,569208
33
+ textflowkit/render/fonts/NotoSansArabic.ttf,sha256=zuoltGSmVtw7JoSbq5NWdAQBr2Ku3xv6i38Nm3WSWxs,240456
34
+ textflowkit/render/fonts/NotoSansSC.ttf,sha256=owQYEaeMNhsd5Q-VPIBeAkSVHCHFvUEvcjLvDYma8No,17772300
35
+ textflowkit/render/fonts/OFL-NotoSans.txt,sha256=DauS0FRPeyM0A_FLhKZjvb-nRpgu2mKef0-f_hsDb-s,4377
36
+ textflowkit/render/fonts/OFL-NotoSansSC.txt,sha256=urz-ZsigmLL6J5vHJKOjQvgST3fOGJQfvMG7s5gjze0,4387
37
+ textflowkit/render/fonts/README.md,sha256=7_85iTjeuF3k50j2Wsh80xWRtRorYj6ShWvq_X_K07s,1056
38
+ textflowkit/sources/__init__.py,sha256=tVB31FZtzu2wm4T75uO_LaPyWYr_xIK6YVfwWSBMHR4,456
39
+ textflowkit/sources/acquire.py,sha256=RFrxTxxPwvIw26Ko21cGiZZL1RZlcrCHjlMgtBqx3wo,17415
40
+ textflowkit/sources/detect.py,sha256=nA6wYMvUtWDBIqx1CkN02ISDOD6ctnrIq7bLxfXXDp4,7212
41
+ textflowkit/sources/scratch.py,sha256=Nbif05jSwTAPmiScHnDpJjf9_8kkUK-Oybo5-t1Ffcs,913
42
+ textflowkit-0.1.3.dist-info/METADATA,sha256=Ny5TURx3jidZXIj67K6OzmcrjHWHsLu0eptNXvGNxgQ,10862
43
+ textflowkit-0.1.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
44
+ textflowkit-0.1.3.dist-info/entry_points.txt,sha256=04eocWdNVVLvun5ctkHt_OxXFaqLVrcl62MbV59GmIk,165
45
+ textflowkit-0.1.3.dist-info/licenses/LICENSE,sha256=uGdpIKm13Z_Ogp8R8H48CCAc3PyHTnqasuFj0fZNUlM,11360
46
+ textflowkit-0.1.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ textflowkit = textflowkit.cli:main
3
+ textflowkit-http = textflowkit.adapters.http_server:main
4
+ textflowkit-mcp = textflowkit.adapters.mcp_server:main
@@ -0,0 +1,203 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+