Skip to content

Commit 9df4993

Browse files
committed
feat: overhaul documentation and add deployment workflow for GitHub Pages
- Revamped the README.md to provide a clearer quick start guide and detailed usage instructions. - Introduced a new GitHub Actions workflow for deploying documentation to GitHub Pages. - Added comprehensive documentation covering installation, configuration, command-line options, and troubleshooting. - Included a .gitignore file for the docs directory to prevent tracking of build artifacts and dependencies. - Established a structured content organization for the documentation using Astro and Starlight.
1 parent 2f4fc8b commit 9df4993

File tree

21 files changed

+2883
-188
lines changed

21 files changed

+2883
-188
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs-deploy.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build-and-deploy:
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: docs
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v6
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: latest
29+
30+
- name: Install dependencies
31+
run: bun install --frozen-lockfile
32+
33+
- name: Build docs
34+
run: bun run build
35+
36+
- name: Deploy to GitHub Pages
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./docs/dist
41+
publish_branch: gh-pages

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'README.md'
1111
- '.github/dependabot.yml'
1212
- '.gitignore'
13+
- 'docs/**'
1314

1415
permissions:
1516
contents: write
@@ -217,3 +218,65 @@ jobs:
217218
env:
218219
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219220

221+
- name: Verify release assets exist
222+
if: steps.release_info.outputs.is_prerelease == 'false'
223+
id: verify_assets
224+
run: |
225+
TAG_NAME="${{ steps.release_info.outputs.tag_name }}"
226+
echo "Verifying assets for release ${TAG_NAME}..."
227+
228+
EXPECTED_ASSETS=(
229+
"kemono-scraper-linux-x64"
230+
"kemono-scraper-linux-arm64"
231+
"kemono-scraper-windows-x64.exe"
232+
"kemono-scraper-darwin-x64"
233+
"kemono-scraper-darwin-arm64"
234+
)
235+
236+
ACTUAL_ASSETS=$(gh release view "${TAG_NAME}" --json assets --jq '.assets[].name')
237+
238+
MISSING=()
239+
for asset in "${EXPECTED_ASSETS[@]}"; do
240+
if ! echo "${ACTUAL_ASSETS}" | grep -q "^${asset}$"; then
241+
MISSING+=("${asset}")
242+
fi
243+
done
244+
245+
if [[ ${#MISSING[@]} -gt 0 ]]; then
246+
echo "::warning::Missing assets: ${MISSING[*]}"
247+
echo "assets_verified=false" >> $GITHUB_OUTPUT
248+
else
249+
echo "All expected assets found."
250+
echo "assets_verified=true" >> $GITHUB_OUTPUT
251+
fi
252+
env:
253+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
254+
255+
- name: Update docs with latest stable release tag
256+
if: steps.release_info.outputs.is_prerelease == 'false' && steps.verify_assets.outputs.assets_verified == 'true'
257+
run: |
258+
TAG_NAME="${{ steps.release_info.outputs.tag_name }}"
259+
DOCS_FILE="docs/src/content/docs/getting-started/installation.md"
260+
261+
echo "Updating docs with stable release tag: ${TAG_NAME}"
262+
263+
# Replace __LATEST_TAG__ placeholder with actual tag
264+
sed -i "s/__LATEST_TAG__/${TAG_NAME}/g" "${DOCS_FILE}"
265+
266+
# Check if any changes were made
267+
if git diff --quiet "${DOCS_FILE}"; then
268+
echo "No changes to docs (placeholder may already be updated or not present)."
269+
exit 0
270+
fi
271+
272+
# Configure git
273+
git config user.name "github-actions[bot]"
274+
git config user.email "github-actions[bot]@users.noreply.github.com"
275+
276+
# Commit and push
277+
git add "${DOCS_FILE}"
278+
git commit -m "docs: update download links to ${TAG_NAME}"
279+
git push origin HEAD:master
280+
env:
281+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
282+

README.md

Lines changed: 16 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -13,202 +13,30 @@ Download all media from Kemono and Coomer. Scrapes posts from a given service an
1313
- **Standalone executables** — no runtime required
1414
- **Media compression** — convert images to JPEG XL and videos to AV1
1515

16-
## Quick Start
17-
18-
### Option 1: Download Pre-built Executable (Recommended)
19-
20-
Download the latest release for your platform from [GitHub Releases](../../releases):
21-
22-
| Platform | File |
23-
|----------|------|
24-
| Linux x64 | `kemono-scraper-linux-x64` |
25-
| Linux ARM64 | `kemono-scraper-linux-arm64` |
26-
| Windows x64 | `kemono-scraper-windows-x64.exe` |
27-
| macOS Intel | `kemono-scraper-darwin-x64` |
28-
| macOS Apple Silicon | `kemono-scraper-darwin-arm64` |
29-
30-
```bash
31-
# Linux/macOS - make executable
32-
chmod +x kemono-scraper-*
33-
34-
# Run
35-
./kemono-scraper-linux-x64 -s onlyfans -u belledelphine
36-
```
37-
38-
### Option 2: Run from Source
39-
40-
Requires [Bun](https://bun.sh) installed.
41-
42-
```bash
43-
# Clone and install
44-
git clone https://github.com/3dnsfw/kemono-scraper.git
45-
cd kemono-scraper
46-
bun install
47-
48-
# Run
49-
bun start -s patreon -u 30037948
50-
```
51-
52-
## Usage
53-
54-
### Command-Line Arguments
55-
56-
| Argument | Alias | Description | Required |
57-
|----------|-------|-------------|----------|
58-
| `--config` | `-c` | Path to YAML config file | No* |
59-
| `--service` | `-s` | Service to scrape from | No* |
60-
| `--userId` | `-u` | User ID to scrape | No* |
61-
| `--host` | `-h` | Base host (default: `kemono.cr`) | No |
62-
| `--outputDir` | `-o` | Output directory (default: `downloads-%username%`) | No |
63-
| `--maxPosts` | `-m` | Max posts to fetch (default: 5000, 0 = unlimited) | No |
64-
65-
\* Either `--config` OR both `--service` and `--userId` must be provided.
66-
67-
**Supported services:** `patreon`, `fanbox`, `discord`, `fantia`, `afdian`, `boosty`, `gumroad`, `subscribestar`, `dlsite`, `onlyfans`, `fansly`, `candfans`
68-
69-
**Supported hosts:** `kemono.cr`, `coomer.st`, `kemono.su`, `coomer.su`
70-
71-
### Single Creator Mode
72-
73-
```bash
74-
# Scrape a Patreon creator from Kemono
75-
bun start -s patreon -u 30037948
76-
77-
# Scrape from Coomer
78-
bun start -s onlyfans -u belledelphine --host coomer.st
79-
80-
# Custom output directory
81-
bun start -s fansly -u someuser -o ./my-downloads
82-
83-
# Using the standalone executable
84-
./kemono-scraper-linux-x64 -s onlyfans -u belledelphine --host coomer.st
85-
```
86-
87-
### Config File Mode (Multiple Creators)
88-
89-
Create a YAML config file to scrape multiple creators in one run:
90-
91-
```bash
92-
# Copy the example config
93-
cp config.example.yaml config.yaml
94-
95-
# Edit with your creators
96-
nano config.yaml
16+
## Documentation
9717

98-
# Run with config file
99-
bun start --config config.yaml
18+
📖 **[View the full documentation](https://3dnsfw.github.io/kemono-scraper/)**
10019

101-
# Or with standalone executable
102-
./kemono-scraper-linux-x64 --config config.yaml
103-
```
104-
105-
**Example `config.yaml`:**
106-
107-
```yaml
108-
# Global defaults
109-
host: kemono.cr
110-
outputDir: downloads-%username%
111-
maxPosts: 5000
112-
proxyRotation: round_robin
113-
proxies:
114-
# - type: http # Options: http, https, socks5
115-
# host: proxy.example.com
116-
# port: 8080
117-
# username: user # Optional
118-
# password: pass # Optional
119-
# - type: socks5
120-
# host: socks.example.com
121-
# port: 1080
122-
123-
# Creators to scrape
124-
creators:
125-
- service: patreon
126-
userId: "30037948"
127-
128-
- service: fanbox
129-
userId: "3316400"
130-
131-
- service: onlyfans
132-
userId: "belledelphine"
133-
host: coomer.st # Override for this creator
134-
135-
- service: fantia
136-
userId: "83679"
137-
outputDir: fantia/%username% # Custom output dir
138-
maxPosts: 100 # Limit posts for this creator
139-
```
140-
141-
See `config.example.yaml` for a full example with all options.
142-
143-
### Proxy configuration
144-
145-
- Add proxies under `proxies` in your config. Supported `type` values: `http`, `https`, `socks5`.
146-
- Rotation is round-robin; unhealthy proxies are cooled down for a short period on connection/auth errors.
147-
- Leave `proxies` empty to disable proxying; the scraper falls back to direct connections automatically.
148-
- Enable verbose proxy logs with `DEBUG_PROXY=1 bun start --config config.yaml`.
149-
150-
## Building Executables
151-
152-
Build standalone executables that run without Bun installed:
153-
154-
```bash
155-
# Build all platforms
156-
bun run build
157-
158-
# Build specific platform
159-
bun run build:linux # Linux x64
160-
bun run build:linux-arm # Linux ARM64
161-
bun run build:windows # Windows x64
162-
bun run build:macos # macOS x64
163-
bun run build:macos-arm # macOS ARM64
164-
```
165-
166-
Executables are output to the `dist/` directory.
167-
168-
## Compression
169-
170-
After downloading, compress media files to save disk space:
171-
172-
- **Images**: JPG/JPEG → JPEG XL (typically 30-50% smaller)
173-
- **Videos**: MP4 → AV1 (typically 30-50% smaller)
174-
175-
The scraper automatically detects compressed files on subsequent runs.
176-
177-
### Requirements
178-
179-
- **libjxl** for JPEG XL (`cjxl` command)
180-
- Linux: `paru -S libjxl` or `apt install libjxl-tools`
181-
- Windows: `winget install --id=libjxl.libjxl -e`
182-
- **ffmpeg** with SVT-AV1 support
183-
- Linux: `paru -S ffmpeg` or `apt install ffmpeg`
184-
- Windows: `winget install ffmpeg`
20+
The documentation covers:
21+
- Installation (pre-built executables or from source)
22+
- Quick start guide
23+
- Configuration file for multiple creators
24+
- All command-line options
25+
- Proxy setup
26+
- FAQ & troubleshooting
18527

186-
### Running Compression
28+
## Quick Start
18729

18830
```bash
189-
bun run compress
190-
```
191-
192-
### Configuration
193-
194-
Set environment variables to customize compression:
31+
# Download the executable for your platform from GitHub Releases
32+
# Then run:
33+
./kemono-scraper -s patreon -u 30037948
19534

196-
```bash
197-
JPEG_XL_QUALITY=95 AV1_CRF=28 bun run compress
35+
# Or for OnlyFans/Fansly (via Coomer):
36+
./kemono-scraper -s onlyfans -u username --host coomer.st
19837
```
19938

200-
| Variable | Default | Description |
201-
|----------|---------|-------------|
202-
| `JPEG_XL_QUALITY` | 90 | JPEG XL quality (1-100, higher = better) |
203-
| `JPEG_XL_EFFORT` | 7 | Encoding effort (1-9, higher = slower but smaller) |
204-
| `AV1_CRF` | 30 | AV1 quality (lower = better, 18-35 typical) |
205-
| `AV1_PRESET` | 6 | SVT-AV1 preset (0-13, lower = slower but better) |
206-
207-
On Windows PowerShell:
208-
209-
```powershell
210-
.\compress.ps1 -JpegXlQuality 95 -Av1Crf 28
211-
```
39+
See the [documentation](https://3dnsfw.github.io/kemono-scraper/) for detailed instructions.
21240

21341
## License
21442

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# Astro
8+
.astro/
9+
10+
# Environment
11+
.env
12+
.env.*
13+
14+
# Editor
15+
.vscode/
16+
.idea/
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db

0 commit comments

Comments
 (0)