This small utility interacts with the ForumSpark API and writes forum data to CSV files.
Disclaimer: this script was entirely written by AI. Use at your own risk :)
Use the export-forums script to retrieve a list of forums from a ForumSpark board.
npm run export-forums -- <board.forumspark.net> <API_KEY> [output.csv]The script will create forums.csv in the current directory if no output file is provided.
Values containing commas or quotes are wrapped so the resulting CSV can be imported into spreadsheet tools without issues. Array fields are JSON encoded and any object fields are flattened into additional columns so the data is easier to work with.
If the API returns an unexpected response, the command will display a short snippet of the body to aid debugging. The exporter will also pause and retry when a 429 rate limit response is encountered so you won't exceed the server's allowed request rate.
Use the export-users script to retrieve a list of all users from a board.
npm run export-users -- <board.forumspark.net> <API_KEY> [output.csv]If no output file is specified, the command creates users.csv in the current directory.
Values are quoted the same way as forum exports so they can be imported into spreadsheet tools without issues.
Retrieve all groups from a board with:
npm run export-groups -- <board.forumspark.net> <API_KEY> [output.csv]If no file is given, the command writes groups.csv in the current directory.
To download every topic:
npm run export-topics -- <board.forumspark.net> <API_KEY> [output.csv]topics.csv is created when no output file is specified.
Posts (forum replies) can be exported using:
npm run export-posts -- <board.forumspark.net> <API_KEY> [output.csv]The default output file is posts.csv.
Run all export commands in one go:
npm run export-all -- <board.forumspark.net> <API_KEY>