Updated documentation with Mastodon CSV format

This commit is contained in:
Justin Warren 2023-02-13 10:28:05 +11:00
parent 9f95f143df
commit 77e7921e63
No known key found for this signature in database
1 changed files with 12 additions and 0 deletions

View File

@ -197,6 +197,7 @@ Supported formats are currently:
- Comma-Separated Values (CSV) - Comma-Separated Values (CSV)
- JSON - JSON
- Mastodon v4.1 flavoured CSV
- RapidBlock CSV - RapidBlock CSV
- RapidBlock JSON - RapidBlock JSON
@ -214,6 +215,17 @@ A CSV format blocklist must contain a header row with at least a `domain` and `s
Optional fields, as listed about, may also be included. Optional fields, as listed about, may also be included.
#### Mastodon v4.1 CSV format
As of v4.1.0, Mastodon can export domain blocks as a CSV file. However, in their
infinite wisdom, the Mastodon devs decided that field names should begin with a
`#` character in the header, unlike the field names in the JSON output via the
API… or in pretty much any other CSV file anywhere else.
Setting the format to `mastodon_csv` will strip off the `#` character when
parsing and FediBlockHole can then use Mastodon v4.1 CSV blocklists like any
other CSV formatted blocklist.
#### JSON format #### JSON format
JSON is also supported. It uses the same format as the JSON returned from the Mastodon API. JSON is also supported. It uses the same format as the JSON returned from the Mastodon API.