1
0
Fork 0

Compare commits

...

5 Commits

Author SHA1 Message Date
cage 94e819d31f - added missing module. 2024-04-13 16:21:43 +02:00
cage 1f31a64bda - added test for turbojpeg header file library in configure.ac. 2024-04-13 12:52:18 +02:00
cage 024ede9ad5 - added test for turbojpeg library in configure.ac. 2024-04-13 12:46:19 +02:00
cage bd148e93b6 - added test for TK interpreter in configure.ac. 2024-04-13 12:30:07 +02:00
cage 90a6bfa02b - [GUI] changed font size for gemtext header level 3;
- updated documentation.
2024-04-12 16:23:18 +02:00
9 changed files with 258 additions and 37 deletions

View File

@ -78,6 +78,7 @@ data/icons/fmw_two-pictures.png \
data/icons/fmw_uparrow.png \
data/modules/delete-by-regex.lisp \
data/modules/expand-abbrev-command-window.lisp \
data/modules/fetch-expired-poll.lisp \
data/modules/next-previous-open.lisp \
data/modules/rewrite-message-urls.lisp \
data/modules/share-gemini-link.lisp \

View File

@ -340,6 +340,7 @@ STRIP = @STRIP@
UNZIP = @UNZIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WISH = @WISH@
XDG_OPEN = @XDG_OPEN@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@ -445,6 +446,7 @@ data/icons/fmw_two-pictures.png \
data/icons/fmw_uparrow.png \
data/modules/delete-by-regex.lisp \
data/modules/expand-abbrev-command-window.lisp \
data/modules/fetch-expired-poll.lisp \
data/modules/next-previous-open.lisp \
data/modules/rewrite-message-urls.lisp \
data/modules/share-gemini-link.lisp \

View File

@ -37,6 +37,9 @@
** Programs
+ to build the package:
- C compiler
- SBCL compiler;
- curl
- xgettext.
+ to install the package, including running the script to install lisp libraries (~quick_quicklisp.sh~):
@ -44,7 +47,6 @@
- git.
+ to run the program:
- SBCL compiler;
- xdg-open;
- openssl;
- unzip (command line utitlity to decompress zip file);

217
configure vendored
View File

@ -617,12 +617,45 @@ PACKAGE_BUGREPORT='https://codeberg.org/cage/tinmop/'
PACKAGE_URL='https://www.autistici.org/interzona/tinmop.html'
gt_needs=
# Factoring default headers for most tests.
ac_includes_default="\
#include <stddef.h>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
ac_header_c_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
ENABLE_COMPLETION_FALSE
ENABLE_COMPLETION_TRUE
WISH
COMPLETION_DIR
PKG_CONFIG
FILE
@ -1678,6 +1711,39 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$3=yes"
else $as_nop
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
ac_configure_args_raw=
for ac_arg
do
@ -2282,6 +2348,15 @@ main (int argc, char **argv)
}
"
as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
# Auxiliary files required by this configure script.
ac_aux_files="config.guess config.sub compile config.rpath missing install-sh"
@ -7805,6 +7880,63 @@ if test "$PKG_CONFIG" != "no" ; then
fi
for ac_prog in wish
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_WISH+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $WISH in
[\\/]* | ?:[\\/]*)
ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_WISH="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
WISH=$ac_cv_path_WISH
if test -n "$WISH"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WISH" >&5
printf "%s\n" "$WISH" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$WISH" && break
done
test -n "$WISH" || WISH="no"
if test "$WISH" = "no" ; then
as_fn_error $? "Can not find TK interpreter executable." "$LINENO" 5
exit 1;
fi
if test "$COMPLETION_DIR" != ""; then
ENABLE_COMPLETION_TRUE=
ENABLE_COMPLETION_FALSE='#'
@ -7955,6 +8087,91 @@ else $as_nop
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tjInitDecompress in -lturbojpeg" >&5
printf %s "checking for tjInitDecompress in -lturbojpeg... " >&6; }
if test ${ac_cv_lib_turbojpeg_tjInitDecompress+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lturbojpeg $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char tjInitDecompress ();
int
main (void)
{
return tjInitDecompress ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_turbojpeg_tjInitDecompress=yes
else $as_nop
ac_cv_lib_turbojpeg_tjInitDecompress=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_turbojpeg_tjInitDecompress" >&5
printf "%s\n" "$ac_cv_lib_turbojpeg_tjInitDecompress" >&6; }
if test "x$ac_cv_lib_turbojpeg_tjInitDecompress" = xyes
then :
printf "%s\n" "#define HAVE_LIBTURBOJPEG 1" >>confdefs.h
LIBS="-lturbojpeg $LIBS"
else $as_nop
as_fn_error $? "Can not find libturbojpeg0." "$LINENO" 5
fi
ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
if test $ac_cache; then
ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
printf "%s\n" "#define $ac_item 1" >> confdefs.h
fi
ac_header= ac_cache=
elif test $ac_header; then
ac_cache=$ac_item
else
ac_header=$ac_item
fi
done
if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
then :
printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "turbojpeg.h" "ac_cv_header_turbojpeg_h" "$ac_includes_default"
if test "x$ac_cv_header_turbojpeg_h" = xyes
then :
else $as_nop
Can not find libturbojpeg0 headers file.
fi
ac_config_files="$ac_config_files Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in"

View File

@ -145,6 +145,13 @@ if test "$PKG_CONFIG" != "no" ; then
AC_SUBST([COMPLETION_DIR])
fi
AC_PATH_PROGS([WISH],[wish],[no])
if test "$WISH" = "no" ; then
AC_MSG_ERROR([Can not find TK interpreter executable.])
exit 1;
fi
AM_CONDITIONAL([ENABLE_COMPLETION],[test "$COMPLETION_DIR" != ""])
AC_PROG_MKDIR_P
@ -157,6 +164,12 @@ AC_CHECK_LIB([ncurses], [initscr], [], AC_MSG_ERROR([Can not find ncurses.]))
AC_CHECK_LIB([sqlite3], [sqlite3_libversion], [], AC_MSG_ERROR([Can not find libsqlite3.]))
AC_CHECK_LIB([turbojpeg], [tjInitDecompress], [], AC_MSG_ERROR([Can not find libturbojpeg0.]))
dnl check headers
AC_CHECK_HEADER([turbojpeg.h], [], [Can not find libturbojpeg0 headers file.], [])
AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])
AC_OUTPUT

View File

@ -22,8 +22,6 @@ This document assumes basic knowledge of how fediverse works. More information a
.PP
Tinmop proposes an extensible terminal interface to connect with Mastodon or Pleroma social network, the gemini (for connecting to gemspace an optional graphical interface is also available) and gopher protocol.
.IP \(em 4
\fIgemini://geminiprotocol.net/docs/\fP
.IP \(em 4
@ -86,9 +84,7 @@ Specify a fediverse user account (format: user-name@server-name)
.SH "Usage"
.PP
Users of Tinmop supposed to interact with the social network using a terminal interface (TUI, but starting with version 0.9.9.1414 a GUI
for gemini is available See \fIGUI\fP), The terminal screen layout is sketched
below:
Users of Tinmop supposed to interact with the social network using a terminal interface (TUI, but starting with version 0.9.9.1414 a GUI for gemini is available See \fIGUI\fP), the terminal screen layout is sketched below:
.RS
.nf
@ -155,10 +151,7 @@ Using the program in gemini exclusive mode (option \fB"-G"\fP) the program layou
.RE
.PP
The main way to interact with the program is using the keyboard. By default you can move focus to each window (except command window
that can not get focus explicitly) using \fB'M-arrow key'\fP (meta is \fBALT\fP on many keyboards). There is a contextual help that appears
when the user input data that provide hints about commands and a quick help window that can be shown by hitting \fC?\fP (if this
keybinding has not been customized).
The main way to interact with the program is using the keyboard. By default you can move focus to each window (except command window that can not get focus explicitly) using \fB'M-arrow key'\fP (meta is \fBALT\fP on many keyboards). There is a contextual help that appears when the user input data that provide hints about commands and a quick help window that can be shown by hitting \fC?\fP (if this keybinding has not been customized).
.SS "Command window keys"
.PP
@ -206,7 +199,7 @@ The distribution of this software comes with a bunch of pre-backed configuration
(see \fIFiles\fP) but user is expected to write a simple file with their credential to log into the server, if you want to use tinmop as a fediverse client.
.PP
The system wide configuration files are automatically included in used defined files, the configuration directive in custom files override the system wide ones.
The system wide configuration files are automatically included in user defined files, the configuration directive in custom files override the system wide ones.
.SS "Simple configuration"
.PP
@ -238,7 +231,7 @@ As you can see a line starting with a \fB#\fP is considered comment and skipped
.PP
The file with this credential are confidential and must be put into user's home directory under the path
\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 be created manually.
\fC$HOME/.local/share/tinmop/main.conf\fP. Probably the directory \fCtinmop\fP does not exists on user system; if it does not exists will be created by the software the first time it will run.
.PP
If the program was installed correctly two other files with simple semantics are located in your system wide configuration directory (usually \fC/etc/tinmop/\fP), please check these files for more information, as they are extensively commented.
@ -248,7 +241,7 @@ Is worth mentioning again that, without an user configuration file, the program
.SS "Lisp program"
.PP
These files contains Common lisp (see \fIhttps://common-lisp.net/\fP) source code. And are used both as a way to configure the program and to write module for tinmop itself.
These files contains Common lisp (see \fIhttps://common-lisp.net/\fP) source code. They are used both as a way to configure the program and to write module for tinmop itself.
.PP
These files are the only way to configure program's keybindings: sequence of pressing button to fire command commands (do not worry it is not too difficult!).
@ -264,7 +257,7 @@ However there is no need to write their own init file if user is happy with the
.SH "First time start"
.PP
After the configuration the program can be started but we are not ready to join the fediverse yet because tinmop need to be \fItrusted\fP by the server. Just follows the instruction on screen to register the application with your instance. This procedure should be followed once: when the program starts for the first time (but please note that there must be a file with valid credentials available).
After the configuration, the program can be started but we are not ready to join the fediverse yet because tinmop need to be \fItrusted\fP by the server. Just follows the instruction on screen to register the application with your instance. This procedure should be followed once: when the program starts for the first time (but please note that there must be a file with valid credentials available).
.PP
There is no additional steps to follow to connect to gemspace, instead.

View File

@ -18,8 +18,6 @@
Tinmop proposes an extensible terminal interface to connect with Mastodon or Pleroma social network, the gemini (for connecting to gemspace an optional graphical interface is also available) and gopher protocol.
- [[gemini://geminiprotocol.net/docs/]]
- [[https://geminiprotocol.net/docs/]]
@ -51,9 +49,7 @@
* Usage
Users of Tinmop supposed to interact with the social network using a terminal interface (TUI, but starting with version 0.9.9.1414 a GUI
for gemini is available See [[GUI]]), The terminal screen layout is sketched
below:
Users of Tinmop supposed to interact with the social network using a terminal interface (TUI, but starting with version 0.9.9.1414 a GUI for gemini is available See [[GUI]]), the terminal screen layout is sketched below:
#+NAME: screen-layout
#+BEGIN_SRC text
@ -103,10 +99,7 @@
#+END_SRC
The main way to interact with the program is using the keyboard. By default you can move focus to each window (except command window
that can not get focus explicitly) using *'M-arrow key'* (meta is *ALT* on many keyboards). There is a contextual help that appears
when the user input data that provide hints about commands and a quick help window that can be shown by hitting ~?~ (if this
keybinding has not been customized).
The main way to interact with the program is using the keyboard. By default you can move focus to each window (except command window that can not get focus explicitly) using *'M-arrow key'* (meta is *ALT* on many keyboards). There is a contextual help that appears when the user input data that provide hints about commands and a quick help window that can be shown by hitting ~?~ (if this keybinding has not been customized).
** Command window keys
@ -141,7 +134,7 @@
The distribution of this software comes with a bunch of pre-backed configuration files
(see [[Files]]) but user is expected to write a simple file with their credential to log into the server, if you want to use tinmop as a fediverse client.
The system wide configuration files are automatically included in used defined files, the configuration directive in custom files override the system wide ones.
The system wide configuration files are automatically included in user defined files, the configuration directive in custom files override the system wide ones.
** Simple configuration
@ -168,7 +161,7 @@
As you can see a line starting with a *#* is considered comment and skipped by the program
The file with this credential are confidential and must be put into user's home directory under the path
~$HOME/.local/share/tinmop/main.conf~. Probably the directory ~tinmop~ does not exists on user system, if it does not exists must be created manually.
~$HOME/.local/share/tinmop/main.conf~. Probably the directory ~tinmop~ does not exists on user system; if it does not exists will be created by the software the first time it will run.
If the program was installed correctly two other files with simple semantics are located in your system wide configuration directory (usually ~/etc/tinmop/~), please check these files for more information, as they are extensively commented.
@ -176,7 +169,7 @@
** Lisp program
These files contains Common lisp (see [[https://common-lisp.net/]]) source code. And are used both as a way to configure the program and to write module for tinmop itself.
These files contains Common lisp (see [[https://common-lisp.net/]]) source code. They are used both as a way to configure the program and to write module for tinmop itself.
These files are the only way to configure program's keybindings: sequence of pressing button to fire command commands (do not worry it is not too difficult!).
@ -188,7 +181,7 @@
* First time start
After the configuration the program can be started but we are not ready to join the fediverse yet because tinmop need to be /trusted/ by the server. Just follows the instruction on screen to register the application with your instance. This procedure should be followed once: when the program starts for the first time (but please note that there must be a file with valid credentials available).
After the configuration, the program can be started but we are not ready to join the fediverse yet because tinmop need to be /trusted/ by the server. Just follows the instruction on screen to register the application with your instance. This procedure should be followed once: when the program starts for the first time (but please note that there must be a file with valid credentials available).
There is no additional steps to follow to connect to gemspace, instead.

View File

@ -145,7 +145,7 @@ gemini.h3.background = #f4ecd8
gemini.h3.font = Sans
gemini.h3.size = 14
gemini.h3.size = 12
gemini.h3.weight = normal

View File

@ -17,14 +17,14 @@
(in-package :api-client)
(defparameter *client* nil
"The tooter client, used to access mastodon")
"The tooter client, used to access mastodon/pleroma")
(defparameter *credentials* nil
"An istance of 'credentials' used to holds the intormation needed to
access a mastodon instance")
access a mastodon/pleroma instance")
(defparameter *client-lock* (make-lock)
"The Lock for prevent race conditions when accessing the mastodon server")
"The Lock for prevent race conditions when accessing the mastodon/pleroma server")
(defun credentials-filename ()
"The name of the file where credentials are stored."
@ -35,7 +35,7 @@
(define-constant +protocol-scheme+ "https://" :test #'string=
:documentation "The scheme of the protocol that the
mastodon server understand.")
mastodon/pleroma server understand.")
(defun make-base-slot ()
"Makes the 'base' slots for credential, used in credentials
@ -47,7 +47,7 @@ initform."
:initform (make-base-slot)
:initarg :base
:accessor base
:documentation "The url of the mastodon instance to be accessed")
:documentation "The url of the mastodon/pleroma instance to be accessed")
(key
:initform nil
:initarg :key
@ -63,7 +63,7 @@ initform."
:initarg :access-token
:accessor access-token
:documentation "Access token to access the instance"))
(:documentation "Represents the credentials to access a mastodon
(:documentation "Represents the credentials to access a mastodon/pleroma
instance"))
(defmethod marshal:class-persistant-slots ((object credentials))
@ -85,7 +85,7 @@ initform."
(defun credentials-complete-p ()
"Returns non nil if *credentials* contains all necessary data to log
into the mastodon server"
into the mastodon/pleroma server"
(when *credentials*
(with-accessors ((base base)
(key key)
@ -97,7 +97,7 @@ into the mastodon server"
access-token))))
(defclass api-client (tooter:client) ()
(:documentation "A mastodon client instance"))
(:documentation "A mastodon/pleroma client instance"))
(defun copy-credentials-to-client ()
"Copy credential data from `*credentials*' into `*client*'"
@ -141,7 +141,7 @@ parameter, returns nil if a socket can not be opened."
(_ "<!doctype html><html><head><meta charset=\"utf-8\"/></head><body><h1>~a has been successfully authorized, you can close this tab.</h1></body></html>"))
(defun catch-auth-code (socket)
"When an user authorize a client to access mastodon the server send
"When an user authorize a client to access mastodon/pleroma the server send
an http request to an arbitrary URI chosen by the user.
This URI contains the authorization code neede to make the client