A tool / library that progressively backs up posts from a Tumblr.com micro-blog and can produce monthly summaries of the published posts in HTML. Can be run as a scheduled GitHub Action.
MIT License
A tool / library that progressively backs up posts from a Tumblr.com micro-blog and can produce monthly summaries of the published posts in HTML. Can be run as a scheduled GitHub Action.
Created to scratch my itch and to learn more about technologies such as core.async
and (perhaps, eventually) Datomic.
Beta - under testing
Authorization: You need to have the file ./.api-key
in this current directory with the
Tumblr API key (the OAuth Consumer Key).
Configuration: Create config.edn
with the name of your Tumblr blog under :blog
. Example: {:blog "holyjak"}
.
Currently only available as a git dependency for deps-tools:
;; deps.edn
{:deps {io.github.holyjak/clj-tumblr-summarizer {:git/tag "v1.0.4" :git/sha "bec65d3"}}}}
(require '[clj-tumblr-summarizer.main :as tumblr])
;; Download new posts
(tumblr/store-new-posts "<tumblr blog name>")
;; Create a summary of the previous month's posts:
(tumblr/summarize)
Provided that you have the Clojure CLI tools and a local copy of this repo, inside its directory do:
# Download new posts
clojure -M -m clj-tumblr-summarizer.main
# Create a summary of the previous month's posts:
clojure -X:summarize
# Create a summary of the *given* month's posts:
clojure -X:summarize :data '"2022-01"'
If you have both Clojure CLI and Babashka and a local copy of this repo:
# Download new posts
bb run
# Create a summary of the previous month's posts:
bb summarize
# Create a summary of the *given* month's posts:
bb summarize-m 2022-12
See .github/workflows/archive-new-posts.yml
.
To compare the look of the summarized posts with the original posts:
bb run
to fetch the posts./fetch-posts-html.bb
to fetch the HTML of all the posts(clj-tumblr-summarizer.output/compare-summary-and-original-visuals)
in the REPL and open the produced comparison.html in a browserCopyright © 2020-2022 Jakub Holý
Distributed under the MIT License