User:Jacky.wtf/Rust

From IndieWeb

Public notes on how/what CLI tools I'm aiming to create in Rust.

Webmention

Each of these commands will provide the following:

  • A means of adjusting the user agent used when making these requests (--user-agent)
  • A means of setting the remote Webmention endpoint to use (--endpoint)
  • A means of defining a cache location to reduce network usage (--cache)

$FORMAT can be either

  • human: plain text
  • html: an HTML fragment marked up using microformats to render this incoming Webmention with
  • jf2: a jf2 JSON blob of the above
  • mf2: a microformats2 JSON blob of the above

Command List

  • wm send $URL_SOURCE_1 $URL_SOURCE_2 ... $URL_SOURCE_N - sends a public Webmention using the endpoint discovered by the source URLs.
  • wm parse $URL_SOURCE $URL_TARGET --format $FORMAT - detects and renders any Webmention information.
    • Using --check to determine if and how the target URL is mentioned by the source URL, useful for a check before sending a Webmention
    • Using --html-path to read in HTML from disk for local testing of a page (forces --check)


TODO: Commands for private Webmentions TODO: Logic for handling private Webmentions