Hello,
call-with-output-file and copy-port makes this task easier.
Took me a while before I found out about copy-port, too.
Maybe there are a few places in the documentation that should have explicit
mentions of it.
#lang racket
(require net/url)
(define/contract (download-file uri save-as-pat
Thanks, Dominik,
that appears to do the trick! (pdfgrep is immediately happy...).
Much appreciated,
Tim
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket
Hi,
On 24. 11. 19 13:01, Tim Hanson wrote:
> hi,
>
> I need to fetch a number of PDF documents and wrote a bit of racket to make
> it easier. The part that "downloads" is this:
>
> (let ([content
>((compose port->string get-pure-port string->url) (url-for-doc
> year doc-name))
hi,
I need to fetch a number of PDF documents and wrote a bit of racket to make it
easier. The part that "downloads" is this:
(let ([content
((compose port->string get-pure-port string->url) (url-for-doc year
doc-name))])
(let ([out (open-output-file full-path-of-file-to-w
4 matches
Mail list logo