From b0ce68033dc89651519976e67ee3069ff565f813 Mon Sep 17 00:00:00 2001 From: retardgerman <78982850+retardgerman@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:33:32 +0200 Subject: [PATCH] Update README.md --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d34182..46e67ef 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,16 @@ MKBSD comes in two variants! Node.js and Python. ### Running in Node.js 1. Ensure you have Node.js installed. -2. Run `node mkbsd.js` -3. Wait a little. -4. All wallpapers are now in a newly created `downloads` subfolder. +2. Save the `images.json` file in the same directory as `mkbsd.js`. +3. Run `node mkbsd.js`. +4. Wait a little. +5. All wallpapers are now in a newly created `downloads` subfolder. + +### Changes Made in `mkbsd.js` + +- **Local JSON Source**: The script was updated to read from a local `images.json` file instead of fetching data from a remote URL. This allows you to have full control over the data source. +- **File System Operations**: The script now uses Node.js's `fs` module to read and parse the JSON file directly. +- **Image Download Logic**: The image download logic was adapted to extract the artist's name and image URLs from the local JSON structure, ensuring the images are saved in artist-specific folders. ### Running in Python