The CLI permits the specification of simple messages, using the post
verb,
DistributionCLI post <options>
The following options are defined for post
…
-c, --config-file Required. Path to the config file.
-f, --filter Regular expression filter for network short codes.
-s, --source-file Path or url to a source file containing posts.
-o, --offset Offset (index) of a post within the source file. (Leave blank to send all posts in the source file.)
-m, --message Simple message text.
-l, --link Link for this message.
-i, --images URIs to images, semi-colon separated (;)
-d, --image-descriptions Image descriptions, semi-colon separated (;)
-t, --tags A list of tags (without # prefix), semi-colon separated (;)
--help Display this help screen.
--version Display version information.
To provide a source file with posts, see: Post list format
-m
option-l
option.-i
option.-d
option.-t
option.Note that lists should be semi-colon (;
) separated.
A simple example:
DistributionCLI post -c path/to/config.json -m "this is a test"
Posts are made up of a number of parts, each of which could be rendered different for a specific social network (although by default, the content you provide will apply to any).
Each part can be one of several types:
SocialMessagePart |
Description |
---|---|
Text |
Ordinary text that will appear in the post |
AccountReference |
Reference to an account, eg. @instantiator |
Tag |
An individual tag, without the # prefix, eg. Caturday |
Link |
A link that this post points to |
The parts are combined and formatted during posting to ensure that the text will all fit and flow correctly according to the conventions of the social network that the post is being targeted at.
If necessary, multiple posts are created, and linked together as a thread.
Some social networks (Mastodon, Twitter) lend themselves conceptually to threading more easily than others.
Each social network has a different set of character limits.
If you manage to post a thread longer than the post limit for other networks (eg. a Facebook post longer than 63206
characters, somehow!), subsequent parts of the message will be posted as comments on the main post.
Some items (ie. tags, links) will either be moved to the first post, duplicated across all posts, or may be handled differently depending on the social network.
Network | First post | Subsequent posts | Tags | Link | Images | Images per post | Image size limit |
---|---|---|---|---|---|---|---|
Mastodon | 500 |
500 |
All posts | First post | Front-loaded | 4 |
TBC |
Discord | 2000 |
2000 |
First post | First post | First post | 10 |
TBC |
63206 |
8000 |
First post | Special | First post | ∞ |
10Mb |
|
3000 |
1250 |
First post | First post | First post | 20 |
TBC | |
280 |
280 |
All posts | First post | Front-loaded | 4 |
TBC |
The formatter will wrap words on each post. If a post would exceed the limit available to it, it wraps the next word into the next post.
The limit allows space for:
By default, tags will not exceed 50% of the allowed character space. If not all tags will fit on a post, a random selection of the available tags is used.
As described above, images are assigned to the various posts that make up a thread.
A message that is to be posted across all 4 of these networks should be constrained by the lowest common denominator, ie. a maximum of 9 images.
You can force the formatter to break to a new post by including the special break word: $$
$$
creates a paragraph break with 2 newline characters.$$
creates a paragraph break with 2 newline characters.