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