Unverified Commit faaf4c74 authored by Hong Minhee (洪 民憙)'s avatar Hong Minhee (洪 民憙) Committed by GitHub
Browse files

Merge pull request #327 from dodok8/dodok8-fix-issue-326

[ci skip]
parents e93425b9 e394f92b
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -953,19 +953,73 @@ or a full URL.
[NodeInfo]: https://nodeinfo.diaspora.software/
[`neofetch`]: https://github.com/dylanaraps/neofetch

### `-r`/`--raw`: Raw JSON

> [!NOTE]
> This option is mutually exclusive with `-b`/`--best-effort`, `--no-favicon`
> and `-m`/`--metadata`.

You can also output the fetched NodeInfo document in the raw JSON format by using
the `-r`/`--raw` option:

~~~~ sh
fedify node --raw fosstodon.org
~~~~

The output will be like the below:

~~~~ json
{
  "version": "2.0",
  "software": {
    "name": "mastodon",
    "version": "4.4.2"
  },
  "protocols": [
    "activitypub"
  ],
  "services": {
    "outbound": [],
    "inbound": []
  },
  "usage": {
    "users": {
      "total": 62444,
      "activeMonth": 8788,
      "activeHalfyear": 14000
    },
    "localPosts": 4335412
  },
  "openRegistrations": false,
  "metadata": {
    "nodeName": "Fosstodon",
    "nodeDescription": "Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software.\r\n\r\nIf you wish to join, contact us for an invite."
  }
}
~~~~

### `-b`/`--best-effort`: Parsing with best effort

> [!NOTE]
> This option is mutually exclusive with `-r`/`--raw`.

The `-b`/`--best-effort` option is used to parse the NodeInfo document with
best effort.  If the NodeInfo document is not well-formed, the option will
try to parse it as much as possible.

### `--no-favicon`: Disabling favicon fetching

> [!NOTE]
> This option is mutually exclusive with `-r`/`--raw`.

The `--no-favicon` option is used to disable fetching the favicon of the
instance.

### `-m`/`--metadata`: Showing metadata

> [!NOTE]
> This option is mutually exclusive with `-r`/`--raw`.

The `-m`/`--metadata` option is used to show the extra metadata of the NodeInfo,
i.e., the `metadata` field of the document.