A Node.js tool to back up OpenProcessing sketches to your local machine. Download code, assets, and metadata for all public sketches in a collection, all sketches by a specific user, or even a specific sketch using its ID.
-
Clone the repository
-
Install dependencies:
npm install
-
Configure the parameters in
config.js
:SEARCH_MODE
: Choose a search mode from:SEARCH_BY_TERM
: Download sketches matching a specific search term.SEARCH_BY_USER_ID
: Download sketches created by a specific user.SEARCH_BY_CURATION_ID
: Download sketches within a specific curated collection.SEARCH_BY_SKETCH_ID
: Download a specific sketch by ID.
SEARCH_TERM
: Specify the search term if usingSEARCH_BY_TERM
. Note: It should be at least 4 characters long.USER_ID
: Specify the user ID if usingSEARCH_BY_USER_ID
.CURATION_ID
: Specify the curation ID if usingSEARCH_BY_CURATION_ID
.SKETCH_ID
: Specify the sketch ID if usingSEARCH_BY_SKETCH_ID
.DOWNLOAD_ASSETS
: Set totrue
to download sketch assets (like images and sounds).SKIP_FORKS
: Set totrue
to skip forks of sketches.VERBOSE
: Set totrue
to enable detailed logging during the process.
-
Run the script:
node main.js
This will:
- List the sketch IDs matching the parameters in
config.js
. - Download each sketch’s metadata, code, and assets.
- Save everything to the
downloads/
folder.
- List the sketch IDs matching the parameters in
You can also pass arguments via command line:
-
Search by Term:
node main.js --term "nature"
This sets
SEARCH_MODE
toSEARCH_BY_TERM
and uses"nature"
as the search term. -
Search by User ID:
node main.js --user 12345
This sets
SEARCH_MODE
toSEARCH_BY_USER_ID
and uses12345
as the user ID. -
Enable Verbose Mode:
node main.js --verbose
This sets
VERBOSE
totrue
. -
Download Assets and Skip Forks:
node main.js --downloadAssets --skipForks
This sets both
DOWNLOAD_ASSETS
andSKIP_FORKS
totrue
.
- Private sketches can not be accessed via the API.
This script is possible thanks to the OpenProcessing API. Thanks to Sinan Ascioglu for creating OpenProcessing and its API.
This project is licensed under the GNU General Public License v2.0 or later.