df
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
76
docs/GET_URL_QUICK_REF.md
Normal file
76
docs/GET_URL_QUICK_REF.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Quick Reference: get-url URL Search
|
||||
|
||||
## Basic Syntax
|
||||
```bash
|
||||
# Search mode (new)
|
||||
get-url -url "pattern"
|
||||
|
||||
# Original mode (unchanged)
|
||||
@1 | get-url
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Exact domain match
|
||||
```bash
|
||||
get-url -url "google.com"
|
||||
```
|
||||
Matches: `https://www.google.com`, `http://google.com/search`, `https://google.com/maps`
|
||||
|
||||
### YouTube URL search
|
||||
```bash
|
||||
get-url -url "https://www.youtube.com/watch?v=xx_88TDWmEs"
|
||||
```
|
||||
Normalizes to: `youtube.com/watch?v=xx_88tdwmes`
|
||||
Matches: Any video with same ID across different protocols
|
||||
|
||||
### Wildcard domain
|
||||
```bash
|
||||
get-url -url "youtube.com*"
|
||||
```
|
||||
Matches: All YouTube URLs (videos, shorts, playlists, etc.)
|
||||
|
||||
### Subdomain wildcard
|
||||
```bash
|
||||
get-url -url "*.example.com*"
|
||||
```
|
||||
Matches: `cdn.example.com`, `api.example.com`, `www.example.com`
|
||||
|
||||
### Specific path pattern
|
||||
```bash
|
||||
get-url -url "youtube.com/watch*"
|
||||
```
|
||||
Matches: Only YouTube watch URLs (not shorts or playlists)
|
||||
|
||||
### Single character wildcard
|
||||
```bash
|
||||
get-url -url "example.com/file?.mp4"
|
||||
```
|
||||
Matches: `example.com/file1.mp4`, `example.com/fileA.mp4` (not `file12.mp4`)
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Normalization**: Strips `https://`, `www.` prefix from pattern and all URLs
|
||||
2. **Pattern Matching**: Uses `*` and `?` wildcards (case-insensitive)
|
||||
3. **Search**: Scans all configured stores for matching URLs
|
||||
4. **Results**: Groups matches by store, shows URL and hash
|
||||
|
||||
## Return Values
|
||||
- Exit code **0** if matches found
|
||||
- Exit code **1** if no matches or error
|
||||
|
||||
## Piping Results
|
||||
```bash
|
||||
get-url -url "youtube.com*" | grep -i video
|
||||
get-url -url "example.com*" | add-tag -tag "external-source"
|
||||
```
|
||||
|
||||
## Common Patterns
|
||||
|
||||
| Pattern | Matches | Notes |
|
||||
|---------|---------|-------|
|
||||
| `google.com` | Google URLs | Exact domain (after normalization) |
|
||||
| `youtube.com*` | All YouTube | Wildcard at end |
|
||||
| `*.example.com*` | Subdomains | Wildcard at start and end |
|
||||
| `github.com/user*` | User repos | Path pattern |
|
||||
| `reddit.com/r/*` | Subreddit | Path with wildcard |
|
||||
Reference in New Issue
Block a user