From 77e7921e6392146751be52c569620c2090b0eaa2 Mon Sep 17 00:00:00 2001 From: Justin Warren Date: Mon, 13 Feb 2023 10:28:05 +1100 Subject: [PATCH] Updated documentation with Mastodon CSV format --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 5db678f..a0fc832 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ Supported formats are currently: - Comma-Separated Values (CSV) - JSON + - Mastodon v4.1 flavoured CSV - RapidBlock CSV - 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. +#### 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 is also supported. It uses the same format as the JSON returned from the Mastodon API.