What can I currently do with my account export json file?


(Guido Arnold) #1

Is there somewhere written what can currently be done with the json export file of one’s profile and how?

I found a line of bash code how to extract contacts in the Tools section, but as this refers to an xml file I guess this is not up-to-date anymore?

Getting a list of my contacts would be useful, finding old posts of mine and determine when I posted them could also save some time.

Thanks!


(goob) #2

At the moment, no; it acts like a kind of back-up, but there is not yet any way of importing it to another pod if yours crashes. Account import is being worked on here, and eventually it will be possible to move your account data from one pod to another whenever you wish to.

That does look (very) out of date. I’d better leave it to someone more tech-savvy that I am to remove it, though, just in case I’m mistaken.

Contacts and posts are both included in the json file. It’s raw json so isn’t formatted for readability, but you can certainly do a text search for part of a contact’s ID or text from a post of yours to find it. Export your data, open it in a text editor and give it a try.


(Guido Arnold) #3

Thanks for the update @goob!

I knew it was being worked on but was wondering if there are already some useful scripts in place like the outdated one-liner I quoted above.

Mine was just one line of text which I found not too readable, but adding a newline after each comma helped :slight_smile:


(goob) #4

Some text editors have a word-wrap function, which is what I used. Anyway, glad I could help.


(Benjamin Neff) #5

I updated the wiki, you can use jq to parse the new json export and get a list of your contacts:

zcat username_diaspora_data_random.json.gz | jq '.user.contacts[] | select(.followed).account_id' -r

(replace username_diaspora_data_random.json.gz with your downloaded archive)


(Deus Figendi) #6

I worked a little on this data last weeks and here are some ideas one (e.g. me) could do with this:

  • A list of pods you are connected to via contacts (so… the pods your public posts will arrive w/o reshare)
  • A list of pods you are connected to “somehow” (so the pod of everyone ever participated in your content)
  • A list or ranking of the most active participiants of your content (your biggest fans)
  • A list or ranking of accounts you were participating a lot (so… who’s YOUR favorite?)
  • A list of all hashtags you’re following
  • A list of all aspects
  • Statistics about your contacts and aspects like
  • In how many aspects is an average contact?
  • How many contacts does an average aspect has?
  • To how many contacts is the conection in one direction or in both (so… are your following/sharing a lot, are you “subscribed” a lot or is it most friendship-style both directions?)
  • Statistics about your own posts:
  • how many have pictures?
  • how long are they?
  • more public or more limited*
  • more own content or more reshares?
  • statistics based on time/date (most post on tuesdays? in the evening?)

Oh… I went out of time, maybe a few more sentences later.


(Mouarfff) #7

Hello,

I’m not developper but i need to keep my postes on usable format.
Is there any simple way to do this ?
Is it possible to export to a html file, or another human readable support ?
IS it possible to export posts to wordpress or another blog, or to mastodon/fediverse ?

thanks for response


(Deus Figendi) #8

I could write a script that extracts every of your postings as a markdown- or html-file from the export-json.


(Mouarfff) #9

Hoo yes it could be a very good idea :slight_smile:
I think (i hope it’s not so much difficult) the problem is it’s need an easy way to acces to your future script, for example directly in diaspora ?
It’s important to have facility to acces at this feature, because many people don’t know technicals consideration and they can be quickely limited

I will be unhappy if your future work will not be visible and used by poeople !


(Deus Figendi) #10

I wrote something yesterday and it does what it should, it extracts all your own posts (no reshares e.g.) from the export-file and saves them so single markdown-files (those could be converted to html with markdown for example).
That python-script needs a little finishing (like… not to have to edit the source code to change the export-file) so it might take a day or three.

unlikely. The idea is you download your export file and extract it, then run that python3 script.

I’m not sure at all what that sentence means, but running a python script is pretty trivial on a linux/unix machine and pretty possible on other operating systems. A non-techy person would need some guidance, but it’s still no magic to type python3 extractdiasporapostings.py username_diaspora_data_sdifg23897whvf523897g98f21sdhfgui.json I’d say.

Sure I (or someone else) could write a web-interface or similar where you can upload your export file but it contains your private key so… maybe that’s no good idea. A GUI might be a good idea, but I didn’t such for a long time, I have no idea how one does this today.


(Mouarfff) #11

unlikely. The idea is you download your export file and extract it, then run that python3 script.

if disapora provide a way to export by a json file, it’s possible to export only posts in another readable and/or exportable format ?

I’m not sure at all what that sentence means, but running a python script is pretty trivial on a linux/unix
not for end user i know around me :slight_smile:

I’m happi to have a way for me to export datas easily, but i think about global diaspora for most users …

And about the private key, if a code is implemented in diaspora, we just have to dont put key file into the export …

We can have multiple way to export… for most user, they prefere export articles and post, and don’t really care of the key … it’is usefull for dev or for export to another pod …

i d’ont understand why the json provide it :slight_smile:

A friend coded something but unfortunatly, he don’t speak english and will don’t be able to contribute in community …

I can give his code but it will be better if it was a real choice of diaspora community to integrate or do something like…

(the php script export data of post into a readable html page)