mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Updated documentation.
This commit is contained in:
parent
70901fa168
commit
30e3f2fc3d
3 changed files with 35 additions and 46 deletions
|
@ -141,12 +141,12 @@ the post and its children anymore.
|
||||||
The command-line tool provide the following commands:
|
The command-line tool provide the following commands:
|
||||||
.Bl -tag -offset indent
|
.Bl -tag -offset indent
|
||||||
.It Cm init Op basedir
|
.It Cm init Op basedir
|
||||||
Initializes the database. This is an interactive command; necessary
|
Initializes the data storage. This is an interactive command; necessary
|
||||||
information will be prompted for. The
|
information will be prompted for. The
|
||||||
.Ar basedir
|
.Ar basedir
|
||||||
directory must not exist.
|
directory must not exist.
|
||||||
.It Cm upgrade Ar basedir
|
.It Cm upgrade Ar basedir
|
||||||
Upgrades the database disk layout after installing a new version.
|
Upgrades the data storage after installing a new version.
|
||||||
Only necessary if
|
Only necessary if
|
||||||
.Nm
|
.Nm
|
||||||
complains and demands it.
|
complains and demands it.
|
||||||
|
@ -166,8 +166,6 @@ Starts the daemon.
|
||||||
Processes the output queue of the specied user, sending all
|
Processes the output queue of the specied user, sending all
|
||||||
enqueued messages and re-enqueing the failing ones. This command
|
enqueued messages and re-enqueing the failing ones. This command
|
||||||
must not be executed if the server is running.
|
must not be executed if the server is running.
|
||||||
.It Cm passwd Ar basedir Ar uid
|
|
||||||
Changes the password for a user (interactive).
|
|
||||||
.It Cm follow Ar basedir Ar uid Ar actor
|
.It Cm follow Ar basedir Ar uid Ar actor
|
||||||
Sends a Follow message for the specified actor URL.
|
Sends a Follow message for the specified actor URL.
|
||||||
.It Cm request Ar basedir Ar uid Ar url
|
.It Cm request Ar basedir Ar uid Ar url
|
||||||
|
|
59
doc/snac.5
59
doc/snac.5
|
@ -50,13 +50,11 @@ The following traditional ASCII emoticons or special strings are
|
||||||
converted to related emojis:
|
converted to related emojis:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
:-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o
|
:-) :-D X-D ;-) B-) :-( :-* <3 :-/ 8-o
|
||||||
%-) :_( :-| :facepalm: :shrug: :eyeroll:
|
%-) :_( :-| :facepalm: :shrug: :shrug2:
|
||||||
:beer: :beers: :munch: :thumb:
|
:eyeroll: :beer: :beers: :munch: :thumb:
|
||||||
.Ed
|
.Ed
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
HTML tags are not filtered on input.
|
|
||||||
.Pp
|
|
||||||
.Ss Accepted HTML
|
.Ss Accepted HTML
|
||||||
All HTML tags in entries are neutered except the following ones:
|
All HTML tags in entries are neutered except the following ones:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
|
@ -74,6 +72,10 @@ The base directory contains the following files and folders:
|
||||||
Server configuration.
|
Server configuration.
|
||||||
.It Pa user/
|
.It Pa user/
|
||||||
Directory holding user subdirectories.
|
Directory holding user subdirectories.
|
||||||
|
.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.
|
||||||
.It Pa archive/
|
.It Pa archive/
|
||||||
If this directory exists, all input and output messages are logged inside it,
|
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.
|
including 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:
|
||||||
User configuration file.
|
User configuration file.
|
||||||
.It Pa key.json
|
.It Pa key.json
|
||||||
SHA-1 secret/public key PEM data.
|
SHA-1 secret/public key PEM data.
|
||||||
.It Pa actors/
|
.It Pa followers.idx
|
||||||
This subdirectory stores cached 'Person' ActivityPub messages as JSON files. Each
|
This file contains the list of followers as a list of hashed object identifiers.
|
||||||
file name is an MD5 hash of the actor URL.
|
|
||||||
.It Pa timeline/
|
|
||||||
This subdirectory stores the user's timeline. Everytime a valid message arrives,
|
|
||||||
it's stored in this directory as a JSON object. The file name spec is: a Unix
|
|
||||||
timestamp followed by a hyphen followed by an MD5 of the message Id. Additionally,
|
|
||||||
metadata for each message parent and children is stored under the '_snac' field;
|
|
||||||
parent messages with new children are renamed with an updated timestamp so that
|
|
||||||
the more recently updated thread is shown at the top. This directory is presented
|
|
||||||
in the web interface in reverse file name order up to a maximum, hardcoded limit.
|
|
||||||
These files are purged when they are considered old (this time can be changed by
|
|
||||||
tweaking the server configuration).
|
|
||||||
.It Pa local/
|
|
||||||
This subdirectory stores all activities generated by this user as hardlinks to
|
|
||||||
their analogue entries in the
|
|
||||||
.Pa timeline/
|
|
||||||
subdirectory.
|
|
||||||
.It Pa followers/
|
.It Pa followers/
|
||||||
This subdirectory stores the 'Follow' ActivityPub message from each
|
This directory stores hard links to the actor objects in the object storage.
|
||||||
Fediverse user that is following this user as a JSON file. Each file name is
|
|
||||||
an MD5 hash of the actor that is a follower of this user.
|
|
||||||
.It Pa following/
|
.It Pa following/
|
||||||
This subdirectory stores the 'Follow' (not yet confirmed) or the 'Accept'
|
This directory stores the users being followed as hard links to the 'Follow'
|
||||||
(confirmed) ActivityPub message for each actor that is being followed. Each file
|
or 'Accept' objects in the object storage. File names are the hashes of each
|
||||||
name is an MD5 hash of the actor.
|
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.
|
||||||
.It Pa muted/
|
.It Pa muted/
|
||||||
This directory contains files which names are MD5 hashes of muted actors. The
|
This directory contains files which names are hashes of muted actors. The
|
||||||
content is a line containing the actor URL.
|
content is a line containing the actor URL.
|
||||||
Messages from these actors will be ignored on input and not shown in any timeline.
|
Messages from these actors will be ignored on input and not shown in any timeline.
|
||||||
|
.It Pa hidden/
|
||||||
|
This directory contains references to the hidden timeline entries.
|
||||||
.It Pa queue/
|
.It Pa queue/
|
||||||
This directory contains the output queue of messages generated by the user as
|
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
|
JSON files. File names contain timestamps that indicate when the message will
|
||||||
|
@ -133,10 +130,6 @@ web interface.
|
||||||
.It Pa history/
|
.It Pa history/
|
||||||
This directory contains generated HTML files. They may be snapshots of the
|
This directory contains generated HTML files. They may be snapshots of the
|
||||||
local timeline in previous months or other cached data.
|
local timeline in previous months or other cached data.
|
||||||
.It Pa archive/
|
|
||||||
This directory is no longer used in version 2.x and later. It can be deleted.
|
|
||||||
.Nm
|
|
||||||
is run with a debug level >= 1.
|
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr snac 1 ,
|
.Xr snac 1 ,
|
||||||
|
|
16
doc/snac.8
16
doc/snac.8
|
@ -29,7 +29,7 @@ link counts. Remember:
|
||||||
is a very UNIXy program that loves hard links.
|
is a very UNIXy program that loves hard links.
|
||||||
.Ss Building and Installation
|
.Ss Building and Installation
|
||||||
A C compiler must be installed in the system, as well as the development
|
A C compiler must be installed in the system, as well as the development
|
||||||
headers and libraries for OpenSSL and curl. To build
|
headers and libraries for OpenSSL (or compatible) and curl. To build
|
||||||
.Nm ,
|
.Nm ,
|
||||||
run
|
run
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
|
@ -40,7 +40,7 @@ And, after that, run as root
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
make install
|
make install
|
||||||
.Ed
|
.Ed
|
||||||
.Ss Database Initialization
|
.Ss Data storage Initialization
|
||||||
Once
|
Once
|
||||||
.Nm
|
.Nm
|
||||||
is properly installed on the system, designate a directory where
|
is properly installed on the system, designate a directory where
|
||||||
|
@ -48,7 +48,7 @@ the server and user data are to be stored. This directory
|
||||||
must not exist yet.
|
must not exist yet.
|
||||||
.Nm
|
.Nm
|
||||||
must always be run as a regular user; you can create one for
|
must always be run as a regular user; you can create one for
|
||||||
it or use your own. To initialize the database, execute
|
it or use your own. To initialize the data storage, execute
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
snac init $HOME/snac-data
|
snac init $HOME/snac-data
|
||||||
.Ed
|
.Ed
|
||||||
|
@ -83,13 +83,14 @@ directory.
|
||||||
For other operating systems, please read the appropriate documentation
|
For other operating systems, please read the appropriate documentation
|
||||||
on how to install a daemon as a non-root service.
|
on how to install a daemon as a non-root service.
|
||||||
.Ss Upgrading to a new version
|
.Ss Upgrading to a new version
|
||||||
Sometimes, the database disk layout changes between versions. If there
|
Sometimes, the data storage disk layout changes between versions. If there
|
||||||
is such a change,
|
is such a change,
|
||||||
.Nm
|
.Nm
|
||||||
will refuse to run and require an upgrade. Do this by running
|
will refuse to run and require an upgrade. Do this by running
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
snac upgrade $HOME/snac-data
|
snac upgrade $HOME/snac-data
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
Take special care to execute this upgrade operation without any
|
Take special care to execute this upgrade operation without any
|
||||||
.Nm
|
.Nm
|
||||||
processes serving on the same folder. You can break everything. I know
|
processes serving on the same folder. You can break everything. I know
|
||||||
|
@ -195,10 +196,7 @@ supports:
|
||||||
Complete support, on input and output.
|
Complete support, on input and output.
|
||||||
.It Vt Undo
|
.It Vt Undo
|
||||||
For
|
For
|
||||||
.Vt Follow ,
|
.Vt Follow
|
||||||
.Vt Like
|
|
||||||
and
|
|
||||||
.Vt Announce
|
|
||||||
objects, on input and output.
|
objects, on input and output.
|
||||||
.It Vt Create
|
.It Vt Create
|
||||||
For
|
For
|
||||||
|
@ -265,7 +263,7 @@ bloated and filled with redundant information. Using a filesystem with
|
||||||
file compression enabled (like btrfs or zfs) will probably be a good
|
file compression enabled (like btrfs or zfs) will probably be a good
|
||||||
choice to store the
|
choice to store the
|
||||||
.Nm
|
.Nm
|
||||||
database into.
|
data storage into.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Ev DEBUG
|
.It Ev DEBUG
|
||||||
|
|
Loading…
Reference in a new issue