1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-21 08:50:51 +01:00

- updated manpage;

- updated italian translation;
- added a couple of resources reltaed functions.
This commit is contained in:
cage 2020-05-09 13:53:09 +02:00
parent a1970cab39
commit e40cfc8c2d
7 changed files with 167 additions and 90 deletions

View File

@ -29,7 +29,7 @@
* Usage * Usage
Users of Tinmop are expected to interacts with the social network Users of Tinmop supposed to interacts with the social network
using a terminal interface (TUI), The terminal screen layout is using a terminal interface (TUI), The terminal screen layout is
sketched below: sketched below:
@ -66,7 +66,7 @@
- command window :: the window where the user instruct the software to perform commands - command window :: the window where the user instruct the software to perform commands
The only way to interact with the program is using the keyboard. The main way to interact with the program is using the keyboard.
There is a contextual help that appears when the user input data There is a contextual help that appears when the user input data
that provide hints about commands and a quick help window that can that provide hints about commands and a quick help window that can
be shown by hitting ~?~ (if this keybinding has not been be shown by hitting ~?~ (if this keybinding has not been
@ -75,7 +75,7 @@
** Folders ** Folders
A folder is an object to groups messages for each timeline an A folder is an object to groups messages for each timeline an
arbitrary number of folder can be created, when the last message of arbitrary number of folders can be created, when the last message of
a folder is deleted the folder is deleted as well. a folder is deleted the folder is deleted as well.
* Configuration * Configuration
@ -101,7 +101,7 @@
#+BEGIN_SRC text #+BEGIN_SRC text
# a file can be included in another with this directive: # a file can be included in another with this directive:
use "default-theme.conf" use "shared.conf"
# a line starting with a '#' is a comment # a line starting with a '#' is a comment
# The server instance name # The server instance name
@ -122,14 +122,14 @@
The file with this credential are confidential and must be put into The file with this credential are confidential and must be put into
user's home directory under the path user's home directory under the path
~/home/username/.local/share/tinmop/~. Probably the directory ~$HOME/.local/share/tinmop/main.conf~. Probably the directory
~tinmop~ does not exists on user system, if it does not exists must ~tinmop~ does not exists on user system, if it does not exists must
be created manually. be created manually.
If the program was installed correctly two other files with simple If the program was installed correctly two other files with simple
semantics are located in your system wide configuration directory semantics are located in your system wide configuration directory
(usually ~/etc/tinmop/~), please check these files for more (usually ~/etc/tinmop/~), please check these files for more
information, as are extensively commented. information, as they are extensively commented.
** Lisp program ** Lisp program
@ -149,9 +149,10 @@
Again in the configuration directory there is a (commented) file Again in the configuration directory there is a (commented) file
named ~init.lisp~ that user can use as their starting point to named ~init.lisp~ that user can use as their starting point to
write their files. A custom init file (or other module files must write their files. A custom init file, or other module files, must
be located into the directory ~$HOME/.local/share/tinmop/~ be located into the directory ~$HOME/.local/share/tinmop/~ or
to be successfully loaded. ~$HOME/.config/tinmop/~ (because, you know, data is code and code
is data) to be successfully loaded.
However there is no need to write their own init file if user is However there is no need to write their own init file if user is
happy with the provided one by the package maintainers. happy with the provided one by the package maintainers.
@ -190,6 +191,29 @@
See also the file CONTRIBUTE.org See also the file CONTRIBUTE.org
** Debug mode
If you decomment the line:
#+BEGIN_SRC lisp
;;(push :debug-mode *features*)
#+END_SRC
The program will be compiled in ~debug-mode~ this means that a lot
of diagnostic output will be appended to a file named ~tinmop.log~
in the directory ~$HOME/.local/share/tinmop/~.
* Files
- ~$HOME/.local/share/tinmop/db.sqlite3~: the program database
- ~$HOME/.local/share/tinmop/client~: the program credentials to connect with the instance *keep private!*
- ~$HOME/.local/share/tinmop/tinmop.log~: this file is created only for debugging and should not be enabled in binary package distribution (see [[Contributing]]).
- ~/etc/tinmop/default-theme.conf~: default visual style
- ~/etc/tinmop/shared.conf~: some default configuration not related to themes
- ~/etc/tinmop/init.lisp~: system wide configuration
- ~$HOME/.config/tinmop/init.lisp~: user configuration
- ~$HOME/.local/share/tinmop/main.conf~: user configuration (simple format)
* Privacy * Privacy
This program do not interact with no other computer other than the This program do not interact with no other computer other than the

View File

@ -10,12 +10,12 @@ tinmop [OPTION]...
.SH "Description" .SH "Description"
.PP .PP
This document assumes basic knowledge of how mastodon works. More This document assumes basic knowledge of how mastodon works. More
information about this topic can be found on the information about this topic can be found on the
official website (\fIhttps://docs.joinmastodon.org/\fP). official website (\fIhttps://docs.joinmastodon.org/\fP).
.PP .PP
Tinmop propose a terminal interface to to connect with Mastodon or Tinmop propose a terminal interface to to connect with Mastodon or
Pleroma social network Pleroma social network
.SH "Options" .SH "Options"
@ -47,8 +47,8 @@ print program help and exit
.SH "Usage" .SH "Usage"
.PP .PP
Users of Tinmop are expected to interact with the social network Users of Tinmop supposed to interacts with the social network
using a terminal interface (TUI), The terminal screen layout is using a terminal interface (TUI), The terminal screen layout is
sketched below: sketched below:
.RS .RS
@ -76,14 +76,14 @@ sketched below:
The screen is subdivided in five window: The screen is subdivided in five window:
.TP .TP
\fBtag window\fP \fBtag window \fP
shows the tag users subscribed for and available shows the tag users subscribed for and available
messages for each tag; messages for each tag;
.TP .TP
\fBthreads window\fP \fBthreads window \fP
for a given timeline and folder (see \fIFolders\fP) show for a given timeline and folder (see
the discussions saved in user's local database; \fIFolders\fP) show the discussions saved in user's local database;
.TP .TP
\fBconversations window\fP \fBconversations window\fP
@ -98,35 +98,33 @@ show the body of the message selected in the tag window
the window where the user instruct the software to perform commands the window where the user instruct the software to perform commands
.PP .PP
The only way to interact with the program is using the keyboard. The main way to interact with the program is using the keyboard.
There is a contextual help that appears when the user input data There is a contextual help that appears when the user input data
that provide hints about commands and a quick help window that can that provide hints about commands and a quick help window that can
be shown by hitting \fC?\fP (if this keybinding has not been be shown by hitting \fC?\fP (if this keybinding has not been
customized). customized).
.SS "Folders" .SS "Folders"
.PP .PP
A folder is an object to groups messages for each timeline an A folder is an object to groups messages for each timeline an
arbitrary number of folder can be created, when the last message of arbitrary number of folders can be created, when the last message of
a folder is deleted the folder is deleted as well. a folder is deleted the folder is deleted as well.
.SH "Configuration" .SH "Configuration"
.PP .PP
The configuration of tinmop is based on text files but there are The configuration of tinmop is based on text files but there are
available two different kind with different syntax and scope. available two different kind with different syntax and scope.
.IP \(em 4 .IP \(em 4
a key value text files used to configure the access credential to a key-value text files used to configure the access credential to
.PP
server and visual theme of the program (simple configuration); server and visual theme of the program (simple configuration);
.IP \(em 4 .IP \(em 4
common lisp source code. Used to write module (AKA plugin) and to common lisp source code. Used to write module (AKA plugin) and to
.PP
configure keybindings to interact with the software. configure keybindings to interact with the software.
.PP .PP
The distribution of this software comes with a bunch of pre-backed The distribution of this software comes with a bunch of pre-backed
configuration files but user is expected to write a simple file with configuration files but user is expected to write a simple file with
their credential to log into the server. their credential to log into the server.
@ -138,7 +136,7 @@ This is a simple file with each entry in a single line that look like this:
.nf .nf
\fC \fC
# a file can be included in another with this directive: # a file can be included in another with this directive:
use "default-theme.conf" use "shared.conf"
# a line starting with a '#' is a comment # a line starting with a '#' is a comment
# The server instance name # The server instance name
@ -152,9 +150,9 @@ username = username
.RE .RE
.PP .PP
Not incidentally the information in the example above are the Not incidentally the information i the example above are the
absolute minimum the user has to provide before starts the program: absolute minimum the user has to provide before starts the program:
the name you chose when you made the account on the server and the the name you chose when you made the account on the server and the
address of the server. address of the server.
.PP .PP
@ -163,67 +161,56 @@ skipped by the program
.PP .PP
The file with this credential are confidential and must be put into The file with this credential are confidential and must be put into
user's home directory under the path user's home directory under the path
\fC/home/username/.local/share/tinmop/\fP. Probably the directory \fC$HOME/.local/share/tinmop/main.conf\fP. Probably the directory
\fCtinmop\fP does not exists on user system, if it does not exists must \fCtinmop\fP does not exists on user system, if it does not exists must
be created manually. be created manually.
.PP .PP
If the program was installed correctly two other files with simple If the program was installed correctly two other files with simple
semantics are located in your system wide configuration directory semantics are located in your system wide configuration directory
(usually \fC/etc/tinmop/\fP), please check these files for more (usually \fC/etc/tinmop/\fP), please check these files for more
information, as are extensively commented. information, as they are extensively commented.
.SS "Lisp program" .SS "Lisp program"
.PP .PP
These files contains Common lisp (see \fIhttps://common-lisp.net\fP) These files contains Common lisp (see \fIhttps://common-lisp.net/\fP)
source code. And are used both as a way to configure the program source code. And are used both as a way to configure the program
and to write module for tinmop itself. and to write module for tinmop itself.
.PP .PP
These files are the only way to configure program's keybindings: These files are the only way to configure program's keybindings:
sequence of pressing button to fire command commands (do not worry sequence of pressing button to fire command commands (do not worry
it is not too difficult!). it is not too difficult!).
.PP .PP
These files must be a valid Common Lisp program to allow the These files must be a valid Common Lisp program to allow the
program to even starts. Again this is actual source code that is program to even starts. Again this is actual source code that is
loaded end executed by the main program; be careful, do not copy loaded end executed by the main program; be careful, do not copy
and paste code from untrusted sources as this could results in a and paste code from untrusted sources as this could results in a
\fBsevere\fP security damage. \fBsevere\fP security damage.
.PP .PP
Again in the configuration directory there is a (commented) file Again in the configuration directory there is a (commented) file
named \fCinit.lisp\fP that user can use as their starting point to named \fCinit.lisp\fP that user can use as their starting point to
write their files. A custom init file (or other module files must write their files. A custom init file, or other module files, must
be located into the directory \fC/home/username/.local/share/tinmop/\fP be located into the directory \fC$HOME/.local/share/tinmop/\fP or
to be successfully loaded. \fC$HOME/.config/tinmop/\fP (because, you know, data is code and code
is data) to be successfully loaded.
.PP .PP
However there is no need to write their own init file if user is However there is no need to write their own init file if user is
happy with the provided one by the package maintainers. happy with the provided one by the package maintainers.
.SH "First time start" .SH "First time start"
.PP .PP
After the configuration the program can be started but we are not After the configuration the program can be started but we are not
ready to join the network yet because tinmop need to be \fItrusted\fP by ready to join the network yet because tinmop need to be \fItrusted\fP by
the server. Just follows the instruction on screen to register the the server. Just follows the instruction on screen to register the
application with your instance. This procedure should be followed application with your instance. This procedure should be followed
once. When the program starts for the first time (but please note once: when the program starts for the first time (but please note
that there must be a file with valid credentials available). that there must be a file with valid credentials available).
.SH "Modules and scripts"
.PP
Users can write modules and scripts for tinmop, both are lisp
program so there is no artificial limiting to what they can do, the
only difference is that the script are loaded without the TUI so
they are useful for non interactive tasks.
.PP
An example of module is the distributed file \fCinit.lisp\fP and users
can find a simple script to send a toot in the their system wide
documentation directory (sometimes: \fC/usr/share/doc/\fP).
.SH "How to get more help" .SH "How to get more help"
.PP .PP
For help with mastodon visit the mastodon website. For help with mastodon visit the mastodon website.
@ -235,7 +222,7 @@ The program has an inline help (default binding for help is "?")
Moreover you can have some useful hint at the program web page: Moreover you can have some useful hint at the program web page:
.PP .PP
\fIhttps://www.autistici.org/interzona/tinmop/\fP [\fIhttps://www.autistici.org/interzona/tinmop/\fP]
.SH "BUGS" .SH "BUGS"
.PP .PP
@ -255,6 +242,40 @@ https://notabug.org/cage/tinmop/ \fBat\fP \fIcode repository\fP.
.PP .PP
See also the file CONTRIBUTE.org See also the file CONTRIBUTE.org
.SS "Debug mode"
.PP
If you decomment the line:
.RS
.nf
\fC;;(push :debug-mode *features*)
\fP
.fi
.RE
.PP
The program will be compiled in \fCdebug\-mode\fP this means that a lot
of diagnostic output will be appended to a file named \fCtinmop.log\fP
in the directory \fC$HOME/.local/share/tinmop/\fP.
.SH "Files"
.IP \(em 4
\fC$HOME/.local/share/tinmop/db.sqlite3\fP: the program database
.IP \(em 4
\fC$HOME/.local/share/tinmop/client\fP: the program credentials to connect with the instance \fBkeep private!\fP
.IP \(em 4
\fC$HOME/.local/share/tinmop/tinmop.log\fP: this file is created only for debugging and should not be enabled in binary package distribution (see \fIContributing\fP).
.IP \(em 4
\fC/etc/tinmop/default\-theme.conf\fP: default visual style
.IP \(em 4
\fC/etc/tinmop/shared.conf\fP: some default configuration not related to themes
.IP \(em 4
\fC/etc/tinmop/init.lisp\fP: system wide configuration
.IP \(em 4
\fC$HOME/.config/tinmop/init.lisp\fP: user configuration
.IP \(em 4
\fC$HOME/.local/share/tinmop/main.conf\fP: user configuration (simple format)
.SH "Privacy" .SH "Privacy"
.PP .PP
This program do not interact with no other computer other than the This program do not interact with no other computer other than the
@ -269,4 +290,13 @@ for details.
.SH "Acknowledgment" .SH "Acknowledgment"
.PP .PP
See file LICENSES.org My deep thanks to the folks that provided us with wonderful SBCL and
Common lisp libraries.
.PP
In particular i want to thanks the authors of the libraries Croatoan and Tooter
for their help when I started to develop this program.
.PP
There are more people i borrowed code and data from, they are mentioned
in the file LINCENSES.org

View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tinmop 0.0.1\n" "Project-Id-Version: tinmop 0.0.1\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n" "Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-05-08 15:15+0200\n" "POT-Creation-Date: 2020-05-09 12:40+0200\n"
"PO-Revision-Date: 2020-05-07 16:32+0200\n" "PO-Revision-Date: 2020-05-09 12:41+0200\n"
"Last-Translator: cage <cage@invalid.org>\n" "Last-Translator: cage <cage@invalid.org>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
"Language: it\n" "Language: it\n"
@ -118,7 +118,7 @@ msgstr "SCRIPT-FILE"
msgid "Error: command ~a not found" msgid "Error: command ~a not found"
msgstr "Errore: comando ~a non trovato" msgstr "Errore: comando ~a non trovato"
#: src/conditions.lisp:67 src/conditions.lisp:71 src/db.lisp:2113 #: src/conditions.lisp:67 src/conditions.lisp:71 src/db.lisp:2130
#: src/message-rendering-utils.lisp:132 src/message-rendering-utils.lisp:166 #: src/message-rendering-utils.lisp:132 src/message-rendering-utils.lisp:166
#: src/message-rendering-utils.lisp:171 #: src/message-rendering-utils.lisp:171
msgid "unknown" msgid "unknown"
@ -258,7 +258,7 @@ msgstr "Scritto da: "
#: src/message-rendering-utils.lisp:211 #: src/message-rendering-utils.lisp:211
msgid "Boosted: " msgid "Boosted: "
msgstr "Rilanciato per:" msgstr "Rilanciato per: "
#: src/message-rendering-utils.lisp:215 #: src/message-rendering-utils.lisp:215
msgid "Date: " msgid "Date: "
@ -272,7 +272,7 @@ msgstr "Messaggi"
msgid "modeline" msgid "modeline"
msgstr "modeline" msgstr "modeline"
#: src/modules.lisp:33 #: src/modules.lisp:37
#, lisp-format #, lisp-format
msgid "" msgid ""
"Unrecoverable error: file ~a not found in any of the directory ~a ~a ~a ~a" "Unrecoverable error: file ~a not found in any of the directory ~a ~a ~a ~a"
@ -316,7 +316,12 @@ msgstr "Scaricati nuovi messaggi per l'etichetta ~a."
#: src/resources-utils.lisp:55 #: src/resources-utils.lisp:55
#, lisp-format #, lisp-format
msgid "Unrecoverable error: cannot find ~s in either ~s or ~s." msgid "Unrecoverable error: cannot find ~s in either ~s or ~s."
msgstr "Errore non rimediabile: non trovo ~s né in ~s né ~s." msgstr "Errore non rimediabile: non trovo il file ~s né in ~s né ~s."
#: src/resources-utils.lisp:72
#, lisp-format
msgid "Unrecoverable error: cannot find file ~s."
msgstr "Errore non rimediabile: non trovo il file ~s."
#: src/sending-message.lisp:114 #: src/sending-message.lisp:114
msgid "none" msgid "none"
@ -376,21 +381,21 @@ msgstr "Oggetto mancante"
msgid "No message with index ~a exists." msgid "No message with index ~a exists."
msgstr "Nessun messaggio esiste alla posizione ~a." msgstr "Nessun messaggio esiste alla posizione ~a."
#: src/thread-window.lisp:838 src/thread-window.lisp:872 #: src/thread-window.lisp:852 src/thread-window.lisp:886
#, lisp-format #, lisp-format
msgid "No next message that contains ~s exists." msgid "No next message that contains ~s exists."
msgstr "Nessun messaggio successivo che contenga ~s esiste." msgstr "Nessun messaggio successivo che contenga ~s esiste."
#: src/thread-window.lisp:844 src/thread-window.lisp:878 #: src/thread-window.lisp:858 src/thread-window.lisp:892
#, lisp-format #, lisp-format
msgid "No previous message that contains ~s exists." msgid "No previous message that contains ~s exists."
msgstr "Nessun messaggio precedente che contenga ~s esiste." msgstr "Nessun messaggio precedente che contenga ~s esiste."
#: src/thread-window.lisp:894 #: src/thread-window.lisp:908
msgid "No others unread messages exist." msgid "No others unread messages exist."
msgstr "Non ci sono altri messaggi non letti." msgstr "Non ci sono altri messaggi non letti."
#: src/thread-window.lisp:905 #: src/thread-window.lisp:919
msgid "Threads" msgid "Threads"
msgstr "Discussioni" msgstr "Discussioni"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tinmop 0.0.1\n" "Project-Id-Version: tinmop 0.0.1\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n" "Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-05-08 15:15+0200\n" "POT-Creation-Date: 2020-05-09 12:40+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -114,7 +114,7 @@ msgstr ""
msgid "Error: command ~a not found" msgid "Error: command ~a not found"
msgstr "" msgstr ""
#: src/conditions.lisp:67 src/conditions.lisp:71 src/db.lisp:2113 #: src/conditions.lisp:67 src/conditions.lisp:71 src/db.lisp:2130
#: src/message-rendering-utils.lisp:132 src/message-rendering-utils.lisp:166 #: src/message-rendering-utils.lisp:132 src/message-rendering-utils.lisp:166
#: src/message-rendering-utils.lisp:171 #: src/message-rendering-utils.lisp:171
msgid "unknown" msgid "unknown"
@ -265,7 +265,7 @@ msgstr ""
msgid "modeline" msgid "modeline"
msgstr "" msgstr ""
#: src/modules.lisp:33 #: src/modules.lisp:37
#, lisp-format #, lisp-format
msgid "" msgid ""
"Unrecoverable error: file ~a not found in any of the directory ~a ~a ~a ~a" "Unrecoverable error: file ~a not found in any of the directory ~a ~a ~a ~a"
@ -307,6 +307,11 @@ msgstr ""
msgid "Unrecoverable error: cannot find ~s in either ~s or ~s." msgid "Unrecoverable error: cannot find ~s in either ~s or ~s."
msgstr "" msgstr ""
#: src/resources-utils.lisp:72
#, lisp-format
msgid "Unrecoverable error: cannot find file ~s."
msgstr ""
#: src/sending-message.lisp:114 #: src/sending-message.lisp:114
msgid "none" msgid "none"
msgstr "" msgstr ""
@ -363,21 +368,21 @@ msgstr ""
msgid "No message with index ~a exists." msgid "No message with index ~a exists."
msgstr "" msgstr ""
#: src/thread-window.lisp:838 src/thread-window.lisp:872 #: src/thread-window.lisp:852 src/thread-window.lisp:886
#, lisp-format #, lisp-format
msgid "No next message that contains ~s exists." msgid "No next message that contains ~s exists."
msgstr "" msgstr ""
#: src/thread-window.lisp:844 src/thread-window.lisp:878 #: src/thread-window.lisp:858 src/thread-window.lisp:892
#, lisp-format #, lisp-format
msgid "No previous message that contains ~s exists." msgid "No previous message that contains ~s exists."
msgstr "" msgstr ""
#: src/thread-window.lisp:894 #: src/thread-window.lisp:908
msgid "No others unread messages exist." msgid "No others unread messages exist."
msgstr "" msgstr ""
#: src/thread-window.lisp:905 #: src/thread-window.lisp:919
msgid "Threads" msgid "Threads"
msgstr "" msgstr ""

View File

@ -17,6 +17,10 @@
(in-package :modules) (in-package :modules)
(defun load-sys-module (path)
(let ((file (get-sys-config-file path)))
(load file :verbose nil :print nil)))
(defun load-module (path) (defun load-module (path)
(flet ((%load (file) (flet ((%load (file)
(load file :verbose nil :print nil))) (load file :verbose nil :print nil)))

View File

@ -375,6 +375,7 @@
:return-home-filename :return-home-filename
:return-system-filename :return-system-filename
:get-config-file :get-config-file
:get-sys-config-file
:get-data-file)) :get-data-file))
(defpackage :crypto-utils (defpackage :crypto-utils
@ -1881,6 +1882,7 @@
:ui-goodies) :ui-goodies)
(:shadowing-import-from :resources-utils :init) (:shadowing-import-from :resources-utils :init)
(:export (:export
:load-sys-module
:load-module)) :load-module))
(defpackage :scripts (defpackage :scripts

View File

@ -65,5 +65,12 @@
(defun get-config-file (path) (defun get-config-file (path)
(get-resource-file +sys-conf-dir+ (home-confdir) path)) (get-resource-file +sys-conf-dir+ (home-confdir) path))
(defun get-sys-config-file (path &optional (system-dir +sys-conf-dir+))
(let ((system-file (fs:cat-parent-dir system-dir path)))
(if (fs:file-exists-p system-file)
system-file
(let ((msg (_ "Unrecoverable error: cannot find file ~s.")))
(error (format nil msg system-file))))))
(defun get-data-file (path) (defun get-data-file (path)
(get-resource-file +sys-data-dir+ (home-datadir) path)) (get-resource-file +sys-data-dir+ (home-datadir) path))