Handbook
Glossary
gemini-get ( args -- )
Vocabulary
gemini
.
cli
Inputs
args
an
object
Outputs
None
Definition
USING:
arrays
gemini
io
io.encodings.utf8
io.files
io.files.temp
kernel
sequences
splitting
urls
;
IN:
gemini.cli
:
gemini-get
( args -- )
dup
array?
[
first
]
when
dup
URL
set-first
>url
dup
gemini
[
drop
]
2dip
swap
"text/"
?head
[
"gemini.txt"
temp-file
[
utf8
[
gemini-print
]
with-file-writer
]
[
utf8
file-contents
print
]
bi
]
[
"ERROR: Cannot display '"
"'"
surround
print
2drop
]
if
;