Skip to content

Interactive Command Builder

Build your OPAL commands with this interactive tool. Select your options and get the exact command to run.

Click any example to load it into the builder:

Interactive Command Builder

Build Your Command

Generated Command

Select options above to generate your command...
๐Ÿ’ก Pro Tip: After copying your command, open your terminal, activate your virtual environment with source venv/bin/activate (or venv\Scripts\activate on Windows), then paste and run the command.

Command Validation

What Happens Next?

After running your command:

  1. For News Scraping: You'll get a JSON file with articles including title, author, date, and full content
  2. For Court Scraping: You'll get both JSON and CSV files with case details, plus progress updates in the terminal
  3. Files are named with timestamps for easy organization
  4. Check the terminal output for any warnings or helpful information

Advanced Options

Environment Variables

You can set these environment variables to customize behavior:

# Set default output directory
export OPAL_OUTPUT_DIR="/path/to/outputs"

# Set default rate limiting (seconds between requests)
export OPAL_RATE_LIMIT=2.0

# Enable debug mode
export OPAL_DEBUG=1

Combining with Other Tools

Process results with jq (JSON processor):

# Extract just article titles
python -m opal --url https://1819news.com/ --parser Parser1819 --max_pages 2 \
  && cat *Parser1819*.json | jq '.articles[].title'

# Count court cases by status
python -m opal.configurable_court_extractor --court civil --date-period 7d \
  && cat *civil*.json | jq '.cases | group_by(.status) | map({status: .[0].status, count: length})'

Save to specific directory:

mkdir -p ~/opal-results/$(date +%Y-%m)
cd ~/opal-results/$(date +%Y-%m)
python -m opal --url https://1819news.com/ --parser Parser1819 --max_pages 5

Need Help?