{"id":29671467,"url":"https://github.com/smartlegionlab/babylonian-image-library","last_synced_at":"2025-07-22T20:09:00.484Z","repository":{"id":283784078,"uuid":"952929231","full_name":"smartlegionlab/babylonian-image-library","owner":"smartlegionlab","description":"A Python library that generates unique images based on a given seed or address. It also provides functionality to generate random addresses, which can be used to create random images.","archived":false,"fork":false,"pushed_at":"2025-06-12T23:33:49.000Z","size":6101,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-13T23:02:42.675Z","etag":null,"topics":["babilonian-library","babylon","python-library","smartlegionlab"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartlegionlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-22T07:02:11.000Z","updated_at":"2025-06-12T23:33:53.000Z","dependencies_parsed_at":"2025-03-22T07:15:33.503Z","dependency_job_id":"e7e1d017-ef30-4798-9ab8-af5dc2a2443b","html_url":"https://github.com/smartlegionlab/babylonian-image-library","commit_stats":null,"previous_names":["smartlegionlab/babylonian_image_library","smartlegionlab/babylonian-image-library"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/smartlegionlab/babylonian-image-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fbabylonian-image-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fbabylonian-image-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fbabylonian-image-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fbabylonian-image-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartlegionlab","download_url":"https://codeload.github.com/smartlegionlab/babylonian-image-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fbabylonian-image-library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babilonian-library","babylon","python-library","smartlegionlab"],"created_at":"2025-07-22T20:08:59.657Z","updated_at":"2025-07-22T20:09:00.471Z","avatar_url":"https://github.com/smartlegionlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Babylonian Image Library \u003csup\u003ev0.1.3\u003c/sup\u003e\n\n***\n\n[![PyPI Downloads](https://static.pepy.tech/badge/babylonian-image-library)](https://pepy.tech/projects/babylonian-image-library)\n![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/babylonian-image-library)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/babylonian-image-library)](https://github.com/smartlegionlab/babylonian-image-library/)\n[![GitHub](https://img.shields.io/github/license/smartlegionlab/babylonian-image-library)](https://github.com/smartlegionlab/babylonian-image-library/blob/master/LICENSE)\n[![GitHub Repo stars](https://img.shields.io/github/stars/smartlegionlab/babylonian-image-library?style=social)](https://github.com/smartlegionlab/babylonian-image-library/)\n[![GitHub watchers](https://img.shields.io/github/watchers/smartlegionlab/babylonian-image-library?style=social)](https://github.com/smartlegionlab/babylonian-image-library/)\n[![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/babylonian-image-library?style=social)](https://github.com/smartlegionlab/babylonian-image-library/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/babylonian-image-library?label=pypi%20downloads)](https://pypi.org/project/babylonian-image-library/)\n[![PyPI](https://img.shields.io/pypi/v/babylonian-image-library)](https://pypi.org/project/babylonian-image-library)\n[![PyPI - Format](https://img.shields.io/pypi/format/babylonian-image-library)](https://pypi.org/project/babylonian-image-library)\n\n***\n\nAuthor and developer: ___A.A. Suvorov___\n\n---\n\n# Babylonian Image Library\n\nThe **Babylonian Image Library** is a Python library that generates unique images based on a given seed or address. \nThe library uses SHA-256 hashing to create deterministic yet visually unique images. \nIt also provides functionality to generate random addresses, which can be used to create random images.\n\n## Features\n\n- **Deterministic Image Generation**: Generate images based on a seed or address using SHA-256 hashing.\n- **Random Address Generation**: Create random addresses in the format `RoomX:WallY:ShelfZ:VolumeA:BookB:PageC`.\n- **Image Saving**: Save generated images to a file in PNG format.\n- **Customizable Image Size**: Set custom width and height for the generated images.\n\n## Installation\n\nTo use the Babylon Image Library, ensure you have the following dependencies installed:\n\n- Python 3.x\n- `Pillow` (PIL fork) for image manipulation.\n\n```bash\npip install babylonian-image-library\n```\n\n## Usage\n\n### Basic Example\n\n```python\nfrom babylonian_image_library import BabylonianImageLibrary\n\n# Create an instance of the library\nlibrary = BabylonianImageLibrary(width=800, height=600)\n\n# Generate a random address\nrandom_address = library.generate_random_address()\nprint(f\"Random address: {random_address}\")\n\n# Save the generated image to a file\nlibrary.save_image(random_address, \"random_image.png\")\nprint(\"The image has been saved to 'random_image.png'\")\n```\n\n### Custom Seed\n\nYou can also generate an image using a custom seed:\n\n```python\n# Generate an image using a custom seed\nfrom babylonian_image_library import BabylonianImageLibrary\n\n# Create an instance of the library\nlibrary = BabylonianImageLibrary()\ncustom_seed = \"MyCustomSeed123\"\nlibrary.save_image(custom_seed, \"custom_image.png\")\nprint(\"The image has been saved to 'custom_image.png'\")\n```\n\n### Image Generation Process\n\nThe image generation process works as follows:\n\n1. The input seed (or address) is hashed using SHA-256.\n2. The hash is used to generate RGB pixel values for the image.\n3. If the hash is exhausted, it is rehashed to continue generating pixel values.\n4. The resulting image is saved to a file.\n\n### Random Address Format\n\nThe random address is generated in the following format:\n\n```\nRoomX:WallY:ShelfZ:VolumeA:BookB:PageC\n```\n\nWhere:\n- `X` is a random integer between 1 and 100.\n- `Y` is a random integer between 1 and 6.\n- `Z` is a random integer between 1 and 10.\n- `A` is a random integer between 1 and 10.\n- `B` is a random integer between 1 and 100.\n- `C` is a random integer between 1 and 1000.\n\n## API Reference\n\n### `BabylonianImageLibrary(width=1920, height=1080)`\n\n- **width**: The width of the generated image (default: 1920).\n- **height**: The height of the generated image (default: 1080).\n\n### Methods\n\n- **`generate_image(seed)`**: Generates an image based on the provided seed.\n- **`get_image(address)`**: Returns an image generated from the given address.\n- **`save_image(address, filename=\"output.png\")`**: Saves the generated image to a file.\n- **`generate_random_address()`**: Generates a random address in the specified format.\n\n## Example Output\n\nRunning the script will generate a random address and save the corresponding image to a file:\n\n```\nRandom address: Room42:Wall3:Shelf7:Volume5:Book23:Page456\nThe image has been saved to 'random_image.png'\n\n```\n\n***\n\n## Information for developers:\n\n- `pip install setuptools twine wheel`\n- `pip install build`\n- `pip install --upgrade pip`\n- `python -m build`\n- `twine upload dist/*`\n\n***\n\n## Disclaimer of liability:\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n***\n\n## Copyright:\n    --------------------------------------------------------\n    Licensed under the terms of the BSD 3-Clause License\n    (see LICENSE for details).\n    Copyright © 2018-2025, A.A. Suvorov\n    All rights reserved.\n    --------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlegionlab%2Fbabylonian-image-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartlegionlab%2Fbabylonian-image-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlegionlab%2Fbabylonian-image-library/lists"}