Re: [racket-users] question re downloading a PDF file

2019-11-25 Thread Simon Schlee
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

Re: [racket-users] question re downloading a PDF file

2019-11-24 Thread Tim Hanson
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

Re: [racket-users] question re downloading a PDF file

2019-11-24 Thread Dominik Pantůček
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))

[racket-users] question re downloading a PDF file

2019-11-24 Thread Tim Hanson
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