]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/tldr/tldr.factor
factor: update download to return path and using lists
[factor.git] / extra / tldr / tldr.factor
index a64fbc2c9fb8e2dea465edb81c54cee17761ca15..5fc08b8af525514b82e55f8103a47e2f5760d90c 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2021 John Benediktsson
 ! See https://factorcode.org/license.txt for BSD license
 
-USING: assocs combinators command-line http.client io
+USING: assocs combinators command-line http.download io
 io.directories io.encodings.utf8 io.files io.files.temp
 io.launcher io.pathnames json kernel namespaces regexp sequences
 splitting system urls wrap.strings ;
@@ -26,7 +26,7 @@ CONSTANT: tldr-zip URL" https://tldr-pages.github.io/assets/tldr.zip"
 
 : download-tldr ( -- )
     "tldr" cache-file dup make-directory [
-        tldr-zip "tldr.zip" download-to
+        tldr-zip "tldr.zip" download-to drop
         { "unzip" "tldr.zip" } try-process
     ] with-directory ;