diff --git a/doc/man.org b/doc/man.org index f0b11f6..1f073f7 100644 --- a/doc/man.org +++ b/doc/man.org @@ -19,13 +19,17 @@ Without options the program will start a terminal interface and will try to connect to your instance (see [[Configuration]]) - + -e, --execute-script SCRIPT-FILE :: Execute a script file + + -R, --reset-timeline-pagination :: + Reset the timeline pagination. By default the new toots are fetched + starting from the last one downloaded from the instance, this switch + will force the program to fetch the last message posted by users + -c, --check-follows-requests :: Checks for follow request at start - + -u, --update-timeline :: Update the selected timeline - + -t, --timeline TIMELINE-NAME :: Start using this timeline + + -e, --execute-script SCRIPT-FILE :: Execute a script file + -f, --folder FOLDER-NAME :: Start on that folder - + -v, --version :: Print program version and exit + -h, --help :: print program help and exit + + -t, --timeline TIMELINE-NAME :: Start using this timeline + + -u, --update-timeline :: Update the selected timeline + + -v, --version :: Print program version and exit * Usage diff --git a/doc/tinmop.man b/doc/tinmop.man index 74b0905..ab943af 100644 --- a/doc/tinmop.man +++ b/doc/tinmop.man @@ -24,26 +24,31 @@ Without options the program will start a terminal interface and will try to connect to your instance (see \fIConfiguration\fP) .TP -\fB-e, --execute-script SCRIPT-FILE\fP -Execute a script file +\fB-R, --reset-timeline-pagination \fP +Reset the timeline pagination. By default the new toots are fetched +starting from the last one downloaded from the instance, this switch +will force the program to fetch the last message posted by users .TP \fB-c, --check-follows-requests \fP Checks for follow request at start .TP -\fB-u, --update-timeline \fP -Update the selected timeline -.TP -\fB-t, --timeline TIMELINE-NAME \fP -Start using this timeline +\fB-e, --execute-script SCRIPT-FILE\fP +Execute a script file .TP \fB-f, --folder FOLDER-NAME \fP Start on that folder .TP -\fB-v, --version \fP -Print program version and exit -.TP \fB-h, --help \fP print program help and exit +.TP +\fB-t, --timeline TIMELINE-NAME \fP +Start using this timeline +.TP +\fB-u, --update-timeline \fP +Update the selected timeline +.TP +\fB-v, --version \fP +Print program version and exit .SH "Usage" .PP diff --git a/po/it.po b/po/it.po index 87062ae..130e007 100644 --- a/po/it.po +++ b/po/it.po @@ -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-05-17 17:47+0200\n" -"PO-Revision-Date: 2020-05-17 17:49+0200\n" +"POT-Creation-Date: 2020-05-18 19:14+0200\n" +"PO-Revision-Date: 2020-05-18 19:15+0200\n" "Last-Translator: cage \n" "Language-Team: Italian\n" "Language: it\n" @@ -107,14 +107,18 @@ msgid "Update timeline" msgstr "Aggiorna la timeline" #: src/command-line.lisp:50 +msgid "Reset the timeline pagination" +msgstr "resetta la paginazione della timeline" + +#: src/command-line.lisp:54 msgid "Check follows requests" msgstr "Controlla le richieste di poterti seguire" -#: src/command-line.lisp:54 +#: src/command-line.lisp:58 msgid "Execute script" msgstr "Esegui script" -#: src/command-line.lisp:57 +#: src/command-line.lisp:61 msgid "SCRIPT-FILE" msgstr "SCRIPT-FILE" diff --git a/po/tinmop.pot b/po/tinmop.pot index 6183285..a08f0ae 100644 --- a/po/tinmop.pot +++ b/po/tinmop.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: tinmop 0.0.1\n" +"Project-Id-Version: tinmop 0.0.2\n" "Report-Msgid-Bugs-To: https://notabug.org/cage/tinmop/\n" -"POT-Creation-Date: 2020-05-17 17:47+0200\n" +"POT-Creation-Date: 2020-05-18 19:14+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,14 +103,18 @@ msgid "Update timeline" msgstr "" #: src/command-line.lisp:50 -msgid "Check follows requests" +msgid "Reset the timeline pagination" msgstr "" #: src/command-line.lisp:54 +msgid "Check follows requests" +msgstr "" + +#: src/command-line.lisp:58 msgid "Execute script" msgstr "" -#: src/command-line.lisp:57 +#: src/command-line.lisp:61 msgid "SCRIPT-FILE" msgstr "" diff --git a/src/command-line.lisp b/src/command-line.lisp index d91014f..eb4a89a 100644 --- a/src/command-line.lisp +++ b/src/command-line.lisp @@ -23,49 +23,55 @@ (defmacro gen-opts () `(opts:define-opts (:name :help - :description (_ "Print help and exit") - :short #\h - :long "help") + :description (_ "Print help and exit") + :short #\h + :long "help") (:name :version - :description (_ "Print program information and exit") - :short #\v - :long "version") + :description (_ "Print program information and exit") + :short #\v + :long "version") (:name :folder - :description (_ "Starting folder") - :short #\f - :arg-parser #'identity - :meta-var (_ "FOLDER-NAME") - :long "folder") + :description (_ "Starting folder") + :short #\f + :arg-parser #'identity + :meta-var (_ "FOLDER-NAME") + :long "folder") (:name :timeline - :description (_ "Starting timeline") - :short #\t - :meta-var (_ "TIMELINE-NAME") - :arg-parser #'identity - :long "timeline") + :description (_ "Starting timeline") + :short #\t + :meta-var (_ "TIMELINE-NAME") + :arg-parser #'identity + :long "timeline") (:name :update-timeline - :description (_ "Update timeline") - :short #\u - :long "update-timeline") + :description (_ "Update timeline") + :short #\u + :long "reset-timeline-pagination") + (:name :reset-timeline-pagination + :description (_ "Reset the timeline pagination") + :short #\R + :long "reset-timeline-pagination") (:name :check-follows-requests - :description (_ "Check follows requests") - :short #\c - :long "check-follows-requests") + :description (_ "Check follows requests") + :short #\c + :long "check-follows-requests") (:name :execute - :description (_ "Execute script") - :short #\e - :arg-parser #'identity - :meta-var (_ "SCRIPT-FILE") - :long "execute-script"))) + :description (_ "Execute script") + :short #\e + :arg-parser #'identity + :meta-var (_ "SCRIPT-FILE") + :long "execute-script"))) -(defparameter *start-folder* nil) +(defparameter *start-folder* nil) -(defparameter *start-timeline* nil) +(defparameter *start-timeline* nil) -(defparameter *update-timeline* nil) +(defparameter *update-timeline* nil) -(defparameter *script-file* nil) +(defparameter *script-file* nil) -(defparameter *check-follow-requests* nil) +(defparameter *check-follow-requests* nil) + +(defparameter *reset-timeline-pagination* nil) (defun exit-on-error (e) (format *error-output* "~a~%" e) @@ -88,8 +94,10 @@ (setf *start-folder* (getf options :folder))) (when (getf options :timeline) (setf *start-timeline* (getf options :timeline))) + (when (getf options :reset-timeline-pagination) + (setf *reset-timeline-pagination* t)) (when (getf options :update-timeline) - (setf *update-timeline* (getf options :update-timeline))) + (setf *update-timeline* t)) (when (getf options :execute) (setf *script-file* (getf options :execute))) (when (getf options :check-follows-requests) diff --git a/src/main.lisp b/src/main.lisp index f6a27bd..b782d41 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -81,6 +81,9 @@ etc.) happened" :new-timeline command-line:*start-timeline*))) (program-events:push-event refresh-event))) +(defun reset-timeline-pagination () + (ui:reset-timeline-pagination)) + (defun load-configuration-files () (swconf:load-config-file swconf:+shared-conf-filename+) (swconf:load-config-file swconf:+conf-filename+)) @@ -115,6 +118,8 @@ etc.) happened" (change-folder)) (when command-line:*start-timeline* (change-timeline))) + (when command-line:*reset-timeline-pagination* + (reset-timeline-pagination)) (when command-line:*update-timeline* (ui:update-current-timeline)) (when command-line:*check-follow-requests* diff --git a/src/package.lisp b/src/package.lisp index c64f7b8..da19cc4 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -1974,6 +1974,7 @@ :*update-timeline* :*script-file* :*check-follow-requests* + :*reset-timeline-pagination* :manage-opts)) (defpackage :main