Skip to content

Enhance CLI with additional options and formatting capabilities#177

Open
seantomburke wants to merge 1 commit intomasterfrom
update-cli
Open

Enhance CLI with additional options and formatting capabilities#177
seantomburke wants to merge 1 commit intomasterfrom
update-cli

Conversation

@seantomburke
Copy link
Owner

This PR enhances the CLI tool with the following improvements:

Features Added

  • Added all options from README.md as command-line arguments with both long and short forms
  • Added formatting options (--format):
    • plaintext (default): Human-readable output
    • csv: Export URLs as CSV, with fields when specified
    • json: Complete JSON output including errors
  • Added output redirection to files with --output flag
  • Comprehensive --help command showing all available options
  • Version display with --version
  • Support for field selection with --fields (includes loc, lastmod, priority, etc.)
  • Added exclusion patterns with --exclusions
  • All other Sitemapper parameters accessible via CLI

Example Usage

# Basic usage
npx sitemapper https://example.com/sitemap.xml

# With options
npx sitemapper https://example.com/sitemap.xml --format json --timeout 20000

# With field selection and CSV output
npx sitemapper https://example.com/sitemap.xml --fields loc,lastmod,priority --format csv --output results.csv

These improvements make the CLI tool much more useful and consistent with modern CLI standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant