Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 14, 2025

This PR adds comprehensive GitHub Copilot instructions to help developers and AI assistants better understand the scrape-cli project structure, coding patterns, and development guidelines.

What's Added

Created .github/copilot-instructions.md with detailed documentation covering:

  • Project Overview: CLI tool for HTML element extraction using XPath/CSS selectors
  • Architecture & Dependencies: Core structure with lxml, cssselect, and requests
  • Coding Patterns: Command-line interface, HTML processing pipeline, error handling
  • Key Functions: Detailed explanations of is_xpath(), convert_css_to_xpath(), clean_text(), and detect_charset()
  • Development Guidelines: Testing approaches, code style, common tasks
  • Integration Patterns: Unix pipeline-friendly design examples

Benefits

The instructions will help GitHub Copilot provide:

  • Better context-aware code suggestions
  • Understanding of the project's specific patterns and conventions
  • Knowledge of the HTML processing pipeline and selector handling
  • Awareness of CLI argument validation and error handling patterns

Example of patterns documented:

# XPath detection patterns
def is_xpath(expression):
    """Check for XPath patterns like //, ::, [], @, functions"""
    
# CSS to XPath conversion with error handling
def convert_css_to_xpath(expression):
    """Convert CSS selectors using cssselect.GenericTranslator"""

This enhances the development experience by providing AI assistants with comprehensive project context.

Fixes #24.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@aborruso aborruso marked this pull request as ready for review August 14, 2025 06:40
@aborruso aborruso merged commit f5abec9 into master Aug 14, 2025
1 check passed
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions ✨ Set up GitHub Copilot instructions for scrape-cli Aug 14, 2025
Copilot AI requested a review from aborruso August 14, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants