Giter Site home page Giter Site logo

slurp's Introduction

slurp

A tool for exporting data from and importing data to Fediverse instances. Requires that they support the Mastodon API as implemented By GotoSocial. Intended for use with GotoSocial, but should work with other Mastodon-like instances, including Mastodon.

what

slurp has commands for importing and exporting these API objects, in CSV formats compatible with the Mastodon import/export GUI where possible:

  • blocks
  • bookmarks
  • filters (note that Mastodon can't import or export filters yet, so the current format is slurp-specific)
  • follows
  • lists

build

go mod download
go build .

run

Show help for all commands.

./slurp help

Before running other commands, log in.

You'll be asked to log into your instance in your web browser, and paste the provided authorization code into the prompt. This will save your access token in the system keychain, and that user as the default user in slurp's preferences.

./slurp --user [email protected] auth login

Load follows from a previous instance. This will use your stored access token and default user.

./slurp follows import --file following_accounts.csv

Save follows from this instance.

./slurp follows export --file follows_backup.csv

slurp respects these environment variables:

  • HTTPS_PROXY: if you're using an HTTPS proxy for debugging, pass the URL to it here; for example, http://localhost:9090 for Proxyman's default configuration. (HTTPS_PROXY is common across most Go apps and not specific to slurp.)

slurp stores its preferences in ~/Library/Application Support/codes.catgirl.slurp/prefs.json or the equivalent for your OS (usually ~/.config/codes.catgirl.slurp/prefs.json on Linux), respecting XDG environment variables and their equivalents.

update Swagger client

Do this when the GotoSocial API changes. This will use the Swagger spec on GotoSocial's main branch.

go get github.com/go-swagger/go-swagger/cmd/swagger
rm -rf client models
go generate ./...

# apply workaround for https://github.com/go-swagger/go-swagger/issues/2997
patch -u -p1 -i fcontext.diff

You can also use go-swagger directly instead of through go generate, which you'll want to do if using a different branch or tag, or a local copy of the GotoSocial codebase. In the latter case, don't forget to update your copy's swagger.yaml first.

go run github.com/go-swagger/go-swagger/cmd/swagger generate client --spec /path/to/gotosocial/docs/api/swagger.yaml

slurp's People

Contributors

vyrcossont avatar

Stargazers

Lunaphied avatar  avatar Qyriad avatar Tomasz Frątczak avatar Chee Aun avatar CDN avatar  avatar Phil Chu avatar

Watchers

 avatar  avatar

slurp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.