Fork me on GitHub
#cursive
<
2019-11-21
>
onetom06:11:31

what was that trick to create some custom menu and assign a shortcut to it?

onetom07:11:12

i just wrote a quick slack archive downloader generator in clojure just so i can search the chat logs for this 🙂

(let [days (fn [date] (iterate #(.plusDays % 1) date))
        start-date (LocalDate/parse "2019-11-10")
        slack-archive-base-url ""
        curl-cmd (fn [date]
                   (format "curl -o %s.html %s"
                           date (str slack-archive-base-url date)))]
    (keep (comp println curl-cmd) (take 10 (days start-date))))

onetom07:11:09

it generates curl commands like this:

curl -o 2019-11-10.html 
curl -o 2019-11-11.html 
curl -o 2019-11-12.html 
curl -o 2019-11-13.html 

onetom07:11:11

then i can dump their content as txt with links:

for h in *.html; do links -dump $h > $(basename $h .html).txt; done
(which i just installed with nix-env -iA nixpkgs.links)

cfleming09:11:43

Haha, nice!

cfleming09:11:13

The feature is indeed quick lists. I use it for testing, but I could probably use it for a lot more if I thought about it.