A simple script that uses the Scratch Analyzer (https://github.com/llk/scratch-analysis) to read local project JSONs and output values to a CSV. Could be used in conjunction with Scratch Studio Scrape (https://github.com/GSE-CCL/scratch-studio-scrape)!
Developed for the Creative Computing Lab at the Harvard Graduate School of Education.
- Make sure you've installed Node.js and npm.
- Navigate the terminal to the downloaded repository.
- Run
npm install scratch-analysis
andnpm install sync-request
. - You should be all set!
- In your repository, create a folder entitled
json_data
, this will store all your Scratch JSON files. - Inside
json_data
, create a folder entitledstudios
. This folder will contain plaintext files, wherestudio1_project_ids.txt
contains the Project IDs for Studio 1,studio2_project_ids.txt
contains the Project IDs for Studio 2, etc. Naming convention is very important! An example ofstudio1_project_ids.txt
is as follows:
335749989
345129786
357222518
(no commas, each new line indicates another project)
- Within
json_data
, there should be corresponding folders to each of your studios, i.e. if you havestudio1_project_ids.txt
instudios
, there should be another folder withinjson_data
entitledstudio1_projects
, which contains JSON files of studio 1 projects (this can be downloaded through Scratch Studio Scrape). - Nice! All set, and ready to move on to using Scratch CSV!
- Navigate the terminal to the downloaded repository.
- Run
node scratch-analysis.js
. This command will access all of your studios and their corresponding JSON projects. - Find your results in an outputted CSV file in your directory. Woohoo!
https://github.com/llk/scratch-analysis for Scratch Analysis
https://github.com/GSE-CCL/scratch-studio-scrape for Scratch Studio Scrape
https://api.scratch.mit.edu/studios/{ID}/projects to get a list of all the projects, with IDs and descriptions
https://projects.scratch.mit.edu/{ID} to download project JSON