description.exs: remove empty strings on descriptions

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-09-17 22:14:56 +02:00
parent 106afaed58
commit c0c5628200
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 15 additions and 69 deletions

View File

@ -857,7 +857,6 @@
%{ %{
key: :metadata, key: :metadata,
type: {:list, :atom}, type: {:list, :atom},
description: "",
suggestions: [[:request_id]] suggestions: [[:request_id]]
} }
] ]
@ -883,7 +882,6 @@
%{ %{
key: :metadata, key: :metadata,
type: {:list, :atom}, type: {:list, :atom},
description: "",
suggestions: [[:request_id]] suggestions: [[:request_id]]
} }
] ]
@ -1177,7 +1175,6 @@
group: :pleroma, group: :pleroma,
key: :mrf_rejectnonpublic, key: :mrf_rejectnonpublic,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :allow_followersonly, key: :allow_followersonly,
@ -1444,43 +1441,36 @@
%{ %{
key: :instrumenters, key: :instrumenters,
type: {:list, :module}, type: {:list, :module},
description: "",
suggestions: [Pleroma.Web.Endpoint.Instrumenter] suggestions: [Pleroma.Web.Endpoint.Instrumenter]
}, },
%{ %{
key: :protocol, key: :protocol,
type: :string, type: :string,
description: "",
suggestions: ["https"] suggestions: ["https"]
}, },
%{ %{
key: :secret_key_base, key: :secret_key_base,
type: :string, type: :string,
description: "",
suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"] suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"]
}, },
%{ %{
key: :signing_salt, key: :signing_salt,
type: :string, type: :string,
description: "",
suggestions: ["CqaoopA2"] suggestions: ["CqaoopA2"]
}, },
%{ %{
key: :render_errors, key: :render_errors,
type: :keyword, type: :keyword,
description: "",
suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]], suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]],
children: [ children: [
%{ %{
key: :view, key: :view,
type: :module, type: :module,
description: "",
suggestions: [Pleroma.Web.ErrorView] suggestions: [Pleroma.Web.ErrorView]
}, },
%{ %{
key: :accepts, key: :accepts,
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: ["json"] suggestions: ["json"]
} }
] ]
@ -1488,32 +1478,27 @@
%{ %{
key: :pubsub, key: :pubsub,
type: :keyword, type: :keyword,
description: "",
suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]], suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]],
children: [ children: [
%{ %{
key: :name, key: :name,
type: :module, type: :module,
description: "",
suggestions: [Pleroma.PubSub] suggestions: [Pleroma.PubSub]
}, },
%{ %{
key: :adapter, key: :adapter,
type: :module, type: :module,
description: "",
suggestions: [Phoenix.PubSub.PG2] suggestions: [Phoenix.PubSub.PG2]
} }
] ]
}, },
%{ %{
key: :secure_cookie_flag, key: :secure_cookie_flag,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :extra_cookie_attrs, key: :extra_cookie_attrs,
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: ["SameSite=Lax"] suggestions: ["SameSite=Lax"]
} }
] ]
@ -1842,7 +1827,6 @@
group: :pleroma, group: :pleroma,
key: :rich_media, key: :rich_media,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :enabled, key: :enabled,
@ -1995,7 +1979,6 @@
%{ %{
key: Pleroma.Web.Auth.Authenticator, key: Pleroma.Web.Auth.Authenticator,
type: :module, type: :module,
description: "",
suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator] suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
} }
] ]
@ -2172,37 +2155,31 @@
%{ %{
key: :link_color, key: :link_color,
type: :string, type: :string,
description: "",
suggestions: ["#d8a070"] suggestions: ["#d8a070"]
}, },
%{ %{
key: :background_color, key: :background_color,
type: :string, type: :string,
description: "",
suggestions: ["#2C3645"] suggestions: ["#2C3645"]
}, },
%{ %{
key: :content_background_color, key: :content_background_color,
type: :string, type: :string,
description: "",
suggestions: ["#1B2635"] suggestions: ["#1B2635"]
}, },
%{ %{
key: :header_color, key: :header_color,
type: :string, type: :string,
description: "",
suggestions: ["#d8a070"] suggestions: ["#d8a070"]
}, },
%{ %{
key: :text_color, key: :text_color,
type: :string, type: :string,
description: "",
suggestions: ["#b9b9ba"] suggestions: ["#b9b9ba"]
}, },
%{ %{
key: :text_muted_color, key: :text_muted_color,
type: :string, type: :string,
description: "",
suggestions: ["#b9b9ba"] suggestions: ["#b9b9ba"]
} }
] ]
@ -2245,7 +2222,6 @@
group: :pleroma, group: :pleroma,
key: :emoji, key: :emoji,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :shortcode_globs, key: :shortcode_globs,
@ -2387,7 +2363,6 @@
%{ %{
key: :types, key: :types,
type: :map, type: :map,
description: "",
suggestions: [ suggestions: [
%{ %{
"application/xml" => ["xml"], "application/xml" => ["xml"],
@ -2401,31 +2376,26 @@
%{ %{
key: "application/xml", key: "application/xml",
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["xml"]] suggestions: [["xml"]]
}, },
%{ %{
key: "application/xrd+xml", key: "application/xrd+xml",
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["xrd+xml"]] suggestions: [["xrd+xml"]]
}, },
%{ %{
key: "application/jrd+json", key: "application/jrd+json",
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["jrd+json"]] suggestions: [["jrd+json"]]
}, },
%{ %{
key: "application/activity+json", key: "application/activity+json",
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["activity+json"]] suggestions: [["activity+json"]]
}, },
%{ %{
key: "application/ld+json", key: "application/ld+json",
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["activity+json"]] suggestions: [["activity+json"]]
} }
] ]
@ -2453,8 +2423,7 @@
children: [ children: [
%{ %{
key: :enabled, key: :enabled,
type: :boolean, type: :boolean
description: ""
} }
] ]
}, },
@ -2462,7 +2431,6 @@
group: :pleroma, group: :pleroma,
key: :suggestions, key: :suggestions,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :enabled, key: :enabled,
@ -2492,7 +2460,6 @@
%{ %{
key: :web, key: :web,
type: :string, type: :string,
description: "",
suggestions: ["https://vinayaka.distsn.org"] suggestions: ["https://vinayaka.distsn.org"]
} }
] ]
@ -2519,7 +2486,6 @@
%{ %{
key: :adapter, key: :adapter,
type: :module, type: :module,
description: "",
suggestions: [Pleroma.Signature] suggestions: [Pleroma.Signature]
} }
] ]
@ -2528,18 +2494,15 @@
group: :pleroma, group: :pleroma,
key: Pleroma.Uploaders.MDII, key: Pleroma.Uploaders.MDII,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :cgi, key: :cgi,
type: :string, type: :string,
description: "",
suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"] suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"]
}, },
%{ %{
key: :files, key: :files,
type: :string, type: :string,
description: "",
suggestions: ["https://mdii.sakura.ne.jp"] suggestions: ["https://mdii.sakura.ne.jp"]
} }
] ]
@ -2553,18 +2516,15 @@
%{ %{
key: :proxy_url, key: :proxy_url,
type: [:string, :atom, nil], type: [:string, :atom, nil],
description: "",
suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil] suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil]
}, },
%{ %{
key: :send_user_agent, key: :send_user_agent,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :adapter, key: :adapter,
type: :keyword, type: :keyword,
description: "",
suggestions: [ suggestions: [
[ [
ssl_options: [ ssl_options: [
@ -2582,32 +2542,26 @@
group: :pleroma, group: :pleroma,
key: :markup, key: :markup,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :allow_inline_images, key: :allow_inline_images,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :allow_headings, key: :allow_headings,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :allow_tables, key: :allow_tables,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :allow_fonts, key: :allow_fonts,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :scrub_policy, key: :scrub_policy,
type: {:list, :module}, type: {:list, :module},
description: "",
suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]] suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]]
} }
] ]
@ -2616,12 +2570,10 @@
group: :pleroma, group: :pleroma,
key: :user, key: :user,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :deny_follow_blocked, key: :deny_follow_blocked,
type: :boolean, type: :boolean
description: ""
} }
] ]
}, },
@ -2629,12 +2581,10 @@
group: :pleroma, group: :pleroma,
key: :mrf_normalize_markup, key: :mrf_normalize_markup,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :scrub_policy, key: :scrub_policy,
type: :module, type: :module,
description: "",
suggestions: [Pleroma.HTML.Scrubber.Default] suggestions: [Pleroma.HTML.Scrubber.Default]
} }
] ]
@ -2643,12 +2593,10 @@
group: :pleroma, group: :pleroma,
key: Pleroma.User, key: Pleroma.User,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :restricted_nicknames, key: :restricted_nicknames,
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [ suggestions: [
[ [
".well-known", ".well-known",
@ -2689,24 +2637,20 @@
%{ %{
group: :cors_plug, group: :cors_plug,
type: :group, type: :group,
description: "",
children: [ children: [
%{ %{
key: :max_age, key: :max_age,
type: :integer, type: :integer,
description: "",
suggestions: [86_400] suggestions: [86_400]
}, },
%{ %{
key: :methods, key: :methods,
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]] suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]]
}, },
%{ %{
key: :expose, key: :expose,
type: :string, type: :string,
description: "",
suggestions: [ suggestions: [
[ [
"Link", "Link",
@ -2720,13 +2664,11 @@
}, },
%{ %{
key: :credentials, key: :credentials,
type: :boolean, type: :boolean
description: ""
}, },
%{ %{
key: :headers, key: :headers,
type: {:list, :string}, type: {:list, :string},
description: "",
suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]] suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]]
} }
] ]

View File

@ -44,13 +44,17 @@ def process(descriptions) do
{:ok, config_path} {:ok, config_path}
end end
defp print_child_header(file, child) do defp print_child_header(file, %{key: key, type: type, description: description} = _child) do
IO.write( IO.write(
file, file,
"- `#{inspect(child[:key])}` (`#{inspect(child[:type])}`): #{child[:description]}\n" "- `#{inspect(key)}` (`#{inspect(type)}`): #{description}\n"
) )
end end
defp print_child_header(file, %{key: key, type: type} = _child) do
IO.write(file, "- `#{inspect(key)}` (`#{inspect(type)}`)\n")
end
defp print_suggestion(file, suggestion) when is_list(suggestion) do defp print_suggestion(file, suggestion) when is_list(suggestion) do
IO.write(file, " `#{inspect(suggestion)}`\n") IO.write(file, " `#{inspect(suggestion)}`\n")
end end