content-cli 0.2.0__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.
@@ -0,0 +1,3 @@
1
+ """content — command-line client for the Content engine."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from content_cli.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())
@@ -0,0 +1,119 @@
1
+ """Ergonomic shortcuts normalized to the canonical public contract.
2
+
3
+ These are pure functions (no I/O) so they are trivially testable and can be
4
+ validated against the back-end's Pydantic schema. The CLI never invents a
5
+ parallel contract — every shortcut produces a standard GenerationRequest.
6
+ """
7
+
8
+ SB_PRESETS: dict[str, dict | None] = {
9
+ "disabled": None,
10
+ "default": {
11
+ "remove": ["sponsor", "interaction", "selfpromo"],
12
+ "mark": ["intro", "preview", "outro"],
13
+ },
14
+ "aggressive": {
15
+ "remove": ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview"],
16
+ "mark": [],
17
+ },
18
+ "minimal": {"remove": ["sponsor"], "mark": []},
19
+ }
20
+
21
+
22
+ def _split(value: str | None) -> list[str]:
23
+ return [x.strip() for x in (value or "").split(",") if x.strip()]
24
+
25
+
26
+ def url_source(url: str, credential: str | None = None) -> dict:
27
+ src: dict = {"id": "main", "type": "url", "uri": url.strip()}
28
+ if credential:
29
+ src["auth"] = {"credential_id": credential}
30
+ return src
31
+
32
+
33
+ def _delivery(folder: str | None, name: str | None) -> dict:
34
+ delivery: dict = {}
35
+ if folder:
36
+ delivery["folder"] = folder
37
+ if name:
38
+ delivery["filename"] = name
39
+ return delivery
40
+
41
+
42
+ def video_request(
43
+ url: str,
44
+ *,
45
+ height: int | None = 1080,
46
+ codec: str = "auto",
47
+ container: str = "source",
48
+ subtitles: str | None = None,
49
+ audio_languages: str | None = None,
50
+ sponsorblock: str = "disabled",
51
+ playlist: bool = False,
52
+ credential: str | None = None,
53
+ folder: str | None = None,
54
+ name: str | None = None,
55
+ reuse: bool = True,
56
+ ) -> dict:
57
+ selection: dict = {}
58
+ if height:
59
+ selection["max_height"] = height
60
+ if codec != "auto":
61
+ selection["video_codec"] = {"mode": "prefer", "value": codec}
62
+ if audio_languages:
63
+ selection["audio_languages"] = _split(audio_languages)
64
+ options: dict = {"selection": selection, "container": container}
65
+ subs = _split(subtitles)
66
+ if subs:
67
+ options["processing"] = {"embed_subtitles": subs}
68
+ sb = SB_PRESETS.get(sponsorblock)
69
+ if sb:
70
+ options["sponsorblock"] = sb
71
+ output: dict = {"id": "video_main", "type": "video", "options": options}
72
+ if playlist:
73
+ output["scope"] = "each_item"
74
+ delivery = _delivery(folder, name)
75
+ if delivery:
76
+ output["delivery"] = delivery
77
+ return {
78
+ "schema_version": "1.0",
79
+ "sources": [url_source(url, credential)],
80
+ "outputs": [output],
81
+ "execution": {"reuse_existing": reuse},
82
+ }
83
+
84
+
85
+ def audio_request(
86
+ url: str,
87
+ *,
88
+ fmt: str = "source",
89
+ languages: str | None = None,
90
+ sponsorblock: str = "disabled",
91
+ playlist: bool = False,
92
+ credential: str | None = None,
93
+ folder: str | None = None,
94
+ name: str | None = None,
95
+ reuse: bool = True,
96
+ ) -> dict:
97
+ options: dict = {}
98
+ if fmt != "source":
99
+ options["format"] = fmt
100
+ langs = _split(languages)
101
+ if langs:
102
+ options["languages"] = langs
103
+ sb = SB_PRESETS.get(sponsorblock)
104
+ if sb:
105
+ options["sponsorblock"] = sb
106
+ output: dict = {"id": "audio_main", "type": "audio"}
107
+ if options:
108
+ output["options"] = options
109
+ if playlist:
110
+ output["scope"] = "each_item"
111
+ delivery = _delivery(folder, name)
112
+ if delivery:
113
+ output["delivery"] = delivery
114
+ return {
115
+ "schema_version": "1.0",
116
+ "sources": [url_source(url, credential)],
117
+ "outputs": [output],
118
+ "execution": {"reuse_existing": reuse},
119
+ }
content_cli/cli.py ADDED
@@ -0,0 +1,310 @@
1
+ """``content`` — the command-line client for the Content engine.
2
+
3
+ A thin wrapper over the official SDK (``content_sdk``): it parses arguments,
4
+ calls the SDK, and prints results. It never speaks HTTP itself, never runs the
5
+ planner, yt-dlp or ffmpeg — the SDK is the only door to the engine.
6
+ """
7
+
8
+ import argparse
9
+ import json
10
+ import sys
11
+ import time
12
+
13
+ from content_sdk import ContentClient, ContentError, TransportError
14
+ from content_sdk.resources import TERMINAL_STATUSES
15
+
16
+ from content_cli import __version__
17
+ from content_cli.builders import audio_request, video_request
18
+
19
+
20
+ def _out(obj, as_json: bool) -> None:
21
+ print(json.dumps(obj, indent=2, ensure_ascii=False) if as_json else obj)
22
+
23
+
24
+ def _print_job(job: dict) -> None:
25
+ print(f"{job['status']} {job['job_id']}")
26
+ for step in job.get("steps", []):
27
+ err = f" ! {step['error']}" if step.get("error") else ""
28
+ print(f" [{step['status']:>9}] {step['step_id']}{err}")
29
+
30
+
31
+ def _watch(client: ContentClient, job_id: str) -> str:
32
+ """Stream events until the job reaches a terminal state."""
33
+ seen = 0
34
+ while True:
35
+ for event in client.events(job_id, after_sequence=seen):
36
+ seen = event.sequence
37
+ print(f" {event.sequence:>3} {event.type} {event.data or ''}")
38
+ status = client.get_job(job_id).status
39
+ if status in TERMINAL_STATUSES:
40
+ print(f"→ {status}")
41
+ return status
42
+ time.sleep(2.0)
43
+
44
+
45
+ def _submit_and_maybe_watch(client: ContentClient, request: dict, args) -> int:
46
+ job = client.submit(request)
47
+ for warning in job.data.warnings:
48
+ print(f"warning: {warning['code']}: {warning['message']}", file=sys.stderr)
49
+ print(job.id)
50
+ if getattr(args, "watch", False):
51
+ status = _watch(client, job.id)
52
+ return 0 if status in ("succeeded", "partially_succeeded") else 1
53
+ return 0
54
+
55
+
56
+ def _cmd_analyze(client: ContentClient, args) -> int:
57
+ source: dict = {"id": "main", "type": args.type}
58
+ if args.type == "url":
59
+ source["uri"] = args.target
60
+ elif args.type == "file":
61
+ source["path"] = args.target
62
+ else:
63
+ source["content"] = args.target
64
+ if args.credential:
65
+ source["auth"] = {"credential_id": args.credential}
66
+ analysis = client.analyze([source])
67
+ entry = analysis.sources[0]
68
+ if args.json:
69
+ _out(entry.model_dump(), True)
70
+ return 0
71
+ print(f"{entry.resource_type} · {entry.title or '(untitled)'}")
72
+ # An analysis is addressable (ADR 0014): resolve what can be produced from it.
73
+ caps = client.get_capabilities(analysis.id)
74
+ for cap in caps.sources[0].capabilities:
75
+ print(f" {cap.status:>11} {cap.id}")
76
+ if entry.entries:
77
+ print(f" collection: {len(entry.entries)} items")
78
+ print(f"analysis_id: {analysis.id}")
79
+ return 0
80
+
81
+
82
+ def _cmd_submit(client: ContentClient, args) -> int:
83
+ if args.file == "-":
84
+ raw = sys.stdin.read()
85
+ else:
86
+ with open(args.file) as handle:
87
+ raw = handle.read()
88
+ return _submit_and_maybe_watch(client, json.loads(raw), args)
89
+
90
+
91
+ def _cmd_video(client: ContentClient, args) -> int:
92
+ request = video_request(
93
+ args.url,
94
+ height=args.height,
95
+ codec=args.codec,
96
+ container=args.container,
97
+ subtitles=args.subs,
98
+ audio_languages=args.audio_langs,
99
+ sponsorblock=args.sponsorblock,
100
+ playlist=args.playlist,
101
+ credential=args.credential,
102
+ folder=args.folder,
103
+ name=args.name,
104
+ )
105
+ return _submit_and_maybe_watch(client, request, args)
106
+
107
+
108
+ def _cmd_audio(client: ContentClient, args) -> int:
109
+ request = audio_request(
110
+ args.url,
111
+ fmt=args.format,
112
+ languages=args.audio_langs,
113
+ sponsorblock=args.sponsorblock,
114
+ playlist=args.playlist,
115
+ credential=args.credential,
116
+ folder=args.folder,
117
+ name=args.name,
118
+ )
119
+ return _submit_and_maybe_watch(client, request, args)
120
+
121
+
122
+ def _cmd_download(client: ContentClient, args) -> int:
123
+ data = client.artifact_bytes(args.artifact_id)
124
+ if args.output == "-":
125
+ sys.stdout.buffer.write(data)
126
+ else:
127
+ with open(args.output, "wb") as handle:
128
+ handle.write(data)
129
+ print(f"wrote {len(data)} bytes to {args.output}")
130
+ return 0
131
+
132
+
133
+ def _add_launch_flags(parser: argparse.ArgumentParser) -> None:
134
+ parser.add_argument("--credential", help="server-side cookie credential id")
135
+ parser.add_argument("--folder", help="delivery sub-folder")
136
+ parser.add_argument("--name", help="delivery file base name")
137
+ parser.add_argument("--sponsorblock", default="disabled", help="SB preset")
138
+ parser.add_argument("--audio-langs", dest="audio_langs", help="comma-separated")
139
+ parser.add_argument(
140
+ "--playlist", action="store_true", help="download each playlist item"
141
+ )
142
+ parser.add_argument("--watch", action="store_true", help="follow until done")
143
+
144
+
145
+ def build_parser() -> argparse.ArgumentParser:
146
+ parser = argparse.ArgumentParser(prog="content", description=__doc__)
147
+ parser.add_argument("--api-url", dest="api_url", help="Content API base URL")
148
+ parser.add_argument("--json", action="store_true", help="raw JSON output")
149
+ # The installed release, from the package's own metadata rather than a
150
+ # second literal: `content --version` must answer for the wheel a user
151
+ # actually has, which is the first thing to check in a bug report.
152
+ parser.add_argument(
153
+ "--version",
154
+ action="version",
155
+ version=f"content {__version__}",
156
+ help="show the installed Content CLI version",
157
+ )
158
+ sub = parser.add_subparsers(dest="command", required=True)
159
+
160
+ sub.add_parser("health")
161
+ sub.add_parser("config")
162
+
163
+ p = sub.add_parser("analyze", help="analyze a source")
164
+ p.add_argument("target")
165
+ p.add_argument("--type", default="url", choices=["url", "file", "text"])
166
+ p.add_argument("--credential")
167
+
168
+ p = sub.add_parser("analysis", help="fetch a stored analysis by id")
169
+ p.add_argument("analysis_id")
170
+
171
+ p = sub.add_parser("video", help="download a video (shortcut)")
172
+ p.add_argument("url")
173
+ p.add_argument("--height", type=int, default=1080)
174
+ p.add_argument("--codec", default="auto", choices=["auto", "av1", "vp9", "h264"])
175
+ p.add_argument("--container", default="source", choices=["source", "mkv", "mp4"])
176
+ p.add_argument("--subs", help="subtitle languages to embed (comma-separated)")
177
+ _add_launch_flags(p)
178
+
179
+ p = sub.add_parser("audio", help="download audio (shortcut)")
180
+ p.add_argument("url")
181
+ p.add_argument(
182
+ "--format", default="source", choices=["source", "opus", "mp3", "m4a"]
183
+ )
184
+ _add_launch_flags(p)
185
+
186
+ p = sub.add_parser("submit", help="submit a GenerationRequest JSON (file or -)")
187
+ p.add_argument("file")
188
+ p.add_argument("--watch", action="store_true")
189
+
190
+ p = sub.add_parser("jobs", help="list recent jobs")
191
+ p.add_argument("--limit", type=int, default=20)
192
+
193
+ p = sub.add_parser("job", help="show a job")
194
+ p.add_argument("job_id")
195
+
196
+ p = sub.add_parser("watch", help="follow a job until it ends")
197
+ p.add_argument("job_id")
198
+
199
+ p = sub.add_parser("artifacts", help="list a job's artifacts")
200
+ p.add_argument("job_id")
201
+
202
+ p = sub.add_parser("download", help="download an artifact")
203
+ p.add_argument("artifact_id")
204
+ p.add_argument("-o", "--output", default="-", help="output file, or - for stdout")
205
+
206
+ p = sub.add_parser("cancel")
207
+ p.add_argument("job_id")
208
+ p = sub.add_parser("retry")
209
+ p.add_argument("job_id")
210
+ return parser
211
+
212
+
213
+ def run(argv: list[str], client: ContentClient) -> int:
214
+ args = build_parser().parse_args(argv)
215
+ cmd = args.command
216
+ if cmd == "health":
217
+ _out(client.health(), True)
218
+ elif cmd == "config":
219
+ _out(client.config(), True)
220
+ elif cmd == "analyze":
221
+ return _cmd_analyze(client, args)
222
+ elif cmd == "analysis":
223
+ _out(client.get_analysis(args.analysis_id).data.model_dump(), True)
224
+ elif cmd == "video":
225
+ return _cmd_video(client, args)
226
+ elif cmd == "audio":
227
+ return _cmd_audio(client, args)
228
+ elif cmd == "submit":
229
+ return _cmd_submit(client, args)
230
+ elif cmd == "jobs":
231
+ rows = client.list_jobs(limit=args.limit)
232
+ if args.json:
233
+ _out([r.model_dump() for r in rows], True)
234
+ else:
235
+ for row in rows:
236
+ print(f"{row.status:>11} {row.job_id}")
237
+ elif cmd == "job":
238
+ job = client.get_job(args.job_id).data.model_dump()
239
+ _out(job, True) if args.json else _print_job(job)
240
+ elif cmd == "watch":
241
+ status = _watch(client, args.job_id)
242
+ return 0 if status in ("succeeded", "partially_succeeded") else 1
243
+ elif cmd == "artifacts":
244
+ arts = client.artifacts(args.job_id)
245
+ if args.json:
246
+ _out([a.model_dump() for a in arts], True)
247
+ else:
248
+ for a in arts:
249
+ print(f"{a.id} {a.filename} {a.size_bytes}B")
250
+ elif cmd == "download":
251
+ return _cmd_download(client, args)
252
+ elif cmd == "cancel":
253
+ _out(client.cancel(args.job_id), True)
254
+ elif cmd == "retry":
255
+ _out(client.retry(args.job_id).data.model_dump(), True)
256
+ return 0
257
+
258
+
259
+ def _describe(exc: ContentError) -> str:
260
+ """One readable line per problem, from the contract's own error shape.
261
+
262
+ Every rejection now comes back as `{detail: {errors: [{code, path,
263
+ message}]}}` — one shape for schema violations and engine refusals alike —
264
+ so there is no reason to print a raw Python dict at somebody.
265
+ """
266
+ if isinstance(exc, TransportError):
267
+ return f"cannot reach the engine — {exc}"
268
+ body = getattr(exc, "body", None)
269
+ detail = body.get("detail") if isinstance(body, dict) else None
270
+ if isinstance(detail, dict) and isinstance(detail.get("errors"), list):
271
+ lines = []
272
+ for error in detail["errors"]:
273
+ where = f" at {error['path']}" if error.get("path") else ""
274
+ code = f" [{error['code']}]" if error.get("code") else ""
275
+ lines.append(f"{error.get('message', 'rejected')}{where}{code}")
276
+ return "\n ".join(lines)
277
+ if isinstance(detail, str):
278
+ return detail
279
+ return str(body if body is not None else exc)
280
+
281
+
282
+ def main(argv: list[str] | None = None) -> int:
283
+ argv = list(sys.argv[1:] if argv is None else argv)
284
+ # Peel the global --api-url before argparse sees it, so it can be given
285
+ # before the subcommand. A missing value used to raise IndexError here —
286
+ # a traceback for a typo.
287
+ api_url = None
288
+ if "--api-url" in argv:
289
+ i = argv.index("--api-url")
290
+ if i + 1 >= len(argv):
291
+ print("error: --api-url needs a value", file=sys.stderr)
292
+ return 2
293
+ api_url = argv[i + 1]
294
+ del argv[i : i + 2]
295
+ client = ContentClient(api_url)
296
+ try:
297
+ return run(argv, client)
298
+ # ContentError, not APIError: a refused connection raises TransportError,
299
+ # and "the engine is not running" is the most common failure of all — it
300
+ # used to print a sixty-line traceback.
301
+ except ContentError as exc:
302
+ print(f"error: {_describe(exc)}", file=sys.stderr)
303
+ return 2
304
+ except (OSError, ValueError) as exc:
305
+ print(f"error: {exc}", file=sys.stderr)
306
+ return 2
307
+
308
+
309
+ if __name__ == "__main__":
310
+ raise SystemExit(main())
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: content-cli
3
+ Version: 0.2.0
4
+ Summary: Command-line client for the Content engine (talks to /api/v1).
5
+ Project-URL: Homepage, https://github.com/LatentNoise/content
6
+ Project-URL: Source, https://github.com/LatentNoise/content
7
+ Project-URL: Issues, https://github.com/LatentNoise/content/issues
8
+ Project-URL: Documentation, https://github.com/LatentNoise/content/blob/main/docs/README.md
9
+ Author: Yann Orieult
10
+ License-Expression: AGPL-3.0-or-later
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: cli,content,media,self-hosted,yt-dlp
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Multimedia :: Video
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: content-sdk==0.2.0
25
+ Description-Content-Type: text/markdown
26
+
27
+ # `content` — Content CLI
28
+
29
+ A thin command-line client for the Content engine, built on the official
30
+ [Python SDK](../../packages/python-sdk/README.md) (`content_sdk`) — it never
31
+ speaks HTTP itself and never runs the planner, yt-dlp or ffmpeg. Ergonomic
32
+ shortcuts (`video`, `audio`) are normalized to canonical `GenerationRequest`s;
33
+ there is no parallel contract.
34
+
35
+ ## Install
36
+
37
+ Once published, the CLI is an ordinary Python application — nothing to clone:
38
+
39
+ ```bash
40
+ uv tool install content-cli # isolated, on your PATH — recommended
41
+ content --help
42
+
43
+ # or
44
+ pipx install content-cli
45
+ ```
46
+
47
+ `content-cli` pulls `content-sdk` from PyPI as an ordinary dependency, pinned
48
+ to the matching release.
49
+
50
+ > **Not published yet.** Until the first publication the packages are attached
51
+ > to each GitHub release as wheels; see *From a release* below. The commands
52
+ > above are what will work afterwards.
53
+
54
+ ### From a release (today)
55
+
56
+ Download `content_sdk-<version>-py3-none-any.whl` and
57
+ `content_cli-<version>-py3-none-any.whl` from the
58
+ [latest release](https://github.com/LatentNoise/content/releases/latest), then:
59
+
60
+ ```bash
61
+ uv tool install ./content_cli-<version>-py3-none-any.whl \
62
+ --find-links . # --find-links lets it resolve the SDK beside it
63
+ ```
64
+
65
+ ### From a clone
66
+
67
+ ```bash
68
+ pip install ./packages/python-sdk ./apps/cli # exposes `content`
69
+ ```
70
+
71
+ ### For development
72
+
73
+ ```bash
74
+ make install # editable installs of the engine, SDK, CLI and MCP in one venv
75
+ ```
76
+
77
+ Build the distributions yourself with `make wheels` (they land in `dist/`).
78
+
79
+ ### Point it at your engine
80
+
81
+ `--api-url URL` or `CONTENT_API_URL` (default `http://localhost:8010`):
82
+
83
+ ```bash
84
+ export CONTENT_API_URL=http://nas.local:8010
85
+ content health
86
+ ```
87
+
88
+ ## Commands
89
+
90
+ ```bash
91
+ content health
92
+ content config
93
+ content analyze https://youtu.be/… [--credential youtube]
94
+ content analysis <analysis_id> # re-fetch a stored analysis (ADR 0014)
95
+ content video https://youtu.be/… --height 1080 --container mkv --subs en,fr --watch
96
+ content audio https://youtu.be/… --format opus --folder music --name track --watch
97
+ content video https://…/playlist?list=… --playlist --watch # each item
98
+ content submit request.json --watch # raw GenerationRequest (or - for stdin)
99
+ content jobs
100
+ content job <job_id>
101
+ content watch <job_id>
102
+ content artifacts <job_id>
103
+ content download <artifact_id> -o out.mkv
104
+ content cancel <job_id> ; content retry <job_id>
105
+ ```
106
+
107
+ Global flags: `--api-url URL` and `--json` (raw JSON output) go before the
108
+ subcommand. Exit code is non-zero on API errors or a failed watched job.
@@ -0,0 +1,10 @@
1
+ content_cli/__init__.py,sha256=VFYxWH1qJJJ4z8A3i4HRyqPREYJJZUuBCbo43K8vLfg,85
2
+ content_cli/__main__.py,sha256=9lyRRqrpVrCBYTiaz5xRwl-7xzsF-TbxKrocK0zX2XM,90
3
+ content_cli/builders.py,sha256=uLRBDlnAupSpIgfV0UBlPc6IRsuNCogBGiAzKMIoa54,3519
4
+ content_cli/cli.py,sha256=pbTG6NSIMCIJx8nAZ9oFZvLL_XmwDyFXe-Ce9E5sUU8,11336
5
+ content_cli-0.2.0.dist-info/METADATA,sha256=yhFkqxpXdsv9l8M5bJrzxw_p1CFhehhv3aoIgNxjpH4,3693
6
+ content_cli-0.2.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
7
+ content_cli-0.2.0.dist-info/entry_points.txt,sha256=-vC1YdvQAGa_AUqpq88zguX008NN2GBm_M-dTyQd1Ck,49
8
+ content_cli-0.2.0.dist-info/licenses/LICENSE,sha256=UzbgYnVAKZ_x28AC54pY4P1QmwYSVhDF8QJu-WpfK6I,34522
9
+ content_cli-0.2.0.dist-info/licenses/NOTICE,sha256=0uIDSiuf2W9Uk6j45FqjuhiXV0uN6MaHmyX68La_kic,2816
10
+ content_cli-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.31.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ content = content_cli.cli:main
@@ -0,0 +1,683 @@
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft
11
+ license for software and other kinds of works, specifically designed to
12
+ ensure cooperation with the community in the case of network server
13
+ software.
14
+
15
+ The licenses for most software and other practical works are designed
16
+ to take away your freedom to share and change the works. By contrast,
17
+ our General Public Licenses are intended to guarantee your freedom to
18
+ share and change all versions of a program--to make sure it remains free
19
+ software for all its users.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ them if you wish), that you receive source code or can get it if you
25
+ want it, that you can change the software or use pieces of it in new
26
+ free programs, and that you know you can do these things.
27
+
28
+ Developers that use our General Public Licenses protect your rights
29
+ with two steps: (1) assert copyright on the software, and (2) offer
30
+ you this License which gives you legal permission to copy, distribute
31
+ and/or modify the software.
32
+
33
+ A secondary benefit of defending all users' freedom is that
34
+ improvements made in alternate versions of the program, if they
35
+ receive widespread use, become available for other developers to
36
+ incorporate. Many developers of free software are heartened and
37
+ encouraged by the resulting cooperation. However, in the case of
38
+ software used on network servers, this result may fail to come about.
39
+ The GNU General Public License permits making a modified version and
40
+ letting the public access it on a server without ever releasing its
41
+ source code to the public.
42
+
43
+ The GNU Affero General Public License is designed specifically to
44
+ ensure that, in such cases, the modified source code becomes available
45
+ to the community. It requires the operator of a network server to
46
+ provide the source code of the modified version running there to the
47
+ users of that server. Therefore, public use of a modified version, on
48
+ a publicly accessible server, gives the public access to the source
49
+ code of the modified version.
50
+
51
+ An older license, called the Affero General Public License and
52
+ published by Affero, was designed to accomplish similar goals. This
53
+ is a different license, not a version of the Affero GPL, but Affero
54
+ has released a new version of the Affero GPL which permits relicensing
55
+ under this license.
56
+
57
+ The precise terms and conditions for copying, distribution and
58
+ modification follow.
59
+
60
+ TERMS AND CONDITIONS
61
+
62
+ 0. Definitions.
63
+
64
+ "This License" refers to version 3 of the GNU Affero General
65
+ Public License.
66
+
67
+ "Copyright" also means copyright-like laws that apply to other
68
+ kinds of works, such as semiconductor masks.
69
+
70
+ "The Program" refers to any copyrightable work licensed under this
71
+ License. Each licensee is addressed as "you". "Licensees" and
72
+ "recipients" may be individuals or organizations.
73
+
74
+ To "modify" a work means to copy from or adapt all or part of the
75
+ work in a fashion requiring copyright permission, other than the
76
+ making of an exact copy. The resulting work is called a "modified
77
+ version" of the earlier work or a work "based on" the earlier work.
78
+
79
+ A "covered work" means either the unmodified Program or a work
80
+ based on the Program.
81
+
82
+ To "propagate" a work means to do anything with it that, without
83
+ permission, would make you directly or secondarily liable for
84
+ infringement under applicable copyright law, except executing it on a
85
+ computer or modifying a private copy. Propagation includes copying,
86
+ distribution (with or without modification), making available to the
87
+ public, and in some countries other activities as well.
88
+
89
+ To "convey" a work means any kind of propagation that enables
90
+ other parties to make or receive copies. Mere interaction with a user
91
+ through a computer network, with no transfer of a copy, is not
92
+ conveying.
93
+
94
+ An interactive user interface displays "Appropriate Legal Notices"
95
+ to the extent that it includes a convenient and prominently visible
96
+ feature that (1) displays an appropriate copyright notice, and (2)
97
+ tells the user that there is no warranty for the work (except to the
98
+ extent that warranties are provided), that licensees may convey the
99
+ work under this License, and how to view a copy of this License. If
100
+ the interface presents a list of user commands or options, such as a
101
+ menu, a prominent item in the list meets this criterion.
102
+
103
+ 1. Source Code.
104
+
105
+ The "source code" for a work means the preferred form of the work
106
+ for making modifications to it. "Object code" means any non-source
107
+ form of a work.
108
+
109
+ A "Standard Interface" means an interface that either is an
110
+ official standard defined by a recognized standards body, or, in the
111
+ case of interfaces specified for a particular programming language,
112
+ one that is widely used among developers working in that language.
113
+
114
+ The "System Libraries" of an executable work include anything,
115
+ other than the work as a whole, that (a) is included in the normal
116
+ form of packaging a Major Component, but which is not part of that
117
+ Major Component, and (b) serves only to enable use of the work with
118
+ that Major Component, or to implement a Standard Interface for which
119
+ an implementation is available to the public in source code form. A
120
+ "Major Component", in this context, means a major essential component
121
+ (kernel, window system, and so on) of the specific operating system
122
+ (if any) on which the executable work runs, or a compiler used to
123
+ produce the work, or an object code interpreter used to run it.
124
+
125
+ The "Corresponding Source" for a work in object code form means
126
+ all the source code needed to generate, install, and (for an
127
+ executable work) run the object code and to modify the work,
128
+ including scripts to control those activities. However, it does not
129
+ include the work's System Libraries, or general-purpose tools or
130
+ generally available free programs which are used unmodified in
131
+ performing those activities but which are not part of the work. For
132
+ example, Corresponding Source includes interface definition files
133
+ associated with source files for the work, and the source code for
134
+ shared libraries and dynamically linked subprograms that the work is
135
+ specifically designed to require, such as by intimate data
136
+ communication or control flow between those subprograms and other
137
+ parts of the work.
138
+
139
+ The Corresponding Source need not include anything that users
140
+ can regenerate automatically from other parts of the Corresponding
141
+ Source.
142
+
143
+ The Corresponding Source for a work in source code form is that
144
+ same work.
145
+
146
+ 2. Basic Permissions.
147
+
148
+ All rights granted under this License are granted for the term of
149
+ copyright on the Program, and are irrevocable provided the stated
150
+ conditions are met. This License explicitly affirms your unlimited
151
+ permission to run the unmodified Program. The output from running a
152
+ covered work is covered by this License only if the output, given its
153
+ content, constitutes a covered work. This License acknowledges your
154
+ rights of fair use or other equivalent, as provided by copyright law.
155
+
156
+ You may make, run and propagate covered works that you do not
157
+ convey, without conditions so long as your license otherwise remains
158
+ in force. You may convey covered works to others for the sole
159
+ purpose of having them make modifications exclusively for you, or
160
+ provide you with facilities for running those works, provided that
161
+ you comply with the terms of this License in conveying all material
162
+ for which you do not control copyright. Those thus making or running
163
+ the covered works for you must do so exclusively on your behalf,
164
+ under your direction and control, on terms that prohibit them from
165
+ making any copies of your copyrighted material outside their
166
+ relationship with you.
167
+
168
+ Conveying under any other circumstances is permitted solely under
169
+ the conditions stated below. Sublicensing is not allowed; section 10
170
+ makes it unnecessary.
171
+
172
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
173
+
174
+ No covered work shall be deemed part of an effective technological
175
+ measure under any applicable law fulfilling obligations under article
176
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
177
+ similar laws prohibiting or restricting circumvention of such
178
+ measures.
179
+
180
+ When you convey a covered work, you waive any legal power to
181
+ forbid circumvention of technological measures to the extent such
182
+ circumvention is effected by exercising rights under this License
183
+ with respect to the covered work, and you disclaim any intention to
184
+ limit operation or modification of the work as a means of enforcing,
185
+ against the work's users, your or third parties' legal rights to
186
+ forbid circumvention of technological measures.
187
+
188
+ 4. Conveying Verbatim Copies.
189
+
190
+ You may convey verbatim copies of the Program's source code as
191
+ you receive it, in any medium, provided that you conspicuously and
192
+ appropriately publish on each copy an appropriate copyright notice;
193
+ keep intact all notices stating that this License and any
194
+ non-permissive terms added in accord with section 7 apply to the
195
+ code; keep intact all notices of the absence of any warranty; and
196
+ give all recipients a copy of this License along with the Program.
197
+
198
+ You may charge any price or no price for each copy that you
199
+ convey, and you may offer support or warranty protection for a fee.
200
+
201
+ 5. Conveying Modified Source Versions.
202
+
203
+ You may convey a work based on the Program, or the modifications
204
+ to produce it from the Program, in the form of source code under the
205
+ terms of section 4, provided that you also meet all of these
206
+ conditions:
207
+
208
+ a) The work must carry prominent notices stating that you modified
209
+ it, and giving a relevant date.
210
+
211
+ b) The work must carry prominent notices stating that it is
212
+ released under this License and any conditions added under section
213
+ 7. This requirement modifies the requirement in section 4 to
214
+ "keep intact all notices".
215
+
216
+ c) You must license the entire work, as a whole, under this
217
+ License to anyone who comes into possession of a copy. This
218
+ License will therefore apply, along with any applicable section 7
219
+ additional terms, to the whole of the work, and all its parts,
220
+ regardless of how they are packaged. This License gives no
221
+ permission to license the work in any other way, but it does not
222
+ invalidate such permission if you have separately received it.
223
+
224
+ d) If the work has interactive user interfaces, each must display
225
+ Appropriate Legal Notices; however, if the Program has interactive
226
+ interfaces that do not display Appropriate Legal Notices, your
227
+ work need not make them do so.
228
+
229
+ A compilation of a covered work with other separate and
230
+ independent works, which are not by their nature extensions of the
231
+ covered work, and which are not combined with it such as to form a
232
+ larger program, in or on a volume of a storage or distribution
233
+ medium, is called an "aggregate" if the compilation and its
234
+ resulting copyright are not used to limit the access or legal rights
235
+ of the compilation's users beyond what the individual works permit.
236
+ Inclusion of a covered work in an aggregate does not cause this
237
+ License to apply to the other parts of the aggregate.
238
+
239
+ 6. Conveying Non-Source Forms.
240
+
241
+ You may convey a covered work in object code form under the terms
242
+ of sections 4 and 5, provided that you also convey the
243
+ machine-readable Corresponding Source under the terms of this
244
+ License, in one of these ways:
245
+
246
+ a) Convey the object code in, or embodied in, a physical product
247
+ (including a physical distribution medium), accompanied by the
248
+ Corresponding Source fixed on a durable physical medium
249
+ customarily used for software interchange.
250
+
251
+ b) Convey the object code in, or embodied in, a physical product
252
+ (including a physical distribution medium), accompanied by a
253
+ written offer, valid for at least three years and valid for as
254
+ long as you offer spare parts or customer support for that product
255
+ model, to give anyone who possesses the object code either (1) a
256
+ copy of the Corresponding Source for all the software in the
257
+ product that is covered by this License, on a durable physical
258
+ medium customarily used for software interchange, for a price no
259
+ more than your reasonable cost of physically performing this
260
+ conveying of source, or (2) access to copy the
261
+ Corresponding Source from a network server at no charge.
262
+
263
+ c) Convey individual copies of the object code with a copy of the
264
+ written offer to provide the Corresponding Source. This
265
+ alternative is allowed only occasionally and noncommercially, and
266
+ only if you received the object code with such an offer, in accord
267
+ with subsection 6b.
268
+
269
+ d) Convey the object code by offering access from a designated
270
+ place (gratis or for a charge), and offer equivalent access to the
271
+ Corresponding Source in the same way through the same place at no
272
+ further charge. You need not require recipients to copy the
273
+ Corresponding Source along with the object code. If the place to
274
+ copy the object code is a network server, the Corresponding Source
275
+ may be on a different server (operated by you or a third party)
276
+ that supports equivalent copying facilities, provided you maintain
277
+ clear directions next to the object code saying where to find the
278
+ Corresponding Source. Regardless of what server hosts the
279
+ Corresponding Source, you remain obligated to ensure that it is
280
+ available for as long as needed to satisfy these requirements.
281
+
282
+ e) Convey the object code using peer-to-peer transmission, provided
283
+ you inform other peers where the object code and Corresponding
284
+ Source of the work are being offered to the general public at no
285
+ charge under subsection 6d.
286
+
287
+ A separable portion of the object code, whose source code is
288
+ excluded from the Corresponding Source as a System Library, need not
289
+ be included in conveying the object code work.
290
+
291
+ A "User Product" is either (1) a "consumer product", which means
292
+ any tangible personal property which is normally used for personal,
293
+ family, or household purposes, or (2) anything designed or sold for
294
+ incorporation into a dwelling. In determining whether a product is a
295
+ consumer product, doubtful cases shall be resolved in favor of
296
+ coverage. For a particular product received by a particular user,
297
+ "normally used" refers to a typical or common use of that class of
298
+ product, regardless of the status of the particular user or of the
299
+ way in which the particular user actually uses, or expects or is
300
+ expected to use, the product. A product is a consumer product
301
+ regardless of whether the product has substantial commercial,
302
+ industrial or non-consumer uses, unless such uses represent the only
303
+ significant mode of use of the product.
304
+
305
+ "Installation Information" for a User Product means any methods,
306
+ procedures, authorization keys, or other information required to
307
+ install and execute modified versions of a covered work in that User
308
+ Product from a modified version of its Corresponding Source. The
309
+ information must suffice to ensure that the continued functioning of
310
+ the modified object code is in no case prevented or interfered with
311
+ solely because modification has been made.
312
+
313
+ If you convey an object code work under this section in, or with,
314
+ or specifically for use in, a User Product, and the conveying occurs
315
+ as part of a transaction in which the right of possession and use of
316
+ the User Product is transferred to the recipient in perpetuity or for
317
+ a fixed term (regardless of how the transaction is characterized),
318
+ the Corresponding Source conveyed under this section must be
319
+ accompanied by the Installation Information. But this requirement
320
+ does not apply if neither you nor any third party retains the
321
+ ability to install modified object code on the User Product (for
322
+ example, the work has been installed in ROM).
323
+
324
+ The requirement to provide Installation Information does not
325
+ include a requirement to continue to provide support service,
326
+ warranty, or updates for a work that has been modified or installed
327
+ by the recipient, or for the User Product in which it has been
328
+ modified or installed. Access to a network may be denied when the
329
+ modification itself materially and adversely affects the operation of
330
+ the network or violates the rules and protocols for communication
331
+ across the network.
332
+
333
+ Corresponding Source conveyed, and Installation Information
334
+ provided, in accord with this section must be in a format that is
335
+ publicly documented (and with an implementation available to the
336
+ public in source code form), and must require no special password or
337
+ key for unpacking, reading or copying.
338
+
339
+ 7. Additional Terms.
340
+
341
+ "Additional permissions" are terms that supplement the terms of
342
+ this License by making exceptions from one or more of its
343
+ conditions. Additional permissions that are applicable to the
344
+ entire Program shall be treated as though they were included in this
345
+ License, to the extent that they are valid under applicable law. If
346
+ additional permissions apply only to part of the Program, that part
347
+ may be used separately under those permissions, but the entire
348
+ Program remains governed by this License without regard to the
349
+ additional permissions.
350
+
351
+ When you convey a copy of a covered work, you may at your option
352
+ remove any additional permissions from that copy, or from any part
353
+ of it. (Additional permissions may be written to require their own
354
+ removal in certain cases when you modify the work.) You may place
355
+ additional permissions on material, added by you to a covered work,
356
+ for which you have or can give appropriate copyright permission.
357
+
358
+ Notwithstanding any other provision of this License, for material
359
+ you add to a covered work, you may (if authorized by the copyright
360
+ holders of that material) supplement the terms of this License with
361
+ terms:
362
+
363
+ a) Disclaiming warranty or limiting liability differently from the
364
+ terms of sections 15 and 16 of this License; or
365
+
366
+ b) Requiring preservation of specified reasonable legal notices or
367
+ author attributions in that material or in the Appropriate Legal
368
+ Notices displayed by works containing it; or
369
+
370
+ c) Prohibiting misrepresentation of the origin of that material, or
371
+ requiring that modified versions of such material be marked in
372
+ reasonable ways as different from the original version; or
373
+
374
+ d) Limiting the use for publicity purposes of names of licensors or
375
+ authors of the material; or
376
+
377
+ e) Declining to grant rights under trademark law for use of some
378
+ trade names, trademarks, or service marks; or
379
+
380
+ f) Requiring indemnification of licensors and authors of that
381
+ material by anyone who conveys the material (or modified versions
382
+ of it) with contractual assumptions of liability to the recipient,
383
+ for any liability that these contractual assumptions directly
384
+ impose on those licensors and authors.
385
+
386
+ All other non-permissive additional terms are considered "further
387
+ restrictions" within the meaning of section 10. If the Program as
388
+ you received it, or any part of it, contains a notice stating that it
389
+ is governed by this License along with a term that is a further
390
+ restriction, you may remove that term. If a license document
391
+ contains a further restriction but permits relicensing or conveying
392
+ under this License, you may add to a covered work material governed
393
+ by the terms of that license document, provided that the further
394
+ restriction does not survive such relicensing or conveying.
395
+
396
+ If you add terms to a covered work in accord with this section,
397
+ you must place, in the relevant source files, a statement of the
398
+ additional terms that apply to those files, or a notice indicating
399
+ where to find the applicable terms.
400
+
401
+ Additional terms, permissive or non-permissive, may be stated in
402
+ the form of a separately written license, or stated as exceptions;
403
+ the above requirements apply either way.
404
+
405
+ 8. Termination.
406
+
407
+ You may not propagate or modify a covered work except as
408
+ expressly provided under this License. Any attempt otherwise to
409
+ propagate or modify it is void, and will automatically terminate your
410
+ rights under this License (including any patent licenses granted
411
+ under the third paragraph of section 11).
412
+
413
+ However, if you cease all violation of this License, then your
414
+ license from a particular copyright holder is reinstated (a)
415
+ provisionally, unless and until the copyright holder explicitly and
416
+ finally terminates your license, and (b) permanently, if the
417
+ copyright holder fails to notify you of the violation by some
418
+ reasonable means prior to 60 days after the cessation.
419
+
420
+ Moreover, your license from a particular copyright holder is
421
+ reinstated permanently if the copyright holder notifies you of the
422
+ violation by some reasonable means, this is the first time you have
423
+ received notice of violation of this License (for any work) from
424
+ that copyright holder, and you cure the violation prior to 30 days
425
+ after your receipt of the notice.
426
+
427
+ Termination of your rights under this section does not terminate
428
+ the licenses of parties who have received copies or rights from you
429
+ under this License. If your rights have been terminated and not
430
+ permanently reinstated, you do not qualify to receive new licenses
431
+ for the same material under section 10.
432
+
433
+ 9. Acceptance Not Required for Having Copies.
434
+
435
+ You are not required to accept this License in order to receive or
436
+ run a copy of the Program. Ancillary propagation of a covered work
437
+ occurring solely as a consequence of using peer-to-peer
438
+ transmission to receive a copy likewise does not require acceptance.
439
+ However, nothing other than this License grants you permission to
440
+ propagate or modify any covered work. These actions infringe
441
+ copyright if you do not accept this License. Therefore, by
442
+ modifying or propagating a covered work, you indicate your
443
+ acceptance of this License to do so.
444
+
445
+ 10. Automatic Licensing of Downstream Recipients.
446
+
447
+ Each time you convey a covered work, the recipient automatically
448
+ receives a license from the original licensors, to run, modify and
449
+ propagate that work, subject to this License. You are not
450
+ responsible for enforcing compliance by third parties with this
451
+ License.
452
+
453
+ An "entity transaction" is a transaction transferring control of
454
+ an organization, or substantially all assets of one, or subdividing
455
+ an organization, or merging organizations. If propagation of a
456
+ covered work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate
467
+ litigation (including a cross-claim or counterclaim in a lawsuit)
468
+ alleging that any patent claim is infringed by making, using,
469
+ selling, offering for sale, or importing the Program or any portion
470
+ of it.
471
+
472
+ 11. Patents.
473
+
474
+ A "contributor" is a copyright holder who authorizes use under
475
+ this License of the Program or a work on which the Program is based.
476
+ The work thus licensed is called the contributor's "contributor
477
+ version".
478
+
479
+ A contributor's "essential patent claims" are all patent claims
480
+ owned or controlled by the contributor, whether already acquired or
481
+ hereafter acquired, that would be infringed by some manner, permitted
482
+ by this License, of making, using, or selling its contributor
483
+ version, but do not include claims that would be infringed only as a
484
+ consequence of further modification of the contributor version. For
485
+ purposes of this definition, "control" includes the right to grant
486
+ patent sublicenses in a manner consistent with the requirements of
487
+ this License.
488
+
489
+ Each contributor grants you a non-exclusive, worldwide,
490
+ royalty-free patent license under the contributor's essential patent
491
+ claims, to make, use, sell, offer for sale, import and otherwise
492
+ run, modify and propagate the contents of its contributor version.
493
+
494
+ In the following three paragraphs, a "patent license" is any
495
+ express agreement or commitment, however denominated, not to enforce
496
+ a patent (such as an express permission to practice a patent or
497
+ covenant not to sue for patent infringement). To "grant" such a
498
+ patent license to a party means to make such an agreement or
499
+ commitment not to enforce a patent against the party.
500
+
501
+ If you convey a covered work, knowingly relying on a patent
502
+ license, and the Corresponding Source of the work is not available
503
+ for anyone to copy, free of charge and under the terms of this
504
+ License, through a publicly available network server or other
505
+ readily accessible means, then you must either (1) cause the
506
+ Corresponding Source to be so available, or (2) arrange to deprive
507
+ yourself of the benefit of the patent license for this particular
508
+ work, or (3) arrange, in a manner consistent with the requirements
509
+ of this License, to extend the patent license to downstream
510
+ recipients. "Knowingly relying" means you have actual knowledge
511
+ that, but for the patent license, your conveying the covered work in
512
+ a country, or your recipient's use of the covered work in a country,
513
+ would infringe one or more identifiable patents in that country that
514
+ you have reason to believe are valid.
515
+
516
+ If, pursuant to or in connection with a single transaction or
517
+ arrangement, you convey, or propagate by procuring conveyance of, a
518
+ covered work, and grant a patent license to some of the parties
519
+ receiving the covered work authorizing them to use, propagate,
520
+ modify or convey a specific copy of the covered work, then the
521
+ patent license you grant is automatically extended to all recipients
522
+ of the covered work and works based on it.
523
+
524
+ A patent license is "discriminatory" if it does not include within
525
+ the scope of its coverage, prohibits the exercise of, or is
526
+ conditioned on the non-exercise of one or more of the rights that
527
+ are specifically granted under this License. You may not convey a
528
+ covered work if you are a party to an arrangement with a third party
529
+ that is in the business of distributing software, under which you
530
+ make payment to the third party based on the extent of your activity
531
+ of conveying the work, and under which the third party grants, to
532
+ any of the parties who would receive the covered work from you, a
533
+ discriminatory patent license (a) in connection with copies of the
534
+ covered work conveyed by you (or copies made from those copies), or
535
+ (b) primarily for and in connection with specific products or
536
+ compilations that contain the covered work, unless you entered into
537
+ that arrangement, or that patent license was granted, prior to 28
538
+ March 2007.
539
+
540
+ Nothing in this License shall be construed as excluding or
541
+ limiting any implied license or other defenses to infringement that
542
+ may otherwise be available to you under applicable patent law.
543
+
544
+ 12. No Surrender of Others' Freedom.
545
+
546
+ If conditions are imposed on you (whether by court order,
547
+ agreement or otherwise) that contradict the conditions of this
548
+ License, they do not excuse you from the conditions of this License.
549
+ If you cannot convey a covered work so as to satisfy simultaneously
550
+ your obligations under this License and any other pertinent
551
+ obligations, then as a consequence you may not convey it at all.
552
+ For example, if you agree to terms that obligate you to collect a
553
+ royalty for further conveying from those to whom you convey the
554
+ Program, the only way you could satisfy both those terms and this
555
+ License would be to refrain entirely from conveying the Program.
556
+
557
+ 13. Remote Network Interaction; Use with the GNU General Public License.
558
+
559
+ Notwithstanding any other provision of this License, if you modify
560
+ the Program, your modified version must prominently offer all users
561
+ interacting with it remotely through a computer network (if your
562
+ version supports such interaction) an opportunity to receive the
563
+ Corresponding Source of your version by providing access to the
564
+ Corresponding Source from a network server at no charge, through
565
+ some standard or customary means of facilitating copying of software.
566
+ This Corresponding Source shall include the Corresponding Source for
567
+ any work covered by version 3 of the GNU General Public License that
568
+ is incorporated pursuant to the following paragraph.
569
+
570
+ Notwithstanding any other provision of this License, you have
571
+ permission to link or combine any covered work with a work licensed
572
+ under version 3 of the GNU General Public License into a single
573
+ combined work, and to convey the resulting work. The terms of this
574
+ License will continue to apply to the part which is the covered
575
+ work, but the work with which it is combined will remain governed by
576
+ version 3 of the GNU General Public License.
577
+
578
+ 14. Revised Versions of this License.
579
+
580
+ The Free Software Foundation may publish revised and/or new
581
+ versions of the GNU Affero General Public License from time to time.
582
+ Such new versions will be similar in spirit to the present version,
583
+ but may differ in detail to address new problems or concerns.
584
+
585
+ Each version is given a distinguishing version number. If the
586
+ Program specifies that a certain numbered version of the GNU Affero
587
+ General Public License "or any later version" applies to it, you have
588
+ the option of following the terms and conditions either of that
589
+ numbered version or of any later version published by the Free
590
+ Software Foundation. If the Program does not specify a version
591
+ number of the GNU Affero General Public License, you may choose any
592
+ version ever published by the Free Software Foundation.
593
+
594
+ If the Program specifies that a proxy can decide which future
595
+ versions of the GNU Affero General Public License can be used, that
596
+ proxy's public statement of acceptance of a version permanently
597
+ authorizes you to choose that version for the Program.
598
+
599
+ Later license versions may give you additional or different
600
+ permissions. However, no additional obligations are imposed on any
601
+ author or copyright holder as a result of your choosing to follow a
602
+ later version.
603
+
604
+ 15. Disclaimer of Warranty.
605
+
606
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
607
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
608
+ COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
609
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
610
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
611
+ FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
612
+ AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
613
+ DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
614
+ CORRECTION.
615
+
616
+ 16. Limitation of Liability.
617
+
618
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
619
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
620
+ AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
621
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
622
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
623
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
624
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
625
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
626
+ OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
627
+
628
+ 17. Interpretation of Sections 15 and 16.
629
+
630
+ If the disclaimer of warranty and limitation of liability provided
631
+ above cannot be given local legal effect according to their terms,
632
+ reviewing courts shall apply local law that most closely approximates
633
+ an absolute waiver of all civil liability in connection with the
634
+ Program, unless a warranty or assumption of liability accompanies a
635
+ copy of the Program in return for a fee.
636
+
637
+ END OF TERMS AND CONDITIONS
638
+
639
+ How to Apply These Terms to Your New Programs
640
+
641
+ If you develop a new program, and you want it to be of the
642
+ greatest possible use to the public, the best way to achieve this is
643
+ to make it free software which everyone can redistribute and change
644
+ under these terms.
645
+
646
+ To do so, attach the following notices to the program. It is
647
+ safest to attach them to the start of each source file to most
648
+ effectively state the exclusion of warranty; and each file should
649
+ have at least the "copyright" line and a pointer to where the full
650
+ notice is found.
651
+
652
+ <one line to give the program's name and a brief idea of what it does.>
653
+ Copyright (C) <year> <name of author>
654
+
655
+ This program is free software: you can redistribute it and/or modify
656
+ it under the terms of the GNU Affero General Public License as
657
+ published by the Free Software Foundation, either version 3 of the
658
+ License, or (at your option) any later version.
659
+
660
+ This program is distributed in the hope that it will be useful,
661
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
662
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
663
+ GNU Affero General Public License for more details.
664
+
665
+ You should have received a copy of the GNU Affero General Public
666
+ License along with this program. If not, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ Also add information on how to contact you by electronic and paper
670
+ mail.
671
+
672
+ If your software can interact with users remotely through a
673
+ computer network, you should also make sure that it provides a way
674
+ for users to get its source. For example, if your program is a web
675
+ application, its interface could display a "Source" link that leads
676
+ users to an archive of the code. There are many ways you could
677
+ offer source, and different solutions will be better for different
678
+ programs; see section 13 for the specific requirements.
679
+
680
+ You should also get your employer (if you work as a programmer) or
681
+ school, if any, to sign a "copyright disclaimer" for the program, if
682
+ necessary. For more information on this, and how to apply and
683
+ follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
@@ -0,0 +1,65 @@
1
+ Content — declarative resource-to-artifact generation engine
2
+ Copyright (C) 2026 Yann Orieult
3
+
4
+ SPDX-License-Identifier: AGPL-3.0-or-later
5
+ Source: https://github.com/LatentNoise/content
6
+
7
+ This program is free software: you can redistribute it and/or modify it under
8
+ the terms of the GNU Affero General Public License as published by the Free
9
+ Software Foundation, either version 3 of the License, or (at your option) any
10
+ later version.
11
+
12
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY
13
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
+ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Affero General Public License along
17
+ with this program. If not, see <https://www.gnu.org/licenses/>.
18
+
19
+ ---
20
+
21
+ Third-party components
22
+ ----------------------
23
+
24
+ Content depends on third-party software that it does not include: yt-dlp,
25
+ ffmpeg/ffprobe, Ollama, faster-whisper, and its Python dependencies. Each
26
+ remains under its own licence, held by its own authors, and nothing here alters
27
+ those terms. The container images built from this repository bundle some of
28
+ these; consult each component for its licence.
29
+
30
+ No additional restriction is imposed beyond the licences that apply.
31
+
32
+ Redistributed in the container images
33
+ -------------------------------------
34
+
35
+ The official container images built from this repository include the following
36
+ components in binary form. They are named here because redistribution, unlike a
37
+ runtime dependency, carries attribution obligations.
38
+
39
+ Typst — https://github.com/typst/typst
40
+ Copyright (c) The Typst Project Developers
41
+ Licensed under the Apache License, Version 2.0.
42
+ A copy of that licence is installed in the image at
43
+ /usr/local/share/licenses/typst/LICENSE, and is available at
44
+ <http://www.apache.org/licenses/LICENSE-2.0>.
45
+ Used as the default PDF renderer; the binary is unmodified.
46
+ Omit it at build time with --build-arg INSTALL_TYPST=false.
47
+
48
+ ReportLab — https://www.reportlab.com/
49
+ Copyright (c) ReportLab Europe Ltd.
50
+ Licensed under the BSD 3-Clause License.
51
+ Installed as a Python wheel; used as the fallback PDF renderer.
52
+
53
+ DejaVu fonts — https://dejavu-fonts.github.io/
54
+ Licensed under the DejaVu Fonts License (a permissive, Bitstream Vera
55
+ derived licence). Installed via the Alpine `ttf-dejavu` package and used for
56
+ PDF output outside the Latin-1 repertoire.
57
+
58
+ Copyright ownership
59
+ -------------------
60
+
61
+ Copyright in this project is held by its author alone. The project accepts no
62
+ code contributions (see CONTRIBUTING.md), so no third party holds copyright in
63
+ any part of it. That is deliberate: undivided ownership is what allows Content
64
+ to be offered under separate commercial terms alongside the AGPL — see
65
+ COMMERCIAL.md.