You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|Óscar M. Lage 5b95e580a2||8 months ago|
|content||9 months ago|
|models||9 months ago|
|.env.sample||9 months ago|
|.gitignore||9 months ago|
|CONTRIBUTING.md||9 months ago|
|README.md||8 months ago|
|go.mod||9 months ago|
|go.sum||9 months ago|
|main.go||9 months ago|
A simple script to start playing with mastodon importing toots. It's just a startpoint because it's not fully usable yet.
It uses a
sample.json file as input (you can get this file in your mastodon instance server, under preferences + export information).
As said, it's not fully usable yet, it's a WIP (for now it's not looping over all the json data, it just creates a hello world toot in the account with id=1), but it could be a good startpoint if you need a tool like this.
- Get your
sample.jsonfrom your mastodon instance server.
- Import and Export
- Request your data
- Extract the zip and get the
- Modify the code to match the path of your
- Create a
.envfile with your postgresql credentials from the
.env.samplefile in the repo.
- Run and/or compile this script:
go build. Take in account where you will run the binary. I mean I've developed it under macos darwin but I wanted to run it on my mastodon instance machine, so I compiled it with some flags in order to get it running:
GOOS=linux GOARCH=amd64 go build.
- Move the binary and the
outbox.jsonto the server (ensure path matches) and profit.
- UnmarshalJSON stuff
- Something similar but in JS
- How to migrate from one Mastodon server to another one
Feel free to modify the script in order to fill your needs. Of course, mentions and patches (PRs, etc...) are more than welcome!