@boy-offi9-inc/tidepull 0.4.0 → 0.4.1
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.
- package/README.md +32 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
<img src="docs/assets/logo.svg" alt="tidepull logo" width="88" height="88">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/@boy-offi9-inc/tidepull)
|
|
6
|
+
[](https://www.npmjs.com/package/@boy-offi9-inc/tidepull)
|
|
7
|
+
[](https://github.com/boy-offi9-inc/Tidepull/actions/workflows/ci.yml)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
[](LICENSE)
|
|
11
|
+

|
|
12
|
+
|
|
5
13
|
# tidepull
|
|
6
14
|
|
|
7
15
|
A minimal, from-scratch media downloader **library** (and CLI) for Node. Minimal by design: a ~22 KB minified core with no runtime dependencies today (~9 KB gzip), fully typed, no terminal code in the core. Everything that isn't needed by every user is opt-in.
|
|
@@ -56,6 +64,19 @@ const files = await pullAll(g, "https://example.com/podcast.rss", { items: "1-3,
|
|
|
56
64
|
|
|
57
65
|
`g.resolve(url)` returns an `Info` or a `Playlist` (`isPlaylist(x)` tells you which). `g.extract(url)` still returns a single `Info` and refuses a playlist with a clear error. A failing item is thrown by default; pass `onError` to report it and continue. Template fields for playlist items: `%(playlist)s`, `%(playlist_index)02d`, `%(playlist_count)s`, `%(playlist_id)s`.
|
|
58
66
|
|
|
67
|
+
## Example
|
|
68
|
+
```console
|
|
69
|
+
$ tidepull -F URL # list formats
|
|
70
|
+
ID EXT RESOLUTION FPS | SIZE TBR PROTO | VCODEC ACODEC NOTE
|
|
71
|
+
hls-600 ts 640x360 | 600k hls | unknown unknown
|
|
72
|
+
hls-1200 ts 1280x720 | 1200k hls | unknown unknown
|
|
73
|
+
|
|
74
|
+
$ tidepull URL -P ~/Videos
|
|
75
|
+
[download] Destination: ~/Videos/master.ts
|
|
76
|
+
[download] 100% of 439.45KiB in 00:00
|
|
77
|
+
[done] ~/Videos/master.ts
|
|
78
|
+
```
|
|
79
|
+
|
|
59
80
|
## API (everything else is internal)
|
|
60
81
|
| Export | Purpose |
|
|
61
82
|
|---|---|
|
|
@@ -90,7 +111,17 @@ export default definePlugin({
|
|
|
90
111
|
```
|
|
91
112
|
Plugins run before built-ins; the generic fallback is always last. From disk: `import { loadPlugins } from "@boy-offi9-inc/tidepull/loader"` (the CLI does this for you, and bundles DASH). A plugin targeting a different `apiVersion` is refused with a clear message instead of failing mysteriously. **Plugins execute with your privileges. Only load code you trust.** See `src/extractors/_template.ts`.
|
|
92
113
|
|
|
93
|
-
Ready-made site plugins live in
|
|
114
|
+
Ready-made site plugins live in the public [boy-offi9-inc/tidepull-plugins](https://github.com/boy-offi9-inc/tidepull-plugins) repo; its `docs/PLUGINS.md` is the contract a plugin must satisfy (naming, `apiVersion`, what an extractor may touch, how it is reviewed) before it can be loaded there.
|
|
115
|
+
|
|
116
|
+
Ready-made plugins today: [`@boy-offi9-inc/tidepull-plugin-example`](https://github.com/boy-offi9-inc/tidepull-plugins/tree/main/plugins/example) (og:video / og:audio metas) and [`@boy-offi9-inc/tidepull-plugin-soundcloud`](https://github.com/boy-offi9-inc/tidepull-plugins/tree/main/plugins/soundcloud) (public SoundCloud tracks).
|
|
117
|
+
|
|
118
|
+
### Ecosystem
|
|
119
|
+
|
|
120
|
+
| Repo | Package | What it is |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| [Tidepull](https://github.com/boy-offi9-inc/Tidepull) (here) | `@boy-offi9-inc/tidepull` | the core: extract, select, download — zero dependencies |
|
|
123
|
+
| [tidepull-plugins](https://github.com/boy-offi9-inc/tidepull-plugins) | `@boy-offi9-inc/tidepull-plugin-*` | site plugins and the authoring template, contract in its `docs/PLUGINS.md` |
|
|
124
|
+
| [reqkit](https://github.com/boy-offi9-inc/reqkit) | — | transport/resilience helpers for plugin authors (planned) |
|
|
94
125
|
|
|
95
126
|
An extractor may instead return a `Playlist` (`{ kind: "playlist", id, title, extractor, webpage_url, entries: [{ url, title? }] }`) for a page that lists several items; each entry is then extracted on its own by the same extractors.
|
|
96
127
|
|
package/package.json
CHANGED