Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.82 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.82 KB

Geotribu Mastodon auto export

💾 Export Geotribu Mastodon accounts and lists

This project aims to automate the export of Mastodon lists and followed accounts to CSV format, ensuring simplified data retrieval and periodic storage. Generated files are published on GitHub Pages https://geotribu.github.io/geo-mastodon-comptes-listes/.

Mastodon export - File explorer result

There is no real logic code here, only CI/CD (YAML) workflow which is run monthly or manually.
Under the hood, it's just the geotribu cli


How to use it with your Mastodon account

Locally

Note

pipx is a modern tool that make it simpler to install and perform common post-install operations (as registering the CLI in your PATH, etc.)

  1. Install the geotribu CLI:

    pipx install 'geotribu>=0.32'
    # or with pip
    pip install -U 'geotribu>=0.32'
  2. Generate an API key for your Mastodon account https://your_mastodon_insctance/settings/applications/ with the minimal following scopes:

    • read:accounts
    • read:follows
    • read:lists
  3. Store it as environment variable:

    export GEOTRIBU_MASTODON_API_ACCESS_TOKEN=mastodon_api_key
    # on Windows cmd
    set GEOTRIBU_MASTODON_API_ACCESS_TOKEN=mastodon_api_key
    # on Windows PowerShell
    $Env:GEOTRIBU_MASTODON_API_ACCESS_TOKEN = 'mastodon_api_key'
  4. Run it:

    geotribu social mastodon-export -w ./export-mastodon