added context.dev web tools#244
Conversation
📝 WalkthroughWalkthroughA new tutorial project is added to the repository that demonstrates converting webpages to markdown and structured JSON using the context.dev Python SDK. The main README is updated with a registry entry, a project-level README provides setup and usage instructions, and a complete Jupyter notebook contains three runnable examples. Changescontext.dev Web Scraping & JSON Extraction Tutorial
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Ruff (0.15.15)context-dev-website-to-md-and-json/notebook.ipynbUnexpected end of JSON input Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@context-dev-website-to-md-and-json/README.md`:
- Line 15: Replace the insecure “paste API key into notebook” workflow with
environment-variable-based auth: update README.md text to instruct users to
export/openai key into an env var (e.g., OPENAI_API_KEY) and to run the notebook
after that, and modify notebook.ipynb to read the key from
os.environ.get('OPENAI_API_KEY') (or via getpass if you prefer interactive
prompt) and raise a clear error if the var is missing; ensure any in-notebook
hardcoded key cells are removed or replaced with the env-var retrieval and that
examples reference the same OPENAI_API_KEY variable name so docs and notebook
stay aligned.
In `@README.md`:
- Line 95: Update the README metadata that lists beginner project counts to
reflect the newly added entry: locate the "Beginner Projects (22)" header/TOC
entry and any other occurrences of that count text in README.md and increment it
to "Beginner Projects (23)" (or adjust to the correct total if there are
multiple new/removed entries), ensuring all instances match the new list
including the newly added "[Webpage to Markdown & JSON with context.dev]" link.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 44fe7d8b-3bdd-4ff0-ae95-a3fb3c1a6351
📒 Files selected for processing (3)
README.mdcontext-dev-website-to-md-and-json/README.mdcontext-dev-website-to-md-and-json/notebook.ipynb
| **Get a context.dev API key**: | ||
|
|
||
| - Go to [context.dev](https://context.dev) and sign up for an account. | ||
| - Paste your API key into the first code cell of `notebook.ipynb`. |
There was a problem hiding this comment.
Root cause: the tutorial currently standardizes an insecure API-key workflow.
Both docs and notebook teach storing the key directly in notebook content. Switch the tutorial contract to environment-variable-based auth and keep both files aligned to that single secure pattern.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@context-dev-website-to-md-and-json/README.md` at line 15, Replace the
insecure “paste API key into notebook” workflow with environment-variable-based
auth: update README.md text to instruct users to export/openai key into an env
var (e.g., OPENAI_API_KEY) and to run the notebook after that, and modify
notebook.ipynb to read the key from os.environ.get('OPENAI_API_KEY') (or via
getpass if you prefer interactive prompt) and raise a clear error if the var is
missing; ensure any in-notebook hardcoded key cells are removed or replaced with
the env-var retrieval and that examples reference the same OPENAI_API_KEY
variable name so docs and notebook stay aligned.
| - [**Video RAG with Gemini**](./video-rag-gemini) - Chat with videos using Gemini AI | ||
|
|
||
| #### Other Tools | ||
| - [**Webpage to Markdown & JSON with context.dev**](./context-dev-website-to-md-and-json) - Notebook tutorial for clean Markdown and structured JSON extraction |
There was a problem hiding this comment.
Update beginner project count metadata to match the new entry.
Line 95 adds a beginner project, but the displayed beginner count (Line 34: Beginner Projects (22)) now appears stale. Please update the count(s) in the README headers/TOC so registry metadata stays accurate.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 95, Update the README metadata that lists beginner project
counts to reflect the newly added entry: locate the "Beginner Projects (22)"
header/TOC entry and any other occurrences of that count text in README.md and
increment it to "Beginner Projects (23)" (or adjust to the correct total if
there are multiple new/removed entries), ensuring all instances match the new
list including the newly added "[Webpage to Markdown & JSON with context.dev]"
link.
This change adds Context.dev support. Users can try the web extraction endpoints in a Jupyter notebook to get markdown or crawl websites for information.
Summary by CodeRabbit
New Features
Documentation