tumblr-utils
tumblr-utils copied to clipboard
Feature: Save drafts using OAuth
Any way to go about this other than privately posting all 4k of my drafts?
Why would you have 4k drafts?
You can try to change the API URL. As explained here: https://www.tumblr.com/docs/en/api/v2#postsdraft--retrieve-draft-posts the only change is the addition of /drafts
after /posts
.
Looks like drafts require oauth as well.
I have adhd and kept saving things to read for when my brain wasn't crapping out, and then failing to clear them. A lot. Over basically a decade. Thanks very much, I'll give this a shot!
Having authentication errors because I can't seem to nail down what to do here... I have my keys and tokens, but I'm a bit confused per the tumble.py directions to "prepare the file ~/.config/tumblr" with them. Is that a directory on the computer itself? If so, I'm on a macbook running OS X 10.7 and may need an alternate path; I appreciate any clarification or direction on how to proceed you can give me.
I'm sorry, the OAuth instructions are only valid for tumble.py. I didn't notice this when researching the drafts API. tumblr_backup.py doesn't currently support OAuth-entication.
~
is just a shorthand notation for your home directory.
I don't suppose it's as simple as moving the relevant code from tumble.py to tumblr_backup.py and editing some references, is it?
I'm a self-taught spaghetti coder and a lot of this is outside my existing experience, so layman's terms are appreciated.
You can always give it a try!
I gave it my best! No dice, unfortunately; can't get it to authenticate and save drafts at all.
The inability to access hidden posts is frustrating, but I'm grateful for the help and the ability to experiment with it. And I learned a lot, so I can't consider it a waste of time despite the lack of desired results.
Thanks for all the help!
Erm, now we have no issue to track this. It's probably possible to implement. Could someone reopen?
With access to the API key and secret, it should be relatively easy to use tumblr/pytumblr to allow the user to use OAuth to save likes, drafts, etc.. This would also be a workaround for NSFW blogs that can't download some likes, because with account-level access the likes are exposed regardless of whether the blog is marked explicit, or whether or not the likes are made public.
I'd do it myself and submit a pull request, but I don't have access to an API key that isn't rate limited, and I doubt that Tumblr would get back to me in time for the apocalypse in two days. If whoever provided the API key for this could also provide the secret (or if it's already in there point me to it, because if it is there I'm blind), I could try and throw something together. Don't work too much in Python, though, so it probably won't be pretty.
Same predicament as stirdraws, I'm also interested in an enhancement that would preserve drafts. Luckily enough, some explicit posts saved in my drafts were still viewable after the purge but I don't know how long that'll last. Very interested if this issue could be implemented!
This is covered by PR #200. It requires a config file at ~/.config/tumblr
. See the docstring in tumble.py for instructions on how to create this file.
Anybody on Windows should edit tumblr_utils.py and change the CONFIG
variable at the top to some other path (with backslashes escaped, e.g 'C:\\Users\\Me\\tumblr_config.txt'
), since the default is for Unix-like systems.