node-csfd-api 5.1.0-beta.0 โ 5.1.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 +32 -10
- package/package.json +1 -1
- package/package.mjs +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
9
|
-
# CSFD API ๐ฌ + CSFD Export + MCP
|
|
9
|
+
# CSFD API ๐ฌ + CSFD Export ๐พ + CSFD MCP ๐ค
|
|
10
10
|
|
|
11
|
-
#### Modern TypeScript NPM library for scraping **CSFD.CZ**. Scraper, API,
|
|
11
|
+
#### Modern TypeScript NPM library for scraping **CSFD.CZ**. Scraper, API Rest Server, Exporter and MCP Server in one package. _(unofficial)_
|
|
12
12
|
|
|
13
13
|
[Features](#-features) โข [Installation](#-installation) โข [Quick Start](#-quick-start) โข [API Reference](#-api-reference) โข [Examples](#-usage-examples) โข [MCP Server](#-mcp-server-model-context-protocol) โข [Docker](#-docker-support)
|
|
14
14
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
- ๐งช **Well-tested** - ~100% code coverage
|
|
23
23
|
- ๐ **Universal** - Works in Node.js, browsers, and serverless environments
|
|
24
24
|
- ๐ณ **Docker ready** - Pre-built Docker images available
|
|
25
|
+
- ๐บ **Homebrew support** - Easy globally installed CLI via Homebrew tap
|
|
25
26
|
- ๐ค **MCP Server** - Use CSFD data directly within LLMs like Claude Desktop
|
|
26
27
|
- ๐ **Modern API** - Promise-based with async/await support
|
|
27
28
|
- ๐ฆ **Few dependencies** - Lightweight and efficient
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
- Node.js (ESM & CommonJS)
|
|
32
33
|
- Browsers (with CORS considerations)
|
|
33
34
|
- Docker containers
|
|
35
|
+
- macOS/Linux CLI (via Homebrew)
|
|
34
36
|
- MCP Server (Claude Desktop, etc.)
|
|
35
37
|
- Serverless (Firebase Functions, AWS Lambda, CloudFlare Workers, etc.)
|
|
36
38
|
- Chrome Extensions
|
|
@@ -434,13 +436,13 @@ const excludeEpisodes = await csfd.userRatings('912-bart', {
|
|
|
434
436
|
|
|
435
437
|
#### UserRatingsOptions
|
|
436
438
|
|
|
437
|
-
| Option | Type | Default | Description
|
|
438
|
-
| --------------- | ----------------- | ------- |
|
|
439
|
+
| Option | Type | Default | Description |
|
|
440
|
+
| --------------- | ----------------- | ------- | ---------------------------------------------------------------- |
|
|
439
441
|
| `includesOnly` | `CSFDFilmTypes[]` | `null` | Include only specific content types (e.g., `['film', 'series']`) |
|
|
440
|
-
| `exclude` | `CSFDFilmTypes[]` | `null` | Exclude specific content types (e.g., `['episode']`)
|
|
441
|
-
| `allPages` | `boolean` | `false` | Fetch all pages of ratings
|
|
442
|
-
| `allPagesDelay` | `number` | `0` | Delay between page requests in milliseconds
|
|
443
|
-
| `page` | `number` | `1` | Fetch specific page number
|
|
442
|
+
| `exclude` | `CSFDFilmTypes[]` | `null` | Exclude specific content types (e.g., `['episode']`) |
|
|
443
|
+
| `allPages` | `boolean` | `false` | Fetch all pages of ratings |
|
|
444
|
+
| `allPagesDelay` | `number` | `0` | Delay between page requests in milliseconds |
|
|
445
|
+
| `page` | `number` | `1` | Fetch specific page number |
|
|
444
446
|
|
|
445
447
|
> ๐ **Note**: `includesOnly` and `exclude` are mutually exclusive. If both are provided, `includesOnly` takes precedence.
|
|
446
448
|
>
|
|
@@ -522,7 +524,27 @@ Same options as [UserRatingsOptions](#userrationsoptions).
|
|
|
522
524
|
|
|
523
525
|
## ๐ป CLI Tools
|
|
524
526
|
|
|
525
|
-
This library comes with a powerful CLI that exposes several tools.
|
|
527
|
+
This library comes with a powerful CLI that exposes several tools. You can run the CLI either via `npx` (without installation) or by installing it globally via Homebrew (macOS/Linux).
|
|
528
|
+
|
|
529
|
+
### Installation / Usage
|
|
530
|
+
|
|
531
|
+
**Option A: NPX (No installation required)**
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
npx node-csfd-api <command>
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
**Option B: Homebrew for macOS/Linux (Global installation)**
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
brew install bartholomej/tap/csfd
|
|
541
|
+
|
|
542
|
+
csfd <command>
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
> ๐ก _Note: The examples below use `npx node-csfd-api`, but if you installed via Homebrew, simply replace it with `csfd` (e.g., `csfd export ratings 912`)._
|
|
546
|
+
|
|
547
|
+
---
|
|
526
548
|
|
|
527
549
|
### 1. Export Ratings (CSV, JSON & Letterboxd)
|
|
528
550
|
|
|
@@ -548,7 +570,7 @@ npx node-csfd-api server
|
|
|
548
570
|
# Server listening on port 3000
|
|
549
571
|
```
|
|
550
572
|
|
|
551
|
-
### 3. MCP Server
|
|
573
|
+
### 3. MCP Server for AI Agents
|
|
552
574
|
|
|
553
575
|
Run the Model Context Protocol server for AI agents.
|
|
554
576
|
|
package/package.json
CHANGED