7

I'm wondering if it is possible - like for instance Twitter provides - to generate a dump of the content a user has produced on the website?

There are - if I recall correctly - regular dumps of the entire website one can download. But the problem is that it results in more than 20 GiB of content and most users are only interested in a tiny fraction of it: front-end web programmers are probably not interested in hardware programming in C.

It would be nice if there was some kind of dump generator tool where one can decide (for instance, by tags, users, etc.) to generate a dump of the content.

1

1 Answer 1

4

I quickly created this query for you.

It simply does a union over posts, comments and edit posthistory where you're the owner. SEDE does have an export to CSV option so you click that and have a local/offline storage of content you contributed.

select 'Q' [Type]
     , id
     , parentid
     , creationdate
     , body
     , title
     , tags
from posts
where owneruserid = ##userid?67579##
and posttypeid = 1 -- Q
union 
select 'A' [Type]
     , p.id
     , p.parentid
     , p.creationdate
     , p.body
     , q.title
     , q.tags
from posts p
inner join posts q on q.id = coalesce(p.parentid, p.id)
where p.owneruserid = ##userid?67579##
and p.posttypeid = 2 -- A
union
select 'C' [Type]
     , c.id
     , c.postid
     , c.creationdate
     , c.text
     , q.title
     , q.tags
from comments c
inner join posts p on p.id = c.id
inner join posts q on q.id = coalesce(p.parentid, p.id)
where c.userid = ##userid?67579##
union
select 'E' [Type]
     , ph.id
     , ph.postid
     , ph.creationdate
     , case when ph.posthistorytypeid in (5,8) then text else null end
     , case when ph.posthistorytypeid in (4,7) then text else null end
     , case when ph.posthistorytypeid in (6,9) then text else null end
from posthistory ph
inner join posts p on p.id = ph.postid
inner join posts q on q.id = coalesce(p.parentid, p.id)
where ph.userid = ##userid?67579##
and ph.posthistorytypeid in (4,5,6, 7,8,9) -- edits and rollbacks

As indicated by Jon Clements, if you are after ALL your data that you ever submitted to SE, including stuff that is not in SEDE, you can do a GDPR request. As a response you'll receive a file that has all your data in it. Everything. I haven't personally requested that ever so I can't comment on its usability but based on Can a GDPR request take up to a month to process? I learn that:

The GDPR requires that the information you provide to an individual is in a concise, transparent, intelligible and easily accessible form, using clear and plain language.

as quoted by user GhostCat

2
  • For where you're after your own content - it's also possible to make a GDPR request - it can take a little while but it's certainly comprehensive in what you receive from it.
    – Jon Clements Mod
    Commented Dec 13, 2020 at 10:54
  • (my memory is a little rusty but fairly sure it included in addition to Q&A things such as chat messages, flags raised, comments made, login times, your profile history etc... can't seem to find the file I had from April last year to check... but also fairly sure it was across all sites you have an account on as well...)
    – Jon Clements Mod
    Commented Dec 13, 2020 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .