From 6e5e0c4c5a67bbcf1bbae472968b743d3d831e85 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Sun, 18 Aug 2024 06:48:15 +0100 Subject: [PATCH] fix(BREAKING): rename spoiler-text flag to summary Rename the spoiler-text flag to summary as the text represents the status' summary. The usage message and manual indicates that the text is also known as the spoiler text or content warning. --- docs/manual.md | 2 +- internal/executor/create.go | 2 +- internal/executor/executors.go | 4 ++-- schema/enbas_cli_schema.json | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/manual.md b/docs/manual.md index 4c94c66..116ddb7 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -517,7 +517,7 @@ Creates a new status. | `media-description` | string | false | The description of the media attachment which will be used as the media's alt-text.
To use a description from a text file, use the `flag@` prefix followed by the path to the file (e.g. `file@description.txt`)
Use this flag multiple times to set multiple descriptions.| | | `media-focus` | string | false | The media's focus values. This should be in the form of two comma-separated numbers between -1 and 1 (e.g. 0.25,-0.34).
Use this flag multiple times to set multiple focus values. | | | `sensitive` | string | false | The status should be marked as sensitive.
If this is not specified then the default sensitivity from your posting preferences will be used. | | -| `spoiler-text` | string | false | The text to display as the status' warning or subject. | | +| `summary` | string | false | The summary of the status (a.k.a the subject, spoiler text or content warning). | | | `visibility` | string | false | The visibility of the status.
Valid values are `public`, `private`, `unlisted`, `mutuals_only` and `direct`.
If this is not specified then the default visibility from your posting preferences will be used. | | Additional flags for polls. diff --git a/internal/executor/create.go b/internal/executor/create.go index 7f643cd..9d5cd1e 100644 --- a/internal/executor/create.go +++ b/internal/executor/create.go @@ -191,7 +191,7 @@ func (c *CreateExecutor) createStatus(gtsClient *client.Client) error { Content: content, ContentType: parsedContentType, Language: language, - SpoilerText: c.spoilerText, + SpoilerText: c.summary, Boostable: c.boostable, Federated: c.federated, InReplyTo: c.inReplyTo, diff --git a/internal/executor/executors.go b/internal/executor/executors.go index 8e0cbb8..5e92528 100644 --- a/internal/executor/executors.go +++ b/internal/executor/executors.go @@ -140,7 +140,7 @@ type CreateExecutor struct { pollHidesVoteCounts bool pollOptions internalFlag.StringSliceValue sensitive internalFlag.BoolPtrValue - spoilerText string + summary string resourceType string visibility string } @@ -184,7 +184,7 @@ func NewCreateExecutor( exe.BoolVar(&exe.pollHidesVoteCounts, "poll-hides-vote-counts", false, "Set to true to hide the vote count until the poll is closed") exe.Var(&exe.pollOptions, "poll-option", "A poll option. Use this multiple times to set multiple options") exe.Var(&exe.sensitive, "sensitive", "Set to true if the status should be marked as sensitive") - exe.StringVar(&exe.spoilerText, "spoiler-text", "", "The subject, summary or content warning for the status") + exe.StringVar(&exe.summary, "summary", "", "The summary of the status (a.k.a the subject, spoiler text or content warning)") exe.StringVar(&exe.resourceType, "type", "", "The type of resource you want to action on (e.g. account, status)") exe.StringVar(&exe.visibility, "visibility", "", "The visibility of the posted status") diff --git a/schema/enbas_cli_schema.json b/schema/enbas_cli_schema.json index 2294609..caec28f 100644 --- a/schema/enbas_cli_schema.json +++ b/schema/enbas_cli_schema.json @@ -172,14 +172,14 @@ "type": "bool", "description": "Set to true to skip showing your relationship to the account that you are viewing" }, - "spoiler-text": { - "type": "string", - "description": "The subject, summary or content warning for the status" - }, "status-id": { "type": "string", "description": "The ID of the status" }, + "summary": { + "type": "string", + "description": "The summary of the status (a.k.a the subject, spoiler text or content warning)" + }, "tag": { "type": "string", "description": "The name of the tag" @@ -265,7 +265,7 @@ { "flag": "poll-hides-vote-counts", "default": "false" }, { "flag": "poll-option", "fieldName": "pollOptions" }, { "flag": "sensitive" }, - { "flag": "spoiler-text", "default": "" }, + { "flag": "summary", "default": "" }, { "flag": "type", "fieldName": "resourceType", "default": "" }, { "flag": "visibility", "default": "" } ],