Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor image download logic to group images by artist name. fixes #55 #57

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ 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 and mkbsd.py`

- **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

1. Ensure you have Python installed.
2. Ensure you have the `aiohttp` Python package installed (`pip install aiohttp`).
3. Run `python mkbsd.py`
2. Save the `images.json` file in the same directory as `mkbsd.py`.
3. Run `python mkbsd.py`.
4. Wait a little.
5. All wallpapers are now in a newly created `downloads` subfolder.

Expand Down
Loading