commit 30e3f2f

default  ·  2022-12-04 06:18:24 +0000 UTC
parent 70901fa
Updated documentation.
3 files changed,  +35, -46
+2, -4
 1@@ -141,12 +141,12 @@ the post and its children anymore.
 2 The command-line tool provide the following commands:
 3 .Bl -tag -offset indent
 4 .It Cm init Op basedir
 5-Initializes the database. This is an interactive command; necessary
 6+Initializes the data storage. This is an interactive command; necessary
 7 information will be prompted for. The
 8 .Ar basedir
 9 directory must not exist.
10 .It Cm upgrade Ar basedir
11-Upgrades the database disk layout after installing a new version.
12+Upgrades the data storage after installing a new version.
13 Only necessary if
14 .Nm
15 complains and demands it.
16@@ -166,8 +166,6 @@ Starts the daemon.
17 Processes the output queue of the specied user, sending all
18 enqueued messages and re-enqueing the failing ones. This command
19 must not be executed if the server is running.
20-.It Cm passwd Ar basedir Ar uid
21-Changes the password for a user (interactive).
22 .It Cm follow Ar basedir Ar uid Ar actor
23 Sends a Follow message for the specified actor URL.
24 .It Cm request Ar basedir Ar uid Ar url
+26, -33
 1@@ -50,13 +50,11 @@ The following traditional ASCII emoticons or special strings are
 2 converted to related emojis:
 3 .Bd -literal
 4 :-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o
 5-%-) :_( :-| :facepalm: :shrug: :eyeroll:
 6-:beer: :beers: :munch: :thumb:
 7+%-) :_( :-| :facepalm: :shrug: :shrug2:
 8+:eyeroll: :beer: :beers: :munch: :thumb:
 9 .Ed
10 .El
11 .Pp
12-HTML tags are not filtered on input.
13-.Pp
14 .Ss Accepted HTML
15 All HTML tags in entries are neutered except the following ones:
16 .Bd -literal
17@@ -74,6 +72,10 @@ The base directory contains the following files and folders:
18 Server configuration.
19 .It Pa user/
20 Directory holding user subdirectories.
21+.It Pa object/
22+Directory holding the ActivityPub objects. Filenames are hashes of each
23+message Id, stored in subdirectories starting with the first two letters
24+of the hash.
25 .It Pa archive/
26 If this directory exists, all input and output messages are logged inside it,
27 including HTTP headers. Only useful for debugging. May grow to enormous sizes.
28@@ -87,36 +89,31 @@ has the user id as name and contains the following subdirectories and files:
29 User configuration file.
30 .It Pa key.json
31 SHA-1 secret/public key PEM data.
32-.It Pa actors/
33-This subdirectory stores cached 'Person' ActivityPub messages as JSON files. Each
34-file name is an MD5 hash of the actor URL.
35-.It Pa timeline/
36-This subdirectory stores the user's timeline. Everytime a valid message arrives,
37-it's stored in this directory as a JSON object. The file name spec is: a Unix
38-timestamp followed by a hyphen followed by an MD5 of the message Id. Additionally,
39-metadata for each message parent and children is stored under the '_snac' field;
40-parent messages with new children are renamed with an updated timestamp so that
41-the more recently updated thread is shown at the top. This directory is presented
42-in the web interface in reverse file name order up to a maximum, hardcoded limit.
43-These files are purged when they are considered old (this time can be changed by
44-tweaking the server configuration).
45-.It Pa local/
46-This subdirectory stores all activities generated by this user as hardlinks to
47-their analogue entries in the
48-.Pa timeline/
49-subdirectory.
50+.It Pa followers.idx
51+This file contains the list of followers as a list of hashed object identifiers.
52 .It Pa followers/
53-This subdirectory stores the 'Follow' ActivityPub message from each
54-Fediverse user that is following this user as a JSON file. Each file name is
55-an MD5 hash of the actor that is a follower of this user.
56+This directory stores hard links to the actor objects in the object storage.
57 .It Pa following/
58-This subdirectory stores the 'Follow' (not yet confirmed) or the 'Accept'
59-(confirmed) ActivityPub message for each actor that is being followed. Each file
60-name is an MD5 hash of the actor.
61+This directory stores the users being followed as hard links to the 'Follow'
62+or 'Accept' objects in the object storage. File names are the hashes of each
63+actor Id.
64+.It Pa private.idx
65+This file contains the list of timeline entries as a list of hashed
66+object identifiers.
67+.It Pa private/
68+This directory stores hard links to the timeline entries in the object storage.
69+.It Pa public.idx
70+This file contains the list of public timeline entries as a list of hashed
71+object identifiers.
72+.It Pa public/
73+This directory stores hard links to the public timeline entries in the object
74+storage.
75 .It Pa muted/
76-This directory contains files which names are MD5 hashes of muted actors. The
77+This directory contains files which names are hashes of muted actors. The
78 content is a line containing the actor URL.
79 Messages from these actors will be ignored on input and not shown in any timeline.
80+.It Pa hidden/
81+This directory contains references to the hidden timeline entries.
82 .It Pa queue/
83 This directory contains the output queue of messages generated by the user as
84 JSON files. File names contain timestamps that indicate when the message will
85@@ -133,10 +130,6 @@ web interface.
86 .It Pa history/
87 This directory contains generated HTML files. They may be snapshots of the
88 local timeline in previous months or other cached data.
89-.It Pa archive/
90-This directory is no longer used in version 2.x and later. It can be deleted.
91-.Nm
92-is run with a debug level >= 1.
93 .El
94 .Sh SEE ALSO
95 .Xr snac 1 ,
+7, -9
 1@@ -29,7 +29,7 @@ link counts. Remember:
 2 is a very UNIXy program that loves hard links.
 3 .Ss Building and Installation
 4 A C compiler must be installed in the system, as well as the development
 5-headers and libraries for OpenSSL and curl. To build
 6+headers and libraries for OpenSSL (or compatible) and curl. To build
 7 .Nm ,
 8 run
 9 .Bd -literal -offset indent
10@@ -40,7 +40,7 @@ And, after that, run as root
11 .Bd -literal -offset indent
12 make install
13 .Ed
14-.Ss Database Initialization
15+.Ss Data storage Initialization
16 Once
17 .Nm
18 is properly installed on the system, designate a directory where
19@@ -48,7 +48,7 @@ the server and user data are to be stored. This directory
20 must not exist yet.
21 .Nm
22 must always be run as a regular user; you can create one for
23-it or use your own. To initialize the database, execute
24+it or use your own. To initialize the data storage, execute
25 .Bd -literal -offset indent
26 snac init $HOME/snac-data
27 .Ed
28@@ -83,13 +83,14 @@ directory.
29 For other operating systems, please read the appropriate documentation
30 on how to install a daemon as a non-root service.
31 .Ss Upgrading to a new version
32-Sometimes, the database disk layout changes between versions. If there
33+Sometimes, the data storage disk layout changes between versions. If there
34 is such a change,
35 .Nm
36 will refuse to run and require an upgrade. Do this by running
37 .Bd -literal -offset indent
38 snac upgrade $HOME/snac-data
39 .Ed
40+.Pp
41 Take special care to execute this upgrade operation without any
42 .Nm
43 processes serving on the same folder. You can break everything. I know
44@@ -195,10 +196,7 @@ supports:
45 Complete support, on input and output.
46 .It Vt Undo
47 For
48-.Vt Follow ,
49-.Vt Like
50-and
51-.Vt Announce
52+.Vt Follow
53 objects, on input and output.
54 .It Vt Create
55 For
56@@ -265,7 +263,7 @@ bloated and filled with redundant information. Using a filesystem with
57 file compression enabled (like btrfs or zfs) will probably be a good
58 choice to store the
59 .Nm
60-database into.
61+data storage into.
62 .Sh ENVIRONMENT
63 .Bl -tag -width Ds
64 .It Ev DEBUG