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

Record timestamp for when posts/comments were saved #22

Open
quarkw opened this issue Jun 27, 2023 · 4 comments
Open

Record timestamp for when posts/comments were saved #22

quarkw opened this issue Jun 27, 2023 · 4 comments
Labels
feature request New feature or request

Comments

@quarkw
Copy link

quarkw commented Jun 27, 2023

The new saved posts/comments works nicely! It might be beneficial to gather the timestamp of when a post/comment was saved, so a user can sort by that, instead of sorting by the creation date of posts/comments

@quarkw quarkw changed the title Timestamp for when posts/comments were saved Record timestamp for when posts/comments were saved Jun 27, 2023
@xavdid
Copy link
Owner

xavdid commented Jun 27, 2023

Oh, do you mean like, when you hit the "save" button on a given comment vs when the comment was made?

I don't remember if that info is included anywhere, but I can check! that would be useful.

@xavdid xavdid added the feature request New feature or request label Jun 27, 2023
@quarkw
Copy link
Author

quarkw commented Jun 27, 2023

Yup, that's what I mean! Peeking at the GDPR archive, it looks like that data is not included.

It may not be possible to get the saved date, but the order of saving should be possible to retrieve from the API, as that's how reddit displays it through the website

@xavdid
Copy link
Owner

xavdid commented Jun 27, 2023

cool! i'll take a look

@xavdid
Copy link
Owner

xavdid commented Jun 28, 2023

So this one is tricky- the tool currently only loads "saved" data from the archive, which (as far as I can tell) is unordered. I go and fetch info about the data, but that doesn't know anything about the user that saved it (since I just look it up by id).

There's a private (unauthenticated) feed that includes all the data and the ordering, but I'd need to add a new command to cover that and I don't know that I'll have time to write and test that this week (before the API changes go into affect saturday). I can get it afterwards, but I don't want to make any promises before we know more about the nature of the changes.

As a stop gap, here's a little script to get the absolute ordering of the data right now and we can get it into the sqlite database at our leisure:

https://gist.github.com/xavdid/f0999e3ea08cc8cdaafce27618e092fd

Download the script, make sure requests is available (pip install requests), and run python saved_ordering.py > ordering.json

I might be able to get the real feature shipped in time, but this should at least preserve your data in case I don't.

Let me know if you need further instructions with the above, too! I'm presuming a bit of Python knowledge.

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

No branches or pull requests

2 participants