1
0
Fork 0

- [script] added the option to submit the feed to and antenna instance, when generating a gemlog;

- updated gemlog.
This commit is contained in:
cage 2024-03-12 16:25:59 +01:00
parent 35d1eaf95f
commit 71259af4d7
3 changed files with 79 additions and 9 deletions

View File

@ -1,11 +1,42 @@
2024-03-12 cage
* po/de.po,
* po/es.po,
* po/fr.po,
* po/it.po,
* po/pl.po,
* po/tinmop.pot,
* src/message-rendering-utils.lisp:
- prevented the poll's results to be printed before expiration.
2024-03-03 cage
* src/gemini/dummy-server.lisp,
* src/gui/client/titan-window.lisp,
* src/gui/server/public-api-gemini-stream.lisp,
* src/json-rpc2.lisp:
- [GUI] fixed managing of gemini responses when a titan request was
performed (TOFU errors, TLS certificate password etc.);
- fixed error arising when 'debug-gemini-gui' was called with more
than two arguments.
2024-03-02 cage
* ChangeLog,
* NEWS.org,
* configure,
* configure.ac,
* etc/init.lisp,
* src/line-oriented-window.lisp:
* src/line-oriented-window.lisp,
* tinmop.asd:
- [TUI] added 'C-g' keybinding to close the windows.
- [TUI] added 'C-g' keybinding to close the blocking dialog window.
- [TUI] refactored quitting dialog test code in a function.
- updated NEWS.org and Changelog.
- removed 'rc1' from version number.
2024-03-01 cage

View File

@ -1,19 +1,20 @@
* 2024-03-02 version 0.9.9.141421356
- new features
- [GUI] added contextual menu to copy gemlogs links or mark all their posts as already read;
- [GUI/TUI] added procedures to manage (add, delete, modify) passwords for client TLS certificates;
- [GUI/TUI] added procedures to manage (add, delete, modify) passwords for client TLS certificates;
- [GUI] added a button to give a visual hint that the client provided the server a TLS certificate.
- [TUI] added keybinding to cancel the prompt in the command window while the program is asking for an input string.
- Improvements
- improved rendering of html blockquote;
- updated French and German translation;
- [GUI] returned more useful error messages when a gemini connection goes timeout;
- [TUI] added command to download a post's attachment ignoring the cached value (if such entry in the cache exists).
- [TUI] added command to download a post's attachment ignoring the cached value (if such entry in the cache exists);
- [TUI] prevented results of non expired polls to be printed.
- Bugfix
- [GUI] fixed inlining og images;
- [GUI] fixed deletion of TLS client certificates;
- [TUI] [fediverse] fixed searching in reblogged statuses body, previously the search; procedure skipped the reblogged statuses.
- [TUI] fixed backspace key when the software asks for an imput string;
- [TUI] fixed backspace key when the software asks for an input string;
- [TUI] allowed empty lines in a gopher map (thanks op!);
- [TUI] [fediverse] prevented treating 'update' notifications as mentions;

View File

@ -38,6 +38,10 @@
;; The source directory where the posts can be found to be processed by this script
;; - GEMLOG_POSTS_DESTINATION
;; the destination directory where the processed posts and generated indices are placed
;; - GEMLOG_ANTENNA_URL
;; the url of the antenna instance
;; - GEMLOG_ANTENNA_TARGET_URL
;; the url of the target url for antenna; that is, the url of your gemlog
;; METADATA
@ -117,6 +121,12 @@
(a:define-constant +environment-variable-gemlog-posts-destination+
"GEMLOG_POSTS_DESTINATION" :test #'string=)
(a:define-constant +environment-variable-antenna-url+
"GEMLOG_ANTENNA_URL" :test #'string=)
(a:define-constant +environment-variable-antenna-target-url+
"GEMLOG_ANTENNA_TARGET_URL" :test #'string=)
(defun getenv (key default)
(os-utils:getenv key :default default))
@ -422,7 +432,19 @@
(generate ()
(generate-gemlog bulk-posts-dir output-directory)
(notify "Gemlog generated~%")
(ui:open-gemini-address output-directory))
(submit-antenna))
(submit-antenna ()
(when (and (getenv +environment-variable-antenna-target-url+ nil)
(getenv +environment-variable-antenna-url+ nil))
(ui:ask-string-input #'on-submit-to-antenna
:prompt (format nil
"Antenna submit URL: ~a, submit? [y/N]"
(to-s (generate-antenna-submit-url))))))
(on-submit-to-antenna (maybe-accepted)
(ui-goodies::with-valid-yes-at-prompt (maybe-accepted y-pressed-p)
(when y-pressed-p
(gemini-client:slurp-gemini-url (to-s (generate-antenna-submit-url))))
(ui:open-gemini-address output-directory)))
(on-bulk-complete (input-text)
(ui::with-enqueued-process ()
(setf bulk-posts-dir input-text)
@ -443,9 +465,7 @@
(on-root-completed (root)
(ui::with-enqueued-process ()
(setf *uri-path-prefix* root)
(generate-gemlog bulk-posts-dir output-directory)
(notify "Gemlog generated~%")
(ui:open-gemini-address output-directory))))
(generate))))
(cond
((null bulk-posts-dir)
(ui:ask-string-input #'on-bulk-complete
@ -467,6 +487,18 @@
(finish-output)
(read-line))
(defun generate-antenna-submit-url ()
(multiple-value-bind (actual-iri host path query port fragment)
(gemini-client:displace-iri (iri-parser:iri-parse (getenv +environment-variable-antenna-url+
nil)))
(declare (ignore actual-iri fragment query))
(iri-parser:make-iri gemini-constants:+gemini-scheme+
nil
host
port
path
(getenv +environment-variable-antenna-target-url+ nil))))
(if (ui:tui-active-p)
(generate-on-tui)
(let* ((bulk-posts-dir (or (getenv +environment-variable-gemlog-posts-archive+ nil)
@ -475,4 +507,10 @@
(ask-input-cli +output-dir-prompt+))))
(when (null *uri-path-prefix*)
(setf *uri-path-prefix* (ask-input-cli +root-dir-prompt+)))
(generate-gemlog bulk-posts-dir output-directory)))
(generate-gemlog bulk-posts-dir output-directory)
(when (and (getenv +environment-variable-antenna-target-url+ nil)
(getenv +environment-variable-antenna-url+ nil))
(format t "Antenna submit URL:~%~a~%" (to-s (generate-antenna-submit-url)))
(let ((submit (ask-input-cli "Submit the gemlog to antenna? [y/N]")))
(when (string= submit "y")
(gemini-client:slurp-gemini-url (to-s (generate-antenna-submit-url))))))))