Skip to content

Commit 6bb912b

Browse files
committed
add documentation
1 parent 366a047 commit 6bb912b

27 files changed

+3979
-474
lines changed

.github/workflows/docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
paths:
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
- ".github/workflows/docs.yml"
12+
workflow_dispatch: # Allow manual triggers
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Fetch all history for git info
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v5
33+
with:
34+
enable-cache: true
35+
36+
- name: Install dependencies
37+
run: |
38+
uv pip install --system mkdocs-material
39+
40+
- name: Configure Git
41+
run: |
42+
git config user.name "github-actions[bot]"
43+
git config user.email "github-actions[bot]@users.noreply.github.com"
44+
45+
- name: Deploy to GitHub Pages
46+
run: mkdocs gh-deploy --force

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,4 @@ Thumbs.db
9797
systemd/
9898
_ignore/
9999
Icon
100+
site/

agents.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
## Coding style
88

99
- Run `uv run ruff check` and `uv run ruff format` to check and format code
10-
- Run `uvx ty check src/ tests/` to check types
10+
- Run `uvx ty check kiosque/ tests/` to check types
11+
- Use `prettier` to format markdown files
1112

1213
## Commit rules
1314

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Abstract base class for all website scrapers:
6969
**Key Components:**
7070

7171
1. **Class Attributes:**
72-
7372
- `base_url`: Website home URL (required)
7473
- `login_url`: Authentication endpoint (optional)
7574
- `alias`: List of short names for CLI (optional)
@@ -78,7 +77,6 @@ Abstract base class for all website scrapers:
7877
- `header_entries`: Custom HTTP headers (optional)
7978

8079
2. **Core Methods:**
81-
8280
- `instance(url)` - Factory method, returns appropriate Website subclass
8381
- `bs4(url)` - Fetch URL and return BeautifulSoup object
8482
- `login()` - Authenticate with website
@@ -186,7 +184,6 @@ Interactive bookmark browser built with [Textual](https://textual.textualize.io/
186184
**Components:**
187185

188186
1. **`RaindropTUI` (Main App):**
189-
190187
- Displays bookmarks from Raindrop.io
191188
- Auto-refresh every 5 minutes
192189
- Keyboard-driven interface
@@ -365,13 +362,11 @@ def get_with_retry(url, **kwargs):
365362
See `tests/` directory for implementation:
366363

367364
1. **Unit Tests:**
368-
369365
- Configuration validation (`test_config.py`)
370366
- Website base class (`test_website.py`)
371367
- API models (`test_raindrop.py`)
372368

373369
2. **Integration Tests:**
374-
375370
- Real login flows (`test_login.py`)
376371
- HTTP request/response handling
377372
- End-to-end article extraction (manual testing)
@@ -414,8 +409,8 @@ See `plan.md` for detailed future work, including:
414409

415410
## Related Documentation
416411

417-
- [README.md](readme.md) - Quick start and usage
418-
- [CONTRIBUTING.md](CONTRIBUTING.md) - How to add new websites
419-
- [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Common issues
420-
- [websites.md](websites.md) - Supported websites list
421-
- [plan.md](plan.md) - Future development roadmap
412+
- [Quick Start Guide](../index.md) - Getting started with Kiosque
413+
- [Contributing Guide](contributing.md) - How to add new websites
414+
- [Troubleshooting](../troubleshooting.md) - Common issues and solutions
415+
- [Supported Websites](../websites/supported-sites.md) - Complete list of supported sites
416+
- [Development Roadmap](roadmap.md) - Future development plans
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ uv run ruff check .
5050
### Test Configuration
5151

5252
**Login Tests:** Tests in `tests/test_login.py` require real credentials and are marked with `@pytest.mark.login`. These tests:
53+
5354
- Make real HTTP requests to websites
5455
- Require credentials configured in `~/.config/kiosque/kiosque.conf`
5556
- Are automatically excluded in CI/CD to protect credentials
5657
- Should be run locally before submitting login-related changes
5758

5859
**Running Tests:**
60+
5961
```bash
6062
# CI-safe tests only (no credentials required)
6163
uv run pytest -m "not login"
@@ -74,14 +76,12 @@ uv run pytest tests/test_login.py::test_website_login -k "lemonde"
7476
Before writing code, inspect the target website:
7577

7678
1. **Find the article container:**
77-
7879
- Open an article in your browser
7980
- Right-click the main article text → "Inspect Element"
8081
- Identify the HTML element containing the article (usually `<article>`, `<div class="article">`, etc.)
8182
- Note the CSS class or ID
8283

8384
2. **Identify elements to remove:**
84-
8585
- Look for elements to exclude: ads, "Read more" buttons, related articles, social media buttons
8686
- Note their HTML tags and classes
8787

@@ -458,7 +458,7 @@ def article(self, url):
458458
```
459459

460460
3. **Update documentation:**
461-
- Add website to `websites.md` in the appropriate language section
461+
- Add website to [Supported Sites](../websites/supported-sites.md) in the appropriate language section
462462
- Indicate if authentication is supported (☑️)
463463

464464
### PR Guidelines
@@ -476,7 +476,6 @@ def article(self, url):
476476
```
477477

478478
3. **PR description should include:**
479-
480479
- Brief description of the website
481480
- Whether authentication is supported
482481
- Any special considerations (e.g., "Login requires solving captcha manually")
@@ -511,7 +510,7 @@ Tested with the following articles:
511510
- [x] Code formatted with `ruff format`
512511
- [x] No linting errors (`ruff check`)
513512
- [x] Tests pass (`pytest`)
514-
- [x] Added website to `websites.md`
513+
- [x] Added website to [Supported Sites](../websites/supported-sites.md)
515514
- [x] Tested article extraction manually
516515
```
517516

@@ -598,7 +597,7 @@ def article(self, url):
598597

599598
- **Issues:** Open a GitHub issue with the `website-support` label
600599
- **Questions:** Start a discussion in GitHub Discussions
601-
- **Documentation:** See [ARCHITECTURE.md](ARCHITECTURE.md) for system design
600+
- **Documentation:** See [Architecture](architecture.md) for system design
602601
- **Examples:** Check `kiosque/website/` for 30+ real implementations
603602

604603
## Thank You!

0 commit comments

Comments
 (0)