1
0
Fork 0

- added a command line option to retrieve a gemini URL.

This commit is contained in:
cage 2020-06-23 15:51:43 +02:00
parent f861d80b8c
commit 28917208d6
7 changed files with 46 additions and 20 deletions

View File

@ -20,6 +20,7 @@
Without options the program will start a terminal interface and will
try to connect to your instance (see [[Configuration]])
+ -o, --open-gemini-url ARG :: Open gemini url
+ -m, --notify-mentions ARG :: Notify messages that mentions the user
+ -R, --reset-timeline-pagination ::
Reset the timeline pagination. By default the new toots are fetched

View File

@ -23,6 +23,9 @@ social network
Without options the program will start a terminal interface and will
try to connect to your instance (see \fIConfiguration\fP)
.TP
\fB-o, --open-gemini-url ARG \fP
Open gemini url
.TP
\fB-m, --notify-mentions ARG \fP
Notify messages that mentions the user

View File

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: tinmop 0.0.1\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-06-23 11:19+0200\n"
"PO-Revision-Date: 2020-06-23 11:19+0200\n"
"POT-Creation-Date: 2020-06-23 15:48+0200\n"
"PO-Revision-Date: 2020-06-23 15:49+0200\n"
"Last-Translator: cage <cage@invalid.org>\n"
"Language-Team: Italian\n"
"Language: it\n"
@ -126,6 +126,10 @@ msgstr "SCRIPT-FILE"
msgid "Notify messages that mentions the user"
msgstr "Notifica i messaggi che menzionano l'utente."
#: src/command-line.lisp:69
msgid "Open gemini url"
msgstr "Apri un indirizzo gemini"
#: src/command-window.lisp:299
#, lisp-format
msgid "Error: command ~a not found"
@ -190,12 +194,12 @@ msgstr ""
"La firma dell'host ~s è cambiata! Questo è un potenziale problema di "
"sicurezza! Proseguire? [s/N]"
#: src/gemini-viewer.lisp:98 src/tui-utils.lisp:478
#: src/gemini-viewer.lisp:97 src/tui-utils.lisp:478
#, lisp-format
msgid "Error: ~a"
msgstr "Errore: ~a"
#: src/gemini-viewer.lisp:103
#: src/gemini-viewer.lisp:104
#, lisp-format
msgid "Error getting ~s: ~a"
msgstr "Errore connettendomi a ~s: ~a"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tinmop 0.0.9\n"
"Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n"
"POT-Creation-Date: 2020-06-23 11:19+0200\n"
"POT-Creation-Date: 2020-06-23 15:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -122,6 +122,10 @@ msgstr ""
msgid "Notify messages that mentions the user"
msgstr ""
#: src/command-line.lisp:69
msgid "Open gemini url"
msgstr ""
#: src/command-window.lisp:299
#, lisp-format
msgid "Error: command ~a not found"
@ -181,12 +185,12 @@ msgid ""
"warning? [y/N] "
msgstr ""
#: src/gemini-viewer.lisp:98 src/tui-utils.lisp:478
#: src/gemini-viewer.lisp:97 src/tui-utils.lisp:478
#, lisp-format
msgid "Error: ~a"
msgstr ""
#: src/gemini-viewer.lisp:103
#: src/gemini-viewer.lisp:104
#, lisp-format
msgid "Error getting ~s: ~a"
msgstr ""

View File

@ -64,8 +64,12 @@
:description (_ "Notify messages that mentions the user")
:short #\m
:arg-parser #'identity
:long "notify-mentions")))
:long "notify-mentions")
(:name :open-gemini-url
:description (_ "Open gemini url")
:short #\o
:arg-parser #'identity
:long "open-gemini-url")))
(defparameter *start-folder* nil)
@ -81,6 +85,8 @@
(defparameter *notify-mentions* nil)
(defparameter *gemini-url* nil)
(defparameter *update-timeline-climb-message-tree* nil)
(defun exit-on-error (e)
@ -102,6 +108,8 @@
(os-utils:exit-program))
(when (getf options :folder)
(setf *start-folder* (getf options :folder)))
(when (getf options :open-gemini-url)
(setf *gemini-url* (getf options :open-gemini-url)))
(when (getf options :timeline)
(setf *start-timeline* (getf options :timeline)))
(when (getf options :reset-timeline-pagination)

View File

@ -116,17 +116,22 @@ etc.) happened"
;; now init the client
(client:init)
(client:authorize)
(let ((program-events:*process-events-immediately* t))
(when command-line:*start-timeline*
(change-timeline))
(when command-line:*start-folder*
(change-folder)))
(when command-line:*reset-timeline-pagination*
(reset-timeline-pagination))
(when command-line:*update-timeline*
(ui:update-current-timeline))
(when command-line:*check-follow-requests*
(ui:start-follow-request-processing))))
(if command-line:*gemini-url*
(progn
(gemini-viewer:request *gemini-url*)
(ui:focus-to-message-window))
(progn
(let ((program-events:*process-events-immediately* t))
(when command-line:*start-timeline*
(change-timeline))
(when command-line:*start-folder*
(change-folder)))
(when command-line:*reset-timeline-pagination*
(reset-timeline-pagination))
(when command-line:*update-timeline*
(ui:update-current-timeline))
(when command-line:*check-follow-requests*
(ui:start-follow-request-processing))))))
(defun run ()
(windows:with-croatoan-window (croatoan-window specials:*main-window*)

View File

@ -1066,6 +1066,7 @@
:*check-follow-requests*
:*reset-timeline-pagination*
:*notify-mentions*
:*gemini-url*
:*update-timeline-climb-message-tree*
:manage-opts))