mirror of https://codeberg.org/cage/tinmop/
Compare commits
8 Commits
f45c41b38c
...
8ffd321218
Author | SHA1 | Date |
---|---|---|
cage | 8ffd321218 | |
cage | b08cfb7ca0 | |
cage | 9e3a93885f | |
cage | 3f0cdae6d6 | |
cage | 5559b99514 | |
cage | 94dd5df350 | |
cage | d51c48bbb5 | |
cage | 331c3ac847 |
44
ChangeLog
44
ChangeLog
|
@ -1,12 +1,54 @@
|
|||
2024-09-28 cage
|
||||
|
||||
* data/scripts/gemget.lisp,
|
||||
* etc/init.lisp,
|
||||
* src/command-line.lisp,
|
||||
* src/constants.lisp,
|
||||
* src/gemini/dummy-server.lisp,
|
||||
* src/gui/client/main-window.lisp:
|
||||
|
||||
- [script] passed command line arguments to gemget;
|
||||
- update documentation.
|
||||
- fixed keychord for 'clear-cache' command.
|
||||
- simulated a server that send data slowly (but not slow enough to
|
||||
trigger a timeout).
|
||||
- [GUI] rewritten 'loop-fetch' in iterative style to prevent a stack
|
||||
overflow when the server is too slow providing response's data.
|
||||
|
||||
2024-09-27 cage
|
||||
|
||||
* .gitignore,
|
||||
* ChangeLog,
|
||||
* NEWS.org,
|
||||
* configure,
|
||||
* configure.ac,
|
||||
* etc/shared.conf,
|
||||
* po/ca.po,
|
||||
* po/de.po,
|
||||
* po/es.po,
|
||||
* po/fr.po,
|
||||
* po/it.po,
|
||||
* po/pl.po,
|
||||
* po/tinmop.pot,
|
||||
* src/db.lisp,
|
||||
* src/gui/server/json-rpc-communication.lisp,
|
||||
* src/text-utils.lisp:
|
||||
* src/package.lisp,
|
||||
* src/scheduled-events.lisp,
|
||||
* src/software-configuration.lisp,
|
||||
* src/text-utils.lisp,
|
||||
* tinmop.asd:
|
||||
|
||||
- [GUI] ensured cleaning of temporary files on exit.
|
||||
- [fediverse] ensured the posts do not contains non printable
|
||||
characters.
|
||||
- update version number building scrips and changelog.
|
||||
- updated NEWS.org.
|
||||
- updated reference lines number in PO files.
|
||||
- added purging of unused mentions from database;
|
||||
- fixed function to clean configuration directives relate dto purging
|
||||
entries from database (history, mentions etc.).
|
||||
- added 'rc1' to version numeber.
|
||||
Merge branch 'master' into development
|
||||
|
||||
2024-09-26 cage
|
||||
|
||||
|
|
|
@ -16,13 +16,15 @@
|
|||
|
||||
;; usage:
|
||||
|
||||
;; echo URL | tinmop -e gemget.lisp
|
||||
;; tinmop -e gemget.lisp -- URL or
|
||||
;; echo "url" | tinmop -e gemget.lisp
|
||||
|
||||
(in-package :scripts)
|
||||
|
||||
(defun main ()
|
||||
(handler-case
|
||||
(let ((url (read-line *standard-input* nil nil nil)))
|
||||
(let ((url (or (first command-line:*free-arguments*)
|
||||
(read-line *standard-input* nil nil nil))))
|
||||
(write-sequence (gemini-client:slurp-gemini-url url) *standard-output*)
|
||||
(os-utils:exit-program 0))
|
||||
(usocket:ns-host-not-found-error (e)
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
|
||||
(define-key "?" #'print-quick-help)
|
||||
|
||||
(define-key "C d" #'clear-cache)
|
||||
(define-key "C-d" #'clear-cache)
|
||||
|
||||
(define-key "C-I" #'pass-focus-next)
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@
|
|||
|
||||
(defparameter *free-arguments* nil)
|
||||
|
||||
|
||||
(defun exit-on-error (e)
|
||||
(format *error-output* "~a~%" e)
|
||||
(os-utils:exit-program 1))
|
||||
|
|
|
@ -60,7 +60,7 @@ along with this program."
|
|||
|
||||
|
||||
|
||||
Welcome to ~a! A gemini, pleroma and kami client.
|
||||
Welcome to ~a! A gemini, gopher, mastodon/pleroma and kami client.
|
||||
|
||||
- for available keychords (sequence of keys to fire a command) help type '?';
|
||||
|
||||
|
@ -87,7 +87,7 @@ Some useful keycords to start (the man page contains the full list):
|
|||
- 'b' go back in history of visited URLs
|
||||
- '!' search geminispace (contacts gemini://kennedy.gemi.dev/search)
|
||||
|
||||
· pleroma
|
||||
· mastodon/pleroma
|
||||
- 'C-t u' update current timeline
|
||||
- 'C-t c' change timeline
|
||||
- 'v' view post's attachments
|
||||
|
|
|
@ -59,6 +59,23 @@ and key stored in the file pointed by the filesystem path
|
|||
request
|
||||
client-cert-fingerprint)
|
||||
(cond
|
||||
((cl-ppcre:scan "slow" request)
|
||||
(format t "slow...~%")
|
||||
(let ((response (format nil
|
||||
"~a text/gemini~a~a"
|
||||
(code gemini-client::+20+)
|
||||
#\return #\newline)))
|
||||
(format t "sending: ~a~%" response)
|
||||
(write-sequence (text-utils:string->octets response)
|
||||
stream)
|
||||
(loop for i from 0 below 100 do
|
||||
(sleep 1)
|
||||
(write-sequence (text-utils:string->octets (format nil "~a~%" i))
|
||||
stream)
|
||||
(finish-output stream)
|
||||
(format t "sent ~a~%" i))
|
||||
(close stream)
|
||||
(get-data)))
|
||||
((cl-ppcre:scan "timeout" request)
|
||||
(format t "timeout...~%")
|
||||
(sleep 3600))
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
(process-function #'identity)
|
||||
(aborting-function (constantly nil))
|
||||
(ignore-certificate-expiration nil))
|
||||
"This code runs in a different thread spawned in `start-streaming-thread'."
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(set-focus-to-gemtext main-window))
|
||||
(enqueue-request-notify-error :gemini-request
|
||||
|
@ -161,23 +162,33 @@
|
|||
(gemtext-widget main-window)
|
||||
nil)
|
||||
nil)))
|
||||
(fetch-latest-lines (iri last-lines-fetched-count)
|
||||
(gui-goodies:with-notify-errors
|
||||
(cev:enqueue-request-and-wait-results :gemini-stream-parsed-line-slice
|
||||
1
|
||||
ev:+standard-event-priority+
|
||||
iri
|
||||
last-lines-fetched-count ; start slice
|
||||
nil))) ; end slice
|
||||
(loop-fetch (&optional (last-lines-fetched-count 0))
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(gui-goodies:with-notify-errors
|
||||
(let* ((last-lines-fetched (comm:make-request :gemini-stream-parsed-line-slice
|
||||
1
|
||||
iri
|
||||
last-lines-fetched-count
|
||||
nil))
|
||||
(next-start-fetching (length last-lines-fetched)))
|
||||
(when last-lines-fetched
|
||||
(funcall process-function stream-wrapper last-lines-fetched))
|
||||
(if (not (or (funcall aborting-function)
|
||||
(and (stream-exausted-p)
|
||||
(<= next-start-fetching 0))))
|
||||
(loop-fetch (+ last-lines-fetched-count
|
||||
next-start-fetching))
|
||||
(perform-after-stream-exausted-actions)))))))
|
||||
(let* ((last-lines-fetched (fetch-latest-lines iri last-lines-fetched-count))
|
||||
(next-start-fetching (length last-lines-fetched)))
|
||||
(misc:dbg "loop fetch ~a ~a" iri last-lines-fetched-count)
|
||||
(loop while (not (or (funcall aborting-function)
|
||||
(and (stream-exausted-p)
|
||||
(<= next-start-fetching 0))))
|
||||
do
|
||||
(progn
|
||||
(when last-lines-fetched
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(gui-goodies:with-notify-errors
|
||||
(funcall process-function stream-wrapper last-lines-fetched))))
|
||||
(setf last-lines-fetched (fetch-latest-lines iri last-lines-fetched-count))
|
||||
(setf next-start-fetching (length last-lines-fetched))
|
||||
(incf last-lines-fetched-count next-start-fetching)))
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(gui-goodies:with-notify-errors
|
||||
(perform-after-stream-exausted-actions))))))
|
||||
(loop-fetch)
|
||||
(if (cev:enqueue-request-and-wait-results :gemini-bookmarked-p
|
||||
1
|
||||
|
@ -1346,7 +1357,9 @@ local file paths."
|
|||
1
|
||||
ev:+maximum-event-priority+
|
||||
iri)
|
||||
(start-stream-iri iri main-window use-cache
|
||||
(start-stream-iri iri
|
||||
main-window
|
||||
use-cache
|
||||
:status status
|
||||
:ignore-certificate-expiration ignore-certificate-expiration)))
|
||||
((or (gemini-client:header-temporary-failure-p status-code)
|
||||
|
|
Loading…
Reference in New Issue