kaberett: Photo of a cassowary with head tilted to one side (cassowary)
[personal profile] kaberett
is there a current way to get it to disgorge a list of all the tags you've ever used? I'm running searches but not managing to turn up anything relevant to the current site layout.

(no subject)

Date: 2017-05-20 08:01 pm (UTC)
alexwlchan: (Default)
From: [personal profile] alexwlchan
Possibly not automatically, but pretty sure the API would let you do it.

Maybe there’s a site/JS app for it already? If not I have scripts I can retrofit to the task.

(no subject)

Date: 2017-05-20 09:12 pm (UTC)
alexwlchan: (Default)
From: [personal profile] alexwlchan
Okay, here’s a script that will print a list of all the tags on a Tumblr blog, tallied by frequency. Requires the python-requests library and a Tumblr API key. I have the output of the script, I just need to find somewhere to put it.

#!/usr/bin/env python3
# -*- encoding: utf-8

import collections
import pprint

import requests

HOSTNAME = 'kaberett.tumblr.com'
API_KEY = '<API KEY goes here>'

API_URL = 'https://api.tumblr.com/v2/blog/%s/posts' % HOSTNAME

resp = requests.get(API_URL, params={'api_key': API_KEY})
post_count = resp.json()['response']['total_posts']

tags = collections.Counter()

for offset in range(0, post_count, 20):
    resp = requests.get(API_URL, params={
        'api_key': API_KEY,
        'offset': offset
    })    
    for p in resp.json()['response']['posts']:
        tags.update(p['tags'])

pprint.pprint(tags)
Edited Date: 2017-05-20 09:13 pm (UTC)

(no subject)

Date: 2017-05-21 09:58 am (UTC)
alexwlchan: (Default)
From: [personal profile] alexwlchan
> I'd be completely on board with e.g. getting e-mailed plaintext, if that works for you/is acceptable/etc?

Sure! (I meant to post in last night, then fell asleep at my desk. Oops.)

I don’t think I have your email address. Either leave it here and I’m email you, or you can email me first at alex@alexwlchan.net.

(no subject)

Date: 2017-05-20 08:26 pm (UTC)
vass: Small turtle with green leaf in its mouth (Default)
From: [personal profile] vass
Unfortunately, as you've surmised, "current" is the problem.

God, @staff are shit at this stuff.

(no subject)

Date: 2017-05-21 09:36 am (UTC)
shehasathree: (Default)
From: [personal profile] shehasathree
Yeah, my tag list code stopped working ...well, i don't know when because it's not like i was using it every day, but sometime between one and two weeks ago?

(no subject)

Date: 2017-05-21 08:26 am (UTC)
conuly: (Default)
From: [personal profile] conuly
One would think that this is basic functionality. Then again, I mean, Tumblr...

Profile

kaberett: Trans symbol with Swiss Army knife tools at other positions around the central circle. (Default)
kaberett

July 2025

M T W T F S S
  1 2 3 4 5 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Powered by Dreamwidth Studios