Update README.md

This commit is contained in:
retardgerman 2024-10-09 11:33:32 +02:00 committed by GitHub
parent 9d64df8423
commit b0ce68033d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,9 +18,16 @@ MKBSD comes in two variants! Node.js and Python.
### Running in Node.js ### Running in Node.js
1. Ensure you have Node.js installed. 1. Ensure you have Node.js installed.
2. Run `node mkbsd.js` 2. Save the `images.json` file in the same directory as `mkbsd.js`.
3. Wait a little. 3. Run `node mkbsd.js`.
4. All wallpapers are now in a newly created `downloads` subfolder. 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 ### Running in Python