Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Save drafts using OAuth #123

Open
stirdraws opened this issue Dec 4, 2018 · 13 comments
Open

Feature: Save drafts using OAuth #123

stirdraws opened this issue Dec 4, 2018 · 13 comments
Assignees

Comments

@stirdraws
Copy link

Any way to go about this other than privately posting all 4k of my drafts?

@bbolli
Copy link
Owner

bbolli commented Dec 4, 2018

Why would you have 4k drafts?

@bbolli
Copy link
Owner

bbolli commented Dec 4, 2018

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.

@m----r
Copy link

m----r commented Dec 5, 2018

Looks like drafts require oauth as well.

@stirdraws
Copy link
Author

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!

@stirdraws
Copy link
Author

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.

@bbolli
Copy link
Owner

bbolli commented Dec 5, 2018

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.

@stirdraws
Copy link
Author

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.

@bbolli
Copy link
Owner

bbolli commented Dec 5, 2018

You can always give it a try!

@stirdraws
Copy link
Author

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!

@cebtenzzre
Copy link
Collaborator

Erm, now we have no issue to track this. It's probably possible to implement. Could someone reopen?

@cebtenzzre cebtenzzre reopened this Dec 14, 2018
@cebtenzzre cebtenzzre changed the title Workaround to save drafts? Feature: Save drafts using OAuth Dec 14, 2018
@ann4belle
Copy link

ann4belle commented Dec 15, 2018

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.

@nyansensei
Copy link

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!

@cebtenzzre cebtenzzre self-assigned this Dec 21, 2018
@cebtenzzre
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants