summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar default2022-12-04 07:18:24 +0100
committerGravatar default2022-12-04 07:18:24 +0100
commit30e3f2fc3d121a5d0bdf6ed201da7965ecbca7df (patch)
treeedb947aa22acdc86705716ff23a7c9d813ff55b2 /doc
parentUpdated TODO. (diff)
downloadsnac2-30e3f2fc3d121a5d0bdf6ed201da7965ecbca7df.tar.gz
snac2-30e3f2fc3d121a5d0bdf6ed201da7965ecbca7df.tar.xz
snac2-30e3f2fc3d121a5d0bdf6ed201da7965ecbca7df.zip
Updated documentation.
Diffstat (limited to 'doc')
-rw-r--r--doc/snac.16
-rw-r--r--doc/snac.559
-rw-r--r--doc/snac.816
3 files changed, 35 insertions, 46 deletions
diff --git a/doc/snac.1 b/doc/snac.1
index 3e34725..0b6d75a 100644
--- a/doc/snac.1
+++ b/doc/snac.1
@@ -141,12 +141,12 @@ the post and its children anymore.
141The command-line tool provide the following commands: 141The command-line tool provide the following commands:
142.Bl -tag -offset indent 142.Bl -tag -offset indent
143.It Cm init Op basedir 143.It Cm init Op basedir
144Initializes the database. This is an interactive command; necessary 144Initializes the data storage. This is an interactive command; necessary
145information will be prompted for. The 145information will be prompted for. The
146.Ar basedir 146.Ar basedir
147directory must not exist. 147directory must not exist.
148.It Cm upgrade Ar basedir 148.It Cm upgrade Ar basedir
149Upgrades the database disk layout after installing a new version. 149Upgrades the data storage after installing a new version.
150Only necessary if 150Only necessary if
151.Nm 151.Nm
152complains and demands it. 152complains and demands it.
@@ -166,8 +166,6 @@ Starts the daemon.
166Processes the output queue of the specied user, sending all 166Processes the output queue of the specied user, sending all
167enqueued messages and re-enqueing the failing ones. This command 167enqueued messages and re-enqueing the failing ones. This command
168must not be executed if the server is running. 168must not be executed if the server is running.
169.It Cm passwd Ar basedir Ar uid
170Changes the password for a user (interactive).
171.It Cm follow Ar basedir Ar uid Ar actor 169.It Cm follow Ar basedir Ar uid Ar actor
172Sends a Follow message for the specified actor URL. 170Sends a Follow message for the specified actor URL.
173.It Cm request Ar basedir Ar uid Ar url 171.It Cm request Ar basedir Ar uid Ar url
diff --git a/doc/snac.5 b/doc/snac.5
index 02bd85b..0b58a2d 100644
--- a/doc/snac.5
+++ b/doc/snac.5
@@ -50,13 +50,11 @@ The following traditional ASCII emoticons or special strings are
50converted to related emojis: 50converted to related emojis:
51.Bd -literal 51.Bd -literal
52:-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o 52:-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o
53%-) :_( :-| :facepalm: :shrug: :eyeroll: 53%-) :_( :-| :facepalm: :shrug: :shrug2:
54:beer: :beers: :munch: :thumb: 54:eyeroll: :beer: :beers: :munch: :thumb:
55.Ed 55.Ed
56.El 56.El
57.Pp 57.Pp
58HTML tags are not filtered on input.
59.Pp
60.Ss Accepted HTML 58.Ss Accepted HTML
61All HTML tags in entries are neutered except the following ones: 59All HTML tags in entries are neutered except the following ones:
62.Bd -literal 60.Bd -literal
@@ -74,6 +72,10 @@ The base directory contains the following files and folders:
74Server configuration. 72Server configuration.
75.It Pa user/ 73.It Pa user/
76Directory holding user subdirectories. 74Directory holding user subdirectories.
75.It Pa object/
76Directory holding the ActivityPub objects. Filenames are hashes of each
77message Id, stored in subdirectories starting with the first two letters
78of the hash.
77.It Pa archive/ 79.It Pa archive/
78If this directory exists, all input and output messages are logged inside it, 80If this directory exists, all input and output messages are logged inside it,
79including HTTP headers. Only useful for debugging. May grow to enormous sizes. 81including HTTP headers. Only useful for debugging. May grow to enormous sizes.
@@ -87,36 +89,31 @@ has the user id as name and contains the following subdirectories and files:
87User configuration file. 89User configuration file.
88.It Pa key.json 90.It Pa key.json
89SHA-1 secret/public key PEM data. 91SHA-1 secret/public key PEM data.
90.It Pa actors/ 92.It Pa followers.idx
91This subdirectory stores cached 'Person' ActivityPub messages as JSON files. Each 93This file contains the list of followers as a list of hashed object identifiers.
92file name is an MD5 hash of the actor URL.
93.It Pa timeline/
94This subdirectory stores the user's timeline. Everytime a valid message arrives,
95it's stored in this directory as a JSON object. The file name spec is: a Unix
96timestamp followed by a hyphen followed by an MD5 of the message Id. Additionally,
97metadata for each message parent and children is stored under the '_snac' field;
98parent messages with new children are renamed with an updated timestamp so that
99the more recently updated thread is shown at the top. This directory is presented
100in the web interface in reverse file name order up to a maximum, hardcoded limit.
101These files are purged when they are considered old (this time can be changed by
102tweaking the server configuration).
103.It Pa local/
104This subdirectory stores all activities generated by this user as hardlinks to
105their analogue entries in the
106.Pa timeline/
107subdirectory.
108.It Pa followers/ 94.It Pa followers/
109This subdirectory stores the 'Follow' ActivityPub message from each 95This directory stores hard links to the actor objects in the object storage.
110Fediverse user that is following this user as a JSON file. Each file name is
111an MD5 hash of the actor that is a follower of this user.
112.It Pa following/ 96.It Pa following/
113This subdirectory stores the 'Follow' (not yet confirmed) or the 'Accept' 97This directory stores the users being followed as hard links to the 'Follow'
114(confirmed) ActivityPub message for each actor that is being followed. Each file 98or 'Accept' objects in the object storage. File names are the hashes of each
115name is an MD5 hash of the actor. 99actor Id.
100.It Pa private.idx
101This file contains the list of timeline entries as a list of hashed
102object identifiers.
103.It Pa private/
104This directory stores hard links to the timeline entries in the object storage.
105.It Pa public.idx
106This file contains the list of public timeline entries as a list of hashed
107object identifiers.
108.It Pa public/
109This directory stores hard links to the public timeline entries in the object
110storage.
116.It Pa muted/ 111.It Pa muted/
117This directory contains files which names are MD5 hashes of muted actors. The 112This directory contains files which names are hashes of muted actors. The
118content is a line containing the actor URL. 113content is a line containing the actor URL.
119Messages from these actors will be ignored on input and not shown in any timeline. 114Messages from these actors will be ignored on input and not shown in any timeline.
115.It Pa hidden/
116This directory contains references to the hidden timeline entries.
120.It Pa queue/ 117.It Pa queue/
121This directory contains the output queue of messages generated by the user as 118This directory contains the output queue of messages generated by the user as
122JSON files. File names contain timestamps that indicate when the message will 119JSON files. File names contain timestamps that indicate when the message will
@@ -133,10 +130,6 @@ web interface.
133.It Pa history/ 130.It Pa history/
134This directory contains generated HTML files. They may be snapshots of the 131This directory contains generated HTML files. They may be snapshots of the
135local timeline in previous months or other cached data. 132local timeline in previous months or other cached data.
136.It Pa archive/
137This directory is no longer used in version 2.x and later. It can be deleted.
138.Nm
139is run with a debug level >= 1.
140.El 133.El
141.Sh SEE ALSO 134.Sh SEE ALSO
142.Xr snac 1 , 135.Xr snac 1 ,
diff --git a/doc/snac.8 b/doc/snac.8
index 60671a1..eca1420 100644
--- a/doc/snac.8
+++ b/doc/snac.8
@@ -29,7 +29,7 @@ link counts. Remember:
29is a very UNIXy program that loves hard links. 29is a very UNIXy program that loves hard links.
30.Ss Building and Installation 30.Ss Building and Installation
31A C compiler must be installed in the system, as well as the development 31A C compiler must be installed in the system, as well as the development
32headers and libraries for OpenSSL and curl. To build 32headers and libraries for OpenSSL (or compatible) and curl. To build
33.Nm , 33.Nm ,
34run 34run
35.Bd -literal -offset indent 35.Bd -literal -offset indent
@@ -40,7 +40,7 @@ And, after that, run as root
40.Bd -literal -offset indent 40.Bd -literal -offset indent
41make install 41make install
42.Ed 42.Ed
43.Ss Database Initialization 43.Ss Data storage Initialization
44Once 44Once
45.Nm 45.Nm
46is properly installed on the system, designate a directory where 46is properly installed on the system, designate a directory where
@@ -48,7 +48,7 @@ the server and user data are to be stored. This directory
48must not exist yet. 48must not exist yet.
49.Nm 49.Nm
50must always be run as a regular user; you can create one for 50must always be run as a regular user; you can create one for
51it or use your own. To initialize the database, execute 51it or use your own. To initialize the data storage, execute
52.Bd -literal -offset indent 52.Bd -literal -offset indent
53snac init $HOME/snac-data 53snac init $HOME/snac-data
54.Ed 54.Ed
@@ -83,13 +83,14 @@ directory.
83For other operating systems, please read the appropriate documentation 83For other operating systems, please read the appropriate documentation
84on how to install a daemon as a non-root service. 84on how to install a daemon as a non-root service.
85.Ss Upgrading to a new version 85.Ss Upgrading to a new version
86Sometimes, the database disk layout changes between versions. If there 86Sometimes, the data storage disk layout changes between versions. If there
87is such a change, 87is such a change,
88.Nm 88.Nm
89will refuse to run and require an upgrade. Do this by running 89will refuse to run and require an upgrade. Do this by running
90.Bd -literal -offset indent 90.Bd -literal -offset indent
91snac upgrade $HOME/snac-data 91snac upgrade $HOME/snac-data
92.Ed 92.Ed
93.Pp
93Take special care to execute this upgrade operation without any 94Take special care to execute this upgrade operation without any
94.Nm 95.Nm
95processes serving on the same folder. You can break everything. I know 96processes serving on the same folder. You can break everything. I know
@@ -195,10 +196,7 @@ supports:
195Complete support, on input and output. 196Complete support, on input and output.
196.It Vt Undo 197.It Vt Undo
197For 198For
198.Vt Follow , 199.Vt Follow
199.Vt Like
200and
201.Vt Announce
202objects, on input and output. 200objects, on input and output.
203.It Vt Create 201.It Vt Create
204For 202For
@@ -265,7 +263,7 @@ bloated and filled with redundant information. Using a filesystem with
265file compression enabled (like btrfs or zfs) will probably be a good 263file compression enabled (like btrfs or zfs) will probably be a good
266choice to store the 264choice to store the
267.Nm 265.Nm
268database into. 266data storage into.
269.Sh ENVIRONMENT 267.Sh ENVIRONMENT
270.Bl -tag -width Ds 268.Bl -tag -width Ds
271.It Ev DEBUG 269.It Ev DEBUG