guessit-js 4.7.1 → 4.8.0

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 CHANGED
@@ -144,7 +144,25 @@ Regenerate the schema (after parsing changes) with `npm run schema`. A test (`te
144
144
 
145
145
  ## REST API
146
146
 
147
- No install needed beyond the package itself:
147
+ **Hosted demo (testing only):**
148
+
149
+ ```bash
150
+ curl "https://guessit.opensubtitles.com/api/guessit?filename=Movie.2024.1080p.mkv"
151
+ curl -X POST https://guessit.opensubtitles.com/api/guessit \
152
+ -H 'Content-Type: application/json' \
153
+ -d '{"filenames": ["A.2020.mkv", "B.S01E02.mkv"]}'
154
+ ```
155
+
156
+ > ⚠️ **For testing and evaluation only — never use in production.** It runs on
157
+ > a free Cloudflare Workers tier with a hard daily request cap and no uptime
158
+ > guarantee; it can be throttled, rate-limited, or removed at any time. For
159
+ > production, self-host (`npx guessit-js --serve`, one command) or better,
160
+ > call the library in-process (~1.5 ms per parse, no HTTP at all).
161
+
162
+ Runs on Cloudflare Workers at the edge, CORS enabled, batch up to 500
163
+ filenames per POST, redeployed automatically with every release.
164
+
165
+ **Self-hosted** — no install needed beyond the package itself:
148
166
 
149
167
  ```bash
150
168
  npx guessit-js --serve # port 3847 (or --serve 8080 / PORT env)
@@ -176,17 +194,27 @@ guessit-js is a faithful port (1342/1342 fixtures, tracking Python 4.4.0), but i
176
194
  **not bug-for-bug identical** — where Python has a genuine parsing bug, guessit-js
177
195
  is corrected. Highlights:
178
196
 
179
- - **32 upstream guessit bugs fixed** that Python still gets wrong — e.g. `Us.2019`
180
- (title vs country `US`), `The.Collector` (title vs edition), `X2.2003…` (short
181
- title), `grown-ish…[eztv]` (hyphenated title split), `cd`-matching mid-hash, and
182
- source/codec/extension tokens leaking into `release_group`/`title`. Full ledger:
197
+ - **Cases the released Python 4.4.0 still gets wrong** (each verified against the
198
+ real Python CLI; the [demo](https://opensubtitles.github.io/guessit-js) shows
199
+ live side-by-sides): `X2.2003…` (Python: `bonus: 2`, no title), Python's
200
+ still-open [#875](https://github.com/guessit-io/guessit/issues/875) and
201
+ [#877](https://github.com/guessit-io/guessit/issues/877) (`Season 3 - 11`,
202
+ anchored weak episodes, `0x539` ids), Python's dead
203
+ `RemoveLessSpecificSeasonEpisode("episode")` pass
204
+ ([#961](https://github.com/guessit-io/guessit/issues/961), our fix submitted as
205
+ [#962](https://github.com/guessit-io/guessit/pull/962)), and **112 of the 276
206
+ cross-parser cases Python's own test data admits failing** — fullwidth CJK
207
+ bracket groups, UFC event numbers, anime compound dash titles, fully-bracketed
208
+ titles, and more.
209
+ - **32 historical upstream bugs** were fixed here ahead of upstream during the
210
+ 4.x catch-up (many since adopted by Python 4.4 — e.g. `Us.2019`,
211
+ `The.Collector`, `grown-ish`, `imdb_id`/`tmdb_id`, `volume`, artwork and
212
+ month-date detection are now correct in both). Full ledger with dispositions:
183
213
  [`docs/upstream-issues.md`](docs/upstream-issues.md).
184
- - **More properties / better detection:** `imdb_id`/`tmdb_id`/`tvdb_id`, `volume`,
185
- archive & image **containers** (`.rar`/`.7z`/`.jpg`…), artwork classification
186
- (`poster`/`fanart` → `other`), VR / Opening-Ending credits, month-name dates,
187
- CJK season/episode markers, and detection of Telugu/Spanish that Python misses.
188
- - **Typed, schema-described output:** a precise `GuessItResult` interface, a
189
- complete `properties()` (Python's is partial), and a JSON Schema.
214
+ - **Typed, schema-described output:** a precise `GuessItResult` interface with
215
+ enum'd value fields, `properties()` mirroring Python's API, and a JSON Schema
216
+ (draft-07) of the output — none of which Python provides as machine-readable
217
+ artifacts.
190
218
  - **No Python runtime:** zero runtime dependencies, ESM + CJS + WASM, ~3.5x faster.
191
219
  - **Intentional divergences** (cases where guessit-js is *more* correct than
192
220
  Python) are catalogued per-example in [`docs/python-parity.md`](docs/python-parity.md).