mirror of
https://codeberg.org/cage/tinmop/
synced 2025-03-07 10:37:37 +01:00
- added script 'gemget.lisp'.
This commit is contained in:
parent
f9367e5779
commit
0f0a6935ac
15
Makefile.am
15
Makefile.am
@ -42,16 +42,17 @@ confdir = $(sysconfdir)/$(PACKAGE)
|
||||
|
||||
dist_conf_DATA = etc/init.lisp etc/default-theme.conf etc/shared.conf
|
||||
|
||||
dist_pkgdata_DATA = scripts/export-gemini-subscriptions.lisp \
|
||||
scripts/get-following.lisp \
|
||||
scripts/import-following.lisp \
|
||||
scripts/import-gemini-subscriptions.lisp \
|
||||
scripts/welcome-bot.lisp \
|
||||
modules/delete-by-regex.lisp \
|
||||
dist_pkgdata_DATA = modules/delete-by-regex.lisp \
|
||||
modules/expand-abbrev-command-window.lisp \
|
||||
modules/next-previous-open.lisp \
|
||||
modules/rewrite-message-urls.lisp \
|
||||
modules/share-gemini-link.lisp
|
||||
modules/share-gemini-link.lisp \
|
||||
scripts/export-gemini-subscriptions.lisp \
|
||||
scripts/gemget.lisp \
|
||||
scripts/get-following.lisp \
|
||||
scripts/import-following.lisp \
|
||||
scripts/import-gemini-subscriptions.lisp \
|
||||
scripts/welcome-bot.lisp
|
||||
|
||||
dist_man1_MANS = doc/tinmop.man
|
||||
|
||||
|
15
Makefile.in
15
Makefile.in
@ -404,16 +404,17 @@ doc/man.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
|
||||
confdir = $(sysconfdir)/$(PACKAGE)
|
||||
dist_conf_DATA = etc/init.lisp etc/default-theme.conf etc/shared.conf
|
||||
dist_pkgdata_DATA = scripts/export-gemini-subscriptions.lisp \
|
||||
scripts/get-following.lisp \
|
||||
scripts/import-following.lisp \
|
||||
scripts/import-gemini-subscriptions.lisp \
|
||||
scripts/welcome-bot.lisp \
|
||||
modules/delete-by-regex.lisp \
|
||||
dist_pkgdata_DATA = modules/delete-by-regex.lisp \
|
||||
modules/expand-abbrev-command-window.lisp \
|
||||
modules/next-previous-open.lisp \
|
||||
modules/rewrite-message-urls.lisp \
|
||||
modules/share-gemini-link.lisp
|
||||
modules/share-gemini-link.lisp \
|
||||
scripts/export-gemini-subscriptions.lisp \
|
||||
scripts/gemget.lisp \
|
||||
scripts/get-following.lisp \
|
||||
scripts/import-following.lisp \
|
||||
scripts/import-gemini-subscriptions.lisp \
|
||||
scripts/welcome-bot.lisp
|
||||
|
||||
dist_man1_MANS = doc/tinmop.man
|
||||
all: $(BUILT_SOURCES)
|
||||
|
30
scripts/gemget.lisp
Normal file
30
scripts/gemget.lisp
Normal file
@ -0,0 +1,30 @@
|
||||
;; slurp a gemini url
|
||||
;; Copyright © 2021 cage
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; usage:
|
||||
|
||||
;; echo URL | tinmop -e gemget.lisp
|
||||
|
||||
(in-package :scripts)
|
||||
|
||||
(defun main ()
|
||||
(handler-case
|
||||
(let ((url (read-line *standard-input* nil nil nil)))
|
||||
(write-sequence (gemini-client:slurp-gemini-url url) *standard-output*)
|
||||
(os-utils:exit-program 0))
|
||||
(error () (os-utils:exit-program 1))))
|
||||
|
||||
(main)
|
Loading…
x
Reference in New Issue
Block a user