Skip to content
Some scripts relating to Diaspora*
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
requirements
.gitignore
MANIFEST.in
README.md
diaspora-tools.py
setup.py

README.md

PLEASE NOTE that due to an upstream bug the contacts migration is currently broken for any pods running 0.5.x or above code.

diaspora-tools

Some tools relating to the diaspora* social network (https://github.com/diaspora/diaspora).

Currently supported features:

  • Contact migration from pod to pod

Contact migration

Since this is the only supported action, it is also the default at the moment and thus no special command needs to be given.

A "done" user cache file .diaspora-tools-migrate-user-cache will be created in working directory where script is executed. If this file exists, user guids there will not be added to any aspects. User cache file can be ignored by passing in --full as a parameter.

Usage

positional arguments:

optional arguments:

  • -h, --help  show this help message and exit
  • -n          Don't do any changes, just print out
  • --full      Sync all users in all aspects, ignore user cache file
  • --wait      Wait for webfinger lookups to resolve

For example, to migrate contacts from pod A to pod B, waiting for any triggers that happen to other pods (increases script run time), the following command would do the trick:

python diaspora-tools.py --wait jack:password1234@https://pod.example.com jack:password1234@https://pod.foobar.com

You can specify the -n option to just try out the script without actually making any changes.

FAQ

How are contacts added?

Each aspect is read from the source pod and these contacts will be added (if they can be found!) to the same aspect on the target pod. If that aspect is missing, the aspect is created.

Are any changes made on the source pod?

No, none at all. Though I take no responsibility for any loss of data :P

Will contacts be notified that my sourcepod acccount has added them?

Yes, in the same way as if added via the Diaspora* web interface.

Requirements

  • Python 2.7. Possibly works with Python 3.x but I have not tested it.

Required Python modules:

For Python 2.x SNI SSL support;

  • ndg-httpsclient
  • pyOpenSSL
  • pyasn1

All requirements can be installed using pip:

pip install -r requirements/requirements.txt

Installing

Currently only source tarball is available. Download it from the releases and extract to your location of choice.

Install requirements (see above).

No need to (and no benefit in) install diaspora-tools, just run it from the folder it is extracted to.

Credits

Written by Jason Robinson (email: mail@jasonrobinson.me, diaspora* profile).

See other authors from GitHub.

Thanks Moritz Kiefer and Marek Marecki for the awesome diaspy module.

License

Licensed under the MIT license. No responsibility taken by author about anything this script does or doesn't do :)

You can’t perform that action at this time.