Extract the contact information from an Osada profile JSON file and save them to a CSV file that may be imported into Friendica and other platforms.
Go to file
Tobias Diekershoff f998594403 initial commit of the extraction script 2022-11-01 18:18:50 +01:00
LICENSE add author name to LICENSE file 2022-11-01 18:04:16 +01:00
README.md fix export filename in README.md 2022-11-01 18:18:32 +01:00
osada-profile-to-csv.py initial commit of the extraction script 2022-11-01 18:18:50 +01:00

README.md

Osada profile to CSV

This script can be used to extract the contact list from an Osada profile JSON file and save it into CSV. The CSV file can be imported with accounts on Friendica and other platforms that use CSV files.

Why?

A Osada user asked for an import possibility for their contacts into their new Friendica account and this script was the fastest way to do so.

Requirements

Python3 with the JSON module installed (which part of the default installation, so you should be file).

Usage

Export your Osada profile as JSON file and save it on your computer. Save the python script alongside of the profile and open a terminal in that directory. Run python3 and pass the profile filename as second parameter.

python3 ./osada-contacts-to-csv.py profile.json

The contacts will be extracted and saved to a file called profile.csv.

History

  • 2022-11-01: Initial version of the script

License

Copyright (c) 2022, Tobias Diekershoff tobias.diekershoff@gmx.net

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.