ytsled 0.4.1__py3-none-win_amd64.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.
Binary file
@@ -0,0 +1,296 @@
1
+ Metadata-Version: 2.4
2
+ Name: ytsled
3
+ Version: 0.4.1
4
+ License-File: LICENSE
5
+ Summary: High-speed Rust sidecar and post-processor for yt-dlp with SQLite archiving and parallel subtitle cleaning
6
+ Keywords: yt-dlp,youtube,subtitles,archive,cli
7
+ Author: ChinmayShanbhag
8
+ License-Expression: Apache-2.0
9
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
10
+ Project-URL: Repository, https://github.com/ChinmayShanbhag/ytsled
11
+
12
+ # ytsled
13
+
14
+ <!-- badges:start -->
15
+ [![Crates.io](https://img.shields.io/crates/v/ytsled)](https://crates.io/crates/ytsled)
16
+ [![GitHub Release](https://img.shields.io/github/v/release/ChinmayShanbhag/ytsled)](https://github.com/ChinmayShanbhag/ytsled/releases/latest)
17
+ [![CI](https://img.shields.io/github/actions/workflow/status/ChinmayShanbhag/ytsled/ci.yml?branch=main)](https://github.com/ChinmayShanbhag/ytsled/actions/workflows/ci.yml)
18
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
19
+ <!-- badges:end -->
20
+
21
+ `ytsled` builds searchable transcript archives from YouTube, Twitch, Vimeo, Nebula, and the sites covered by [yt-dlp’s 1,800+ extractors](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md). yt-dlp handles extraction and downloads. ytsled indexes multilingual captions, preserves source URLs and chapters, and exposes the archive through search, MCP, a terminal UI, and offline exports. Live extraction depends on the installed yt-dlp version and the source site.
22
+
23
+ ## Installation
24
+
25
+ | Channel | Command |
26
+ | --- | --- |
27
+ | PyPI | `pip install ytsled` |
28
+ | Run with uv | `uvx ytsled --help` |
29
+ | Prebuilt with cargo-binstall | `cargo binstall ytsled` |
30
+ | Build from crates.io | `cargo install ytsled --locked` |
31
+ | Homebrew | `brew install ChinmayShanbhag/tap/ytsled` |
32
+ | Scoop | `scoop install ytsled/ytsled` |
33
+ | Docker | `docker run --rm ghcr.io/chinmayshanbhag/ytsled:latest --help` |
34
+
35
+ Before the first Scoop install, run `scoop bucket add ytsled https://github.com/ChinmayShanbhag/scoop-bucket`.
36
+
37
+ The Docker image includes yt-dlp and FFmpeg. Mount your archive directory at `/data` to keep the database and exports between runs. On Linux, use your user ID for write access to that directory.
38
+
39
+ ```sh
40
+ docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/data" ghcr.io/chinmayshanbhag/ytsled:latest stats
41
+ ```
42
+
43
+ ### Prebuilt binaries
44
+
45
+ Download the archive for your operating system and CPU from [GitHub Releases](https://github.com/ChinmayShanbhag/ytsled/releases).
46
+
47
+ | Platform | Archive | Executable |
48
+ | --- | --- | --- |
49
+ | Windows x86-64 | `ytsled-x86_64-pc-windows-msvc.zip` | `ytsled.exe` |
50
+ | Linux x86-64 | `ytsled-x86_64-unknown-linux-gnu.tar.gz` | `ytsled` |
51
+ | Linux ARM64 | `ytsled-aarch64-unknown-linux-gnu.tar.gz` | `ytsled` |
52
+ | macOS Apple silicon | `ytsled-aarch64-apple-darwin.tar.gz` | `ytsled` |
53
+ | macOS Intel | `ytsled-x86_64-apple-darwin.tar.gz` | `ytsled` |
54
+
55
+ Extract the archive and put the executable in a directory on your `PATH`.
56
+
57
+ ### Build from source
58
+
59
+ Source builds and `cargo install` require a current stable Rust toolchain and the platform's C build tools for bundled SQLite.
60
+
61
+ ```sh
62
+ git clone https://github.com/ChinmayShanbhag/ytsled.git
63
+ cd ytsled
64
+ cargo install --path . --locked
65
+ ```
66
+
67
+ Install [yt-dlp](https://github.com/yt-dlp/yt-dlp#installation) for `sync` and put it on your `PATH`, or pass its location with `--yt-dlp`. Import and cleanup work with local files.
68
+
69
+ ## Usage
70
+
71
+ The default archive is `ytsled.db` in the working directory. Use `--database PATH` to choose a different archive.
72
+
73
+ ### Check your environment
74
+
75
+ ```sh
76
+ ytsled doctor
77
+ ytsled --database ./archive.db doctor --json
78
+ ```
79
+
80
+ Doctor checks the executables on your `PATH`, the yt-dlp version, SQLite and FTS5, and the database location, size, and free disk space. It reports missing tools with install hints and works before a database exists.
81
+
82
+ ### Sync a channel or playlist
83
+
84
+ ```sh
85
+ ytsled sync "https://www.youtube.com/@RustVideos/videos" --concurrency 8
86
+ ```
87
+
88
+ `sync` writes one JSONL file per captioned video to `transcripts/` by default. Use `--output DIR` to change the destination and `--language CODE` to change the preferred caption language from English. It prefers manual subtitles and checks regional variants. yt-dlp handles subtitle downloads and retries, and may use FFmpeg to convert a track to SRT.
89
+
90
+ For scheduled runs, cap the playlist scan and restrict the upload dates.
91
+
92
+ ```sh
93
+ ytsled sync "https://www.youtube.com/@RustVideos/videos" --since 7 --max-videos 50
94
+ ```
95
+
96
+ `--max-videos` limits the first playlist entries inspected by yt-dlp, including IDs already archived. `--since` uses an inclusive UTC date cutoff. ytsled resolves missing dates and caches those it finds. Videos with unknown dates are filtered when `--since` is set.
97
+
98
+ Private or unavailable entries and videos without a matching caption track are recorded as `skipped`. Extraction or download errors become `failed`, and the batch continues. Failed and interrupted videos are retried on the next sync. Date-filtered entries can be picked up by a wider or unfiltered sync.
99
+
100
+ Pass site or download options directly to yt-dlp using shell-style quoting within the argument string.
101
+
102
+ ```sh
103
+ ytsled sync "https://www.twitch.tv/example/videos" --ytdlp-args "--cookies-from-browser chrome --sleep-interval 3"
104
+ ytsled sync "https://vimeo.com/76979871" --media --ytdlp-args "-f 'best[height<=720]'"
105
+ ```
106
+
107
+ Add `--media` on the initial sync to also download video or audio to the output directory's `media/` folder. Some formats require FFmpeg.
108
+
109
+ Add `--nfo` to write media-server metadata during sync. When media is requested, the NFO sits beside the downloaded file.
110
+
111
+ ### Import a yt-dlp archive
112
+
113
+ ```sh
114
+ ytsled import-archive ./archive.txt
115
+ ```
116
+
117
+ Import a file created by `yt-dlp --download-archive` to mark its video IDs as completed before running `sync`.
118
+
119
+ ### Ingest a yt-dlp download
120
+
121
+ ```sh
122
+ yt-dlp --write-subs --write-info-json --exec "ytsled ingest {}" "VIDEO_URL"
123
+ ytsled ingest "./Example video [dQw4w9WgXcQ].mp4" --nfo
124
+ ```
125
+
126
+ The hook reads the video ID from the matching `.info.json` or yt-dlp's default `Title [ID]` filename. It cleans matching adjacent VTT and SRT files in place, writes a `.jsonl` transcript next to each, and records the downloaded ID in SQLite. Use `--write-info-json` with custom filenames.
127
+
128
+ ### Transcribe media when subtitles are missing
129
+
130
+ ```sh
131
+ ytsled ingest "./Recording [meeting01].wav" --transcribe-cmd "whisper-cli -m base.bin -ovtt -of {output} {input}"
132
+ ytsled sync "VIDEO_URL" --ytdlp-args "-f bestaudio" --transcribe-cmd "my-transcriber {input} {output}"
133
+ ```
134
+
135
+ The command runs as an executable with arguments. `{input}` expands to the absolute media path and `{output}` to the path without its extension. Have the command write VTT or SRT beside the input, such as `{output}.en.vtt` or the default `{input}.vtt` from Whisper. Use a transcriber or wrapper that accepts your media format. Sync downloads media for the fallback when yt-dlp advertises no caption tracks, and it rechecks earlier no-caption skips when the fallback is configured.
136
+
137
+ ### Clean existing subtitles
138
+
139
+ Put your VTT or SRT files under `captions/`, then choose an output format.
140
+
141
+ ```sh
142
+ ytsled clean-subs ./captions --output ./dataset --format jsonl
143
+ ytsled clean-subs ./captions --output ./markdown --format md --timestamps
144
+ ytsled clean-subs ./captions --output ./text --format txt
145
+ ytsled clean-subs ./captions --output ./spanish --format jsonl --lang es
146
+ ```
147
+
148
+ `--format jsonl` combines the selected inputs into `transcripts.jsonl` with one record per source file. Each record has a video ID, title, language, full text, and timed segments. A suffix such as `.en`, `.ja`, or `.pt-BR` identifies the track. Unlabeled tracks use `und`. SQLite stores one track per video and language. `--lang` matches the normalized code exactly.
149
+
150
+ `--format txt` and `--format md` mirror the source directory structure and append the output extension to each filename, so `clip.srt` and `clip.vtt` produce distinct files. Add `--timestamps` to include segment start times.
151
+
152
+ ### Export chunks for retrieval
153
+
154
+ ```sh
155
+ ytsled clean-subs ./captions --output ./chunks --format jsonl --chunk-words 250 --chunk-overlap 30
156
+ ```
157
+
158
+ Chunk mode writes one JSONL record per overlapping window with `video_id`, `title`, a zero-based `chunk_index`, `start` and `end` in seconds, `text`, and `chapter_title`. Word counts use whitespace boundaries. The overlap defaults to 30 words and must be smaller than the chunk size. Timing uses inline WebVTT timestamps where available and estimates word boundaries within untimed cues. Native chapters take precedence over timestamp lines in the video description. Local cleanup reads chapters from an adjacent `.info.json` file when present.
159
+
160
+ ### Search the archive
161
+
162
+ ```sh
163
+ ytsled search "async rust" --channel "Rust" --limit 10
164
+ ytsled search "memory safety" --lang en --json
165
+ ```
166
+
167
+ SQLite FTS5 ranks transcript matches and returns snippets, chapter titles, languages, and timestamped video links. It uses YouTube and Twitch query parameters and Vimeo or generic time fragments. Opening an older archive migrates its saved tracks. Run `reindex` to recover languages and source URLs from the sidecars and subtitles you have.
168
+
169
+ #### Optional semantic search
170
+
171
+ ```sh
172
+ cargo install ytsled --locked --features semantic
173
+ ytsled search "how tasks run concurrently" --semantic
174
+ ```
175
+
176
+ Semantic builds use FastEmbed with the AllMiniLM-L6-v2 model and fuse cosine similarity with FTS5 rankings. Install a compatible ONNX Runtime 1.24 or newer and point `ORT_DYLIB_PATH` to its shared library. FastEmbed retrieves the model on first use and can use the cached model offline afterward. Set `FASTEMBED_CACHE_DIR` to select the model cache directory. The default build uses FTS5 without model or ONNX dependencies.
177
+
178
+ ### Connect an MCP client
179
+
180
+ `ytsled mcp` serves the archive over local stdio. Paste this `mcpServers` configuration into Claude Code, Cursor, or Windsurf. Replace the database path with your absolute path and place `ytsled` on the client's `PATH`.
181
+
182
+ ```json
183
+ {
184
+ "mcpServers": {
185
+ "ytsled": {
186
+ "command": "ytsled",
187
+ "args": ["--database", "/absolute/path/to/ytsled.db", "mcp"]
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ The server exposes `search_archive`, `get_transcript`, `list_channels`, and `archive_stats`. Pass `lang` to either transcript tool to select a language.
194
+
195
+ MCP Registry ID `mcp-name: io.github.chinmayshanbhag/ytsled`.
196
+
197
+ ### Run a watchlist
198
+
199
+ ```sh
200
+ ytsled watch --init
201
+ ytsled watch --config ytsled.toml
202
+ ytsled watch --config ytsled.toml --ytdlp-args "--sleep-interval 3"
203
+ ```
204
+
205
+ Add one `[[channels]]` block per source. Paths are relative to the configuration file. The watchlist syncs each source in order and can export `jsonl`, `md`, `nfo`, and `obsidian`.
206
+
207
+ ```toml
208
+ # Optional defaults, also configurable per source.
209
+ ytdlp_args = "--sleep-interval 3"
210
+ # transcribe_cmd = "my-transcriber {input} {output}"
211
+
212
+ [[channels]]
213
+ url = "https://www.youtube.com/@RustVideos/videos"
214
+ since = 7
215
+ max_videos = 20
216
+ output = "transcripts/rust"
217
+ formats = ["jsonl", "md", "nfo", "obsidian"]
218
+ chunk_words = 250
219
+ chunk_overlap = 30
220
+ ```
221
+
222
+ The command-line options `--ytdlp-args` and `--transcribe-cmd` override the corresponding watchlist settings for that run.
223
+
224
+ ### Export metadata and a wiki
225
+
226
+ ```sh
227
+ ytsled export-nfo ./downloads
228
+ ytsled export-wiki --output ./vault --format obsidian
229
+ ytsled export-wiki --output ./wiki --format html --lang en
230
+ ```
231
+
232
+ NFO export writes XML sidecars beside existing `.info.json` files for media-library readers that support local NFO metadata. The Obsidian export creates video and channel notes with frontmatter, backlinks, chapters, and timestamp links. The HTML export creates a single searchable `index.html` that opens offline.
233
+
234
+ ### Reindex a local archive and pack context
235
+
236
+ ```sh
237
+ ytsled reindex ./downloads
238
+ ytsled pack --query "memory safety" --channel "Rust" --lang en --max-tokens 12000 --output context.md
239
+ ytsled pack --lang en --max-tokens 32000 --output context.xml
240
+ ```
241
+
242
+ `reindex` reads local `.info.json`, VTT, and SRT files in parallel and updates the SQLite index in batches without network access. It reports unreadable or empty captions on stderr and keeps unrelated archive records.
243
+
244
+ `pack` bundles matching tracks with source metadata, chapters, and timestamped links. The output extension selects Markdown or XML. The estimated token budget uses four UTF-8 bytes per token and counts the file’s markup. Actual token counts vary by model and language. The pack includes only whole cues that fit and reports the estimated tokens and number of distinct videos.
245
+
246
+ ### Inspect the archive
247
+
248
+ ```sh
249
+ ytsled stats
250
+ ytsled dedupe --dry-run --input ./downloads
251
+ ytsled tui
252
+ ```
253
+
254
+ `stats` reports archive duration, storage, transcript coverage, and top channels. `dedupe` reports repeated IDs across sources, title-and-duration matches, and orphaned sidecars. It leaves source files intact. Use `--json` with either command for structured stdout. In the TUI, use `Tab` to switch views, `j`/`k` or arrows to navigate, `/` to search, `r` to retry the selected failed item, and `q` to quit.
255
+
256
+ ## Terminal demo
257
+
258
+ Run `vhs assets/demo.tape` from the repository root to record a local playlist sync and chunked JSONL export. The demo uses a fixture and works without network access once the Rust dependencies are cached.
259
+
260
+ ## Architecture
261
+
262
+ - `sync` reads the flat playlist from `yt-dlp` and stages unprocessed IDs in a single SQLite transaction. It runs bounded yt-dlp download jobs, then records each result and indexes its captions.
263
+ - `import-archive` imports the IDs in a `yt-dlp` download archive in a single transaction. Imported entries count as completed.
264
+ - `clean-subs` reads VTT and SRT files recursively with Rayon and writes JSONL, plain text, or Markdown.
265
+
266
+ ## Tests
267
+
268
+ CI runs formatting, Clippy with warnings denied, and the Rust tests on Windows, Linux, and Apple silicon macOS. The suite covers transactional archive import, rolling-caption deduplication, subtitle export, chunk timing, incremental sync, and the ingest hook. [CI results](https://github.com/ChinmayShanbhag/ytsled/actions/workflows/ci.yml)
269
+
270
+ ## Benchmarks
271
+
272
+ Build in release mode, then run the standard-library benchmark with Python 3.10 or newer. It generates local fixtures in a temporary directory and prints a Markdown table.
273
+
274
+ ```sh
275
+ cargo build --release --locked
276
+ python scripts/bench.py
277
+ ```
278
+
279
+ The archive baseline scans the yt-dlp archive text once for 10,000 lookup requests. The subtitle baseline is a single-threaded Python cleaner that writes the same JSONL records for the generated fixtures. Times include process startup. The combined archive row adds import and lookup times for each trial, and archive peak RAM is the larger of the two process peaks.
280
+
281
+ The Windows 11 x86-64 run used Python 3.13.3 and three trials. Times are medians, and peak RAM is the maximum across the trials. The Linux x86-64 run used WSL2, Python 3.11.2, and one trial. Both runs reported 20 logical CPUs, used the v0.1.0 release build, and produced matching archive lookup counts and JSONL records.
282
+
283
+ | Workload | Windows baseline | Windows ytsled | Linux baseline | Linux ytsled |
284
+ | --- | ---: | ---: | ---: | ---: |
285
+ | One-time import of 10,000 archive IDs | n/a | 0.254 s | n/a | 0.068 s |
286
+ | Lookup time for 10,000 archive IDs | 0.306 s | 0.331 s | 0.081 s | 0.085 s |
287
+ | Import and lookup time | 0.306 s | 0.578 s | 0.081 s | 0.153 s |
288
+ | Peak RAM for archive workload | 23.89 MiB | 24.96 MiB | 17.79 MiB | 18.18 MiB |
289
+ | Subtitle cleaning time for 5,000 VTT files | 5.460 s | 1.084 s | 2.950 s | 0.267 s |
290
+ | Subtitle cleaning speed | 916 files/s | 4,614 files/s | 1,695 files/s | 18,718 files/s |
291
+ | Peak RAM for subtitle cleaning | 31.77 MiB | 13.52 MiB | 18.74 MiB | 17.72 MiB |
292
+
293
+ ## Attribution
294
+
295
+ `ytsled` relies on the separate [yt-dlp project](https://github.com/yt-dlp/yt-dlp) and its extractor maintainers. See [yt-dlp's license](https://github.com/yt-dlp/yt-dlp/blob/master/LICENSE) for its distribution terms. This project is licensed under [Apache 2.0](LICENSE).
296
+
@@ -0,0 +1,6 @@
1
+ ytsled-0.4.1.data/scripts/ytsled.exe,sha256=z0P_kpEjiJQHOlwG8h7Mx-6klNZ0Zteo-Xhgp0ZJYSI,7581696
2
+ ytsled-0.4.1.dist-info/METADATA,sha256=TtM-AyaTFnVCreyXwW-QyQDVNopPWFcf5nBPSELQIPM,16231
3
+ ytsled-0.4.1.dist-info/WHEEL,sha256=Uvw7WSmy7Kj2FBk8Va4L_dq4MDW8X5Ynby-pOX3ZNS0,94
4
+ ytsled-0.4.1.dist-info/licenses/LICENSE,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
5
+ ytsled-0.4.1.dist-info/sboms/ytsled.cyclonedx.json,sha256=ZNWJVwhSjU4gV9aKl_Rg0-ZmaKp-UbDmTod6kGrqDZc,211398
6
+ ytsled-0.4.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.16.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,202 @@
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.