Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Researches backlink opportunities, logs contact evidence, and drafts local outreach messages, sending none unless explicitly authorized.
18% 91%+73 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 4 of 22 without it.
3 of 3 safety checks passed
Not used yet
#!/usr/bin/env python3
"""Normalize user-supplied backlink candidates and captured contact evidence."""
from __future__ import annotations
import argparse
from datetime import datetime, timedelta, timezone
import json
from pathlib import Path
import re
import sys
from typing import Any, Sequence
from urllib.parse import urlsplit
EMAIL_PATTERN = re.compile(r"\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b", re.I)
ALLOWED_FIELDS = {"name", "source_url", "observed_at", "captured_text", "notes"}
MAX_CLOCK_SKEW = timedelta(minutes=5)
class InputError(ValueError):
"""Raised when evidence cannot be normalized safely."""
def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(
description=(
"Extract observed contact addresses from user-supplied captured text. "
"No network requests are made."
)
)
parser.add_argument("--input", required=True, help="Candidate/evidence JSON file")
parser.add_argument(
"--output",
help="Create a new JSON file instead of printing to stdout",
)
return parser.parse_args(argv)
def require_text(value: Any, field: str, maximum: int = 2000) -> str:Next to this one in the catalogue, plus more from the same author.