{"id":15722929,"url":"https://github.com/bkbilly/placeholder_service","last_synced_at":"2025-03-31T00:15:47.409Z","repository":{"id":235619511,"uuid":"791026690","full_name":"bkbilly/placeholder_service","owner":"bkbilly","description":"Creates images from text input received through HTTP requests","archived":false,"fork":false,"pushed_at":"2024-04-25T22:05:35.000Z","size":114,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T05:25:21.500Z","etag":null,"topics":["create-image-from-text","hassio-addons","image-processing"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bkbillybk/placeholder_service","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bkbilly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-04-24T00:48:37.000Z","updated_at":"2024-04-26T22:05:24.000Z","dependencies_parsed_at":"2024-04-24T01:54:43.784Z","dependency_job_id":"fcb29041-bd55-4b59-a83f-52114063381f","html_url":"https://github.com/bkbilly/placeholder_service","commit_stats":null,"previous_names":["bkbilly/placeholder_service"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkbilly%2Fplaceholder_service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkbilly%2Fplaceholder_service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkbilly%2Fplaceholder_service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkbilly%2Fplaceholder_service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bkbilly","download_url":"https://codeload.github.com/bkbilly/placeholder_service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246395590,"owners_count":20770243,"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","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":["create-image-from-text","hassio-addons","image-processing"],"created_at":"2024-10-03T22:09:43.042Z","updated_at":"2025-03-31T00:15:47.377Z","avatar_url":"https://github.com/bkbilly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Placeholder Service\nThis is a Python script that creates images from text input received through HTTP requests.\n\n## Features\n - Generates images with user-provided text.\n - Supports various image formats (PNG by default).\n - Allows customization of font, text color, background color, font size, and alignment.\n - Fetches fonts from Google Fonts repository if not found locally.\n\n## Usage\n\n### Server:\n - Save the script as `placeholder_service.py`.\n - Install required libraries:\n```bash\npip install -r requirements.txt\n```\n\nRun the server:\n```bash\npython placeholder_service.py\n```\nThis will start the server on http://localhost:9845 by default.\n\n### Client:\n\nYou can use any tool that can send HTTP requests, such as curl or a web browser. Here's an example using curl:\n\n```bash\ncurl \"http://localhost:9845/?text=YOUR_TEXT\u0026font=FONT_NAME.ttf\u0026color_text=COLOR_CODE\u0026color_bg=COLOR_CODE\u0026font_size=SIZE\u0026font_align=ALIGN\u0026img_format=FORMAT\"\n\n# Replace with your desired options:\n#  - text: The text to be displayed on the image (required)\n#  - font: Path to a font file (optional, defaults to 'FrederickatheGreat-Regular.ttf')\n#  - color_text: Text color in hex code (e.g., 'FF0000' for red, optional, defaults to '1400FF')\n#  - color_bg: Background color name or hex code (optional, defaults to 'white')\n#  - font_size: Font size in pixels (optional, defaults to 200)\n#  - font_align: Horizontal text alignment ('left', 'center', or 'right', optional, defaults to 'center')\n#  - img_format: Image format (e.g., 'png', 'jpg', etc., optional, defaults to 'png')\n```\n\n### Example:\n\n```bash\ncurl \"http://localhost:9845/?text=Hello\\nWorld!\u0026color_text=00FF00\u0026color_bg=0000FF\"\n```\n\nThis will download an image with the text \"Hello\\nWorld!\" in green color and in blue background.\n\n## Configuration\n\n### Font Download:\nBy default, the server tries to download fonts from the Google Fonts repository if the requested font is not found locally.\nThis functionality requires an internet connection.\n\n### Logging:\nThe script uses Python's built-in logging module. You can configure logging behavior by creating a separate logging configuration file.\n\n## Development\nFeel free to modify the script to suit your specific needs. You can add functionalities like:\n - Additional image processing options.\n - User authentication for secure text submission.\n - Support for different text formats (e.g., HTML).\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkbilly%2Fplaceholder_service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkbilly%2Fplaceholder_service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkbilly%2Fplaceholder_service/lists"}