hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
722 stars 215 forks source link

Export all my statuses #653

Closed carols10cents closed 12 years ago

carols10cents commented 12 years ago

Provide a way for someone to download all their statuses for archival purposes.

carols10cents commented 12 years ago

I swear we had an issue for this but I couldn't find it, so this might be a dupe.

I'm not sure what format this should be in, maybe csv? like:

datetime, status text
datetime, status text
... etc ...

But i'm up for other formats (html?), would lean towards useful for non-technical people (aka not XML), and I'm up for releasing something and then getting feedback on it rather than bikeshedding too much up front.

colindean commented 12 years ago

I think HTML would be valuable as an export format for non-technical people. It can be parsed easily, and, with a little style applied, could be suitable for a standalone document not requiring reading a wall of text in CSV format or a human-readable but not really meant for human consumption format like JSON.

For ease of implementation, however... is offering JSON little more than a .to_json away? I would assume that offering CSV would be similarly easy, perhaps requiring a few more lines of code.

If offering JSON export is the path of least resistance/code, I say do it first so that an export ability exists. If people want more than that, it can be added later.

tlatsas commented 12 years ago

Hi, I created a first version of this that exports in JSON format. Commit: 0d84221270da3d557b9df4c4cc1ff6fd19e130bb, any thoughts? One problem is that I could not find a way to test the returned json file with minitest.

carols10cents commented 12 years ago

Hi @tlatsas, thank you for working on this! I left a few comments on that commit-- what happens when you try and click that link in the tests? I'm not really sure what's not working or how to make it work either, but we can figure it out together!! :)

tlatsas commented 12 years ago

Hi @carols10cents , I finally got minitest to test the Content-Type and Content-Disposition values in the response headers. So I should make a proper PR now. Do you think we should also check the actual contents of the downloaded file with minitest?