Skip to content

Commit

Permalink
fixing error with 2 short flags being the same
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Northcutt committed Nov 16, 2024
1 parent 015f3eb commit 83909d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ If you prefer to pass flags instead of interactive prompts, you can run:
./sitemapExport --url="https://example.com/sitemap.xml" --css="body" --filename="output" --type="txt" --format="txt"
```

Or, use the short flags:

```bash
./sitemapExport --u="https://example.com/sitemap.xml" --c="body" --n="output" --t="txt" --f="txt"
```

### Supported Formats

- `txt`: Plain text format
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func init() {
// Define flags in the init function
rootCmd.Flags().StringVarP(&feedURL, "url", "u", "", "Sitemap or RSS feed URL to crawl (required)")
rootCmd.Flags().StringVarP(&cssSelector, "css", "c", "body", "CSS selector to extract content (for sitemaps)")
rootCmd.Flags().StringVarP(&outputFilename, "filename", "f", "output", "Filename for the output")
rootCmd.Flags().StringVarP(&outputFilename, "filename", "n", "output", "Filename for the output")
rootCmd.Flags().StringVarP(&outputFiletype, "type", "t", "txt", "File output format (txt, json, jsonl, md, pdf)")
rootCmd.Flags().StringVarP(&format, "format", "f", "txt", "Content format transformation (html, md, txt)")
}
Expand Down
Binary file modified sitemapExport
Binary file not shown.

0 comments on commit 83909d9

Please sign in to comment.