Commit 8f74737369
Unsigned
Layout: unified · split
README.nfo deleted −51
| @@ -1,51 +0,0 @@ | |||
| 1 | ┌──────────────────────────────────────────────────────────────┐ | ||
| 2 | │ M I C H E L A N G E L O [ KRZ ] krz.sh │ | ||
| 3 | └──────────────────────────────────────────────────────────────┘ | ||
| 4 | |||
| 5 | WHAT | ||
| 6 | self-hosted tumblr media client, written in go. shows photos and | ||
| 7 | videos from your dashboard in a masonry grid. no ads, no tracking, | ||
| 8 | no npm. | ||
| 9 | |||
| 10 | DOES | ||
| 11 | - css masonry grid, variable height, packed tight | ||
| 12 | - infinite scroll via IntersectionObserver | ||
| 13 | - per-blog grid view (/blog/<name>) | ||
| 14 | - tag search (/search?q=<tag>) | ||
| 15 | - like and reblog from the lightbox | ||
| 16 | - dark/light via prefers-color-scheme | ||
| 17 | - go stdlib only, no external runtime deps | ||
| 18 | |||
| 19 | SETUP | ||
| 20 | 1. create a tumblr app at https://www.tumblr.com/oauth/apps. | ||
| 21 | callback url http://localhost:8080/auth/callback (or your domain). | ||
| 22 | |||
| 23 | 2. configure: | ||
| 24 | |||
| 25 | export CONSUMER_KEY="your-consumer-key" | ||
| 26 | export CONSUMER_SECRET="your-consumer-secret" | ||
| 27 | export PORT=8080 # optional, defaults to 8080 | ||
| 28 | |||
| 29 | 3. build and run: | ||
| 30 | |||
| 31 | go build -o michelangelo . | ||
| 32 | ./michelangelo | ||
| 33 | |||
| 34 | open http://localhost:8080. you'll be sent to tumblr to authorize. | ||
| 35 | |||
| 36 | STRUCTURE | ||
| 37 | main.go http router, oauth flow, api proxy | ||
| 38 | tumblr.go tumblr api client (oauth 1.0a, no deps) | ||
| 39 | templates/ layout.html, the html shell | ||
| 40 | static/ app.css (grid, themes), app.js (scroll, lightbox) | ||
| 41 | |||
| 42 | NOTES | ||
| 43 | - oauth tokens live in cookies. clear them or hit /logout to | ||
| 44 | re-authenticate. | ||
| 45 | - like/reblog use the tumblr v1 api; reblogging to your own blog | ||
| 46 | needs your blog name detected on first auth. | ||
| 47 | - tag search uses /tagged, one batch, no pagination. | ||
| 48 | |||
| 49 | ┌──────────────────────────────────────────────────────────────┐ | ||
| 50 | │ krz.sh │ | ||
| 51 | └──────────────────────────────────────────────────────────────┘ | ||
README.org added +51
| @@ -0,0 +1,51 @@ | |||
| 1 | #+title: michelangelo | ||
| 2 | |||
| 3 | * what | ||
| 4 | self-hosted tumblr media client, written in go. shows photos and | ||
| 5 | videos from your dashboard in a masonry grid. no ads, no tracking, | ||
| 6 | no 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 | ||
| 18 | 1. create a tumblr app at https://www.tumblr.com/oauth/apps. | ||
| 19 | callback url http://localhost:8080/auth/callback (or your domain). | ||
| 20 | |||
| 21 | 2. configure: | ||
| 22 | |||
| 23 | #+begin_src sh | ||
| 24 | export CONSUMER_KEY="your-consumer-key" | ||
| 25 | export CONSUMER_SECRET="your-consumer-secret" | ||
| 26 | export PORT=8080 # optional, defaults to 8080 | ||
| 27 | #+end_src | ||
| 28 | |||
| 29 | 3. build and run: | ||
| 30 | |||
| 31 | #+begin_src sh | ||
| 32 | go build -o michelangelo . | ||
| 33 | ./michelangelo | ||
| 34 | #+end_src | ||
| 35 | |||
| 36 | open http://localhost:8080. you'll be sent to tumblr to authorize. | ||
| 37 | |||
| 38 | * structure | ||
| 39 | #+begin_example | ||
| 40 | main.go http router, oauth flow, api proxy | ||
| 41 | tumblr.go tumblr api client (oauth 1.0a, no deps) | ||
| 42 | templates/ layout.html, the html shell | ||
| 43 | static/ 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. | ||