On Fri, May 10, 2019 at 07:38:22AM +0200, Alexander Burger wrote:
> (de getJson (Spl File Url Oln)
> (when (or Oln (not (info File)))
> (wget Url) )
> (pipe
> (in File
I think this whole construct is not wise. What if the file fetched with 'wget'
has a different name?
Perhaps separate this logic from this function? And why store it in a file at
all, instead of directly reading from the pipe?
You could analyze the file, and if it looks like an URL then
fetch it:
(de getJson (Spl File)
(pipe
(in
(if (or (pre? "http://" File) (pre? "https://" File))
(list "curl" "-s" File)
File ) )
(while (prin (apply echo Spl))
....
☺! A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe