๐Ÿง  New Feature

๐Ÿงช diff API Feature โ€” Compare Keywords Like a Log Wizard ๐Ÿง™โ€โ™‚๏ธ

Welcome to the mighty diff feature of your API!

Compare sysadminy phrases like awk vs bash, or ssh vs a random gremlin from the logs.


๐Ÿ”— Endpoint Format

api.php?diff=keyword1[+keyword2][&format=txt|html|json][&diffmode=...]

Parameters:

Parameter Description
diff One or two keywords joined by + (or just one โ€” we'll summon a random phrase for the second)
format Output format: txt, html, or json
diffmode Visual diff style: classic, strike, redacted, corrupt, delta, tagged

๐Ÿง  Keyword Comparison Modes

Example Result
diff=ssh+cron Compares ssh vs cron phrases
diff=ssh Compares ssh vs a random log phrase
diff=banana+donkey Both invalid? We punt you to the keyword list
diff= or diff=list You get the full list of valid keywords

๐ŸŽจ Diff Modes

Want to see what kind of visual magic we support? Try:

?diffmode=list

Available Modes:

  • classic โ€“ Old school: - removed, + added
  • strike โ€“ ~~deleted~~ and ++added++ (Markdown vibes)
  • redacted โ€“ [REDACTED], because who needs transparency?
  • corrupt โ€“ Text scrambled like your thoughts at 3AM
  • delta โ€“ Inline arrows: fooโ†’bar
  • tagged โ€“ Annotated with [!] and [!!] so your log looks like itโ€™s yelling

๐Ÿงช JSON Output (Sample)

[
  "awk output phrase...",
  "bash output phrase...",
  "- awk phrase line\n+ bash phrase line",
  "classic"
]

Or use ?format=json&diffmode=delta and marvel at those โžก๏ธ.

๐Ÿพ Final Note

This API doesnโ€™t just compare logs โ€” it tells stories of heroic cron jobs, fallen sshd soldiers,

and redacted mysteries. Use it wisely.

๐Ÿง™โ€โ™‚๏ธ Happy diffing!


You'll only receive email when they publish something new.

More from Carlostkd โœ…
All posts