README.org

main
michelangelo/README.org rendered · source · history · blame · raw

51 lines · 1443 bytes

 1#+title: michelangelo
 2
 3* what
 4self-hosted tumblr media client, written in go. shows photos and
 5videos from your dashboard in a masonry grid. no ads, no tracking,
 6no npm.
 7
 8* does
 9- css masonry grid, variable height, packed tight
10- infinite scroll via IntersectionObserver
11- per-blog grid view (/blog/<name>)
12- tag search (/search?q=<tag>)
13- like and reblog from the lightbox
14- dark/light via prefers-color-scheme
15- go stdlib only, no external runtime deps
16
17* setup
181. create a tumblr app at https://www.tumblr.com/oauth/apps.
19   callback url http://localhost:8080/auth/callback (or your domain).
20
212. configure:
22
23#+begin_src sh
24export CONSUMER_KEY="your-consumer-key"
25export CONSUMER_SECRET="your-consumer-secret"
26export PORT=8080   # optional, defaults to 8080
27#+end_src
28
293. build and run:
30
31#+begin_src sh
32go build -o michelangelo .
33./michelangelo
34#+end_src
35
36open http://localhost:8080. you'll be sent to tumblr to authorize.
37
38* structure
39#+begin_example
40main.go          http router, oauth flow, api proxy
41tumblr.go        tumblr api client (oauth 1.0a, no deps)
42templates/       layout.html, the html shell
43static/          app.css (grid, themes), app.js (scroll, lightbox)
44#+end_example
45
46* notes
47- oauth tokens live in cookies. clear them or hit /logout to
48  re-authenticate.
49- like/reblog use the tumblr v1 api; reblogging to your own blog
50  needs your blog name detected on first auth.
51- tag search uses /tagged, one batch, no pagination.