snac2/doc/snac.5

159 lines
5.1 KiB
Groff
Raw Permalink Normal View History

2022-10-03 18:14:20 +00:00
.Dd $Mdocdate$
.Dt SNAC 5
.Os
.Sh NAME
.Nm snac
.Nd message formatting and file format documentation
.Sh DESCRIPTION
The
.Nm
daemon processes messages from other servers in the Fediverse
using the ActivityPub protocol.
.Pp
This manual describes the allowed formatting of note messages
and the disk storage layout of
.Nm
server and user data. For the operation manual, see
.Xr snac 1 .
For the administration manual, see
.Xr snac 8 .
.Ss Message Formatting
Message notes respect the entered new line breaks rigurously.
A special subset of Markdown is allowed, including:
.Bl -tag -width tenletters
.It bold
**text between two pairs of asterisks**
.It italic
*text between a pair of asterisks*
.It code
Text `between backticks` is formatted as code.
.Bd -literal
```
/* text between lines with only three backticks is preformatted */
int main(int argc, char *argv[])
{
return 0;
}
```
.Ed
.It links
Standalone URLs.
.It quoted text
Lines starting with >.
.It User Mentions
Strings in the format @user@host are requested using the Webfinger
protocol and converted to links and mentions if something reasonable
is found.
2022-11-18 08:25:16 +00:00
.It Emoticons / Smileys / Silly Symbols
2022-10-07 17:07:16 +00:00
The following traditional ASCII emoticons or special strings are
converted to related emojis:
.Bd -literal
2022-11-18 08:25:16 +00:00
:-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o
2023-02-01 09:01:47 +00:00
%-) :_( :-| >:-( :facepalm: :shrug: :shrug2:
2022-12-04 06:18:24 +00:00
:eyeroll: :beer: :beers: :munch: :thumb:
2022-10-07 17:07:16 +00:00
.Ed
2022-10-03 18:14:20 +00:00
.El
.Pp
2022-10-30 06:02:52 +00:00
.Ss Accepted HTML
All HTML tags in entries are neutered except the following ones:
.Bd -literal
a p br blockquote ul li cite
2023-03-08 03:47:57 +00:00
span i b u pre code em strong
2022-10-30 06:02:52 +00:00
.Ed
2022-10-03 18:14:20 +00:00
.Pp
.Ss Disk Layout
2023-01-08 09:31:15 +00:00
This section documents version 2.7 of the disk storage layout.
2022-10-03 18:14:20 +00:00
.Pp
The base directory contains the following files and folders:
.Bl -tag -width tenletters
.It Pa server.json
Server configuration.
.It Pa user/
Directory holding user subdirectories.
2022-12-04 06:18:24 +00:00
.It Pa object/
Directory holding the ActivityPub objects. Filenames are hashes of each
message Id, stored in subdirectories starting with the first two letters
of the hash.
2023-03-08 03:56:33 +00:00
.It Pa queue/
This directory contains the global queue of input/output messages as JSON files.
File names contain timestamps that indicate when the message will
be sent. Messages not accepted by their respective servers will be re-enqueued
for later retransmission until a maximum number of retries is reached,
then discarded.
2023-03-08 03:47:57 +00:00
.It Pa inbox/
Directory storing collected inbox URLs from other instances.
2022-10-03 18:25:09 +00:00
.It Pa archive/
2022-10-04 16:58:58 +00:00
If this directory exists, all input and output messages are logged inside it,
including HTTP headers. Only useful for debugging. May grow to enormous sizes.
2023-01-08 09:31:15 +00:00
.It Pa error/
If this directory exists, HTTP signature check error headers are logged here.
Only useful for debugging.
2023-04-27 06:24:57 +00:00
.It Pa app/
This directory stores Mastodon API apps.
.It Pa token/
This directory stores Mastodon API tokens.
2022-10-03 18:14:20 +00:00
.El
.Pp
Each user directory is a subdirectory of
.Pa BASEDIR/user/ ,
has the user id as name and contains the following subdirectories and files:
.Bl -tag -width tenletters
.It Pa user.json
User configuration file.
2023-02-12 08:32:15 +00:00
.It Pa user_o.json
User configuration override file. This file is intended for administrators to
2023-02-20 05:10:51 +00:00
override some user preferences. For current version, the fields that can be
overridden are 'purge_days' and 'email'.
2022-10-03 18:14:20 +00:00
.It Pa key.json
2023-01-08 09:31:15 +00:00
Secret/public key PEM data.
2022-12-04 06:18:24 +00:00
.It Pa followers.idx
This file contains the list of followers as a list of hashed object identifiers.
2022-10-03 18:14:20 +00:00
.It Pa followers/
2022-12-04 06:18:24 +00:00
This directory stores hard links to the actor objects in the object storage.
2022-10-03 18:14:20 +00:00
.It Pa following/
2022-12-04 06:18:24 +00:00
This directory stores the users being followed as hard links to the 'Follow'
or 'Accept' objects in the object storage. File names are the hashes of each
actor Id.
.It Pa private.idx
This file contains the list of timeline entries as a list of hashed
object identifiers.
.It Pa private/
This directory stores hard links to the timeline entries in the object storage.
.It Pa public.idx
This file contains the list of public timeline entries as a list of hashed
object identifiers.
.It Pa public/
This directory stores hard links to the public timeline entries in the object
storage.
2022-10-03 18:14:20 +00:00
.It Pa muted/
2022-12-04 06:18:24 +00:00
This directory contains files which names are hashes of muted actors. The
2022-10-03 18:14:20 +00:00
content is a line containing the actor URL.
Messages from these actors will be ignored on input and not shown in any timeline.
2022-12-04 06:18:24 +00:00
.It Pa hidden/
This directory contains references to the hidden timeline entries.
2022-10-03 18:14:20 +00:00
.It Pa queue/
This directory contains the output queue of messages generated by the user as
JSON files. File names contain timestamps that indicate when the message will
be sent. Messages not accepted by their respective servers will be re-enqueued
for later retransmission until a maximum number of retries is reached,
then discarded.
.It Pa static/
Files in this directory are served as-is when requested from the
2023-01-25 09:08:35 +00:00
.Pa https://HOST/USER/s/...
2022-10-03 18:14:20 +00:00
URL path. A special file named
.Pa style.css
can contain user-specific CSS code to be inserted into the HTML of the
web interface.
.It Pa history/
This directory contains generated HTML files. They may be snapshots of the
local timeline in previous months or other cached data.
.El
.Sh SEE ALSO
.Xr snac 1 ,
.Xr snac 8
.Sh AUTHORS
2023-05-17 10:35:46 +00:00
.An grunfink Lk https://comam.es/snac/grunfink @grunfink@comam.es
2022-10-03 18:14:20 +00:00
.Sh LICENSE
See the LICENSE file for details.