{"id":22959728,"url":"https://github.com/antynk/pickart","last_synced_at":"2025-04-02T02:29:17.283Z","repository":{"id":231864928,"uuid":"782897371","full_name":"AntynK/Pickart","owner":"AntynK","description":"This is helper package for game called 'Colouring art'","archived":false,"fork":false,"pushed_at":"2024-04-06T11:15:54.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T17:37:10.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AntynK.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}},"created_at":"2024-04-06T11:00:30.000Z","updated_at":"2024-04-06T11:15:57.000Z","dependencies_parsed_at":"2024-04-06T12:25:46.280Z","dependency_job_id":"b7d17088-94e4-437b-b55e-6d6b8dd16e43","html_url":"https://github.com/AntynK/Pickart","commit_stats":null,"previous_names":["antynk/pickart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntynK%2FPickart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntynK%2FPickart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntynK%2FPickart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntynK%2FPickart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntynK","download_url":"https://codeload.github.com/AntynK/Pickart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743261,"owners_count":20826499,"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":[],"created_at":"2024-12-14T18:28:24.008Z","updated_at":"2025-04-02T02:29:17.257Z","avatar_url":"https://github.com/AntynK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pickart\n#### [Українська версія](README_UA.md)\n\nPickart - this is the file format used by the game called[Colouring art](https://github.com/AntynK/ColouringArt) for storing images.\n\nName 'Pickart' - comes from combination of two words ['pickle'](https://docs.python.org/3.9/library/pickle.html) and 'art'.\n\n## About format\nRoot of .pickart file is Python dict serialized with [pickle](https://docs.python.org/3.9/library/pickle.html) and compressed with [gzip](https://docs.python.org/3.9/library/gzip.html).\n\nFile structure(version 1.0.0):\n``` Python\n{\n    \"info\":{\n        \"size\": (1, 1),\n        \"version\": 1\n    },\n    \"palette\":[(red, green, blue, alpha), ...],\n    \"pixels\": [\n        [(colour_index, is_painted), ...]\n    ]\n}\n```\n\n`\"info\"` - stores image size and Pickart file version.\n\n`\"palette\"` - stores colour palette. Every colour is tuple of integers. Integer value is in range from 0 to 255(including), `alpha` - optional. \n\n`\"pixels\"` - stores matrix which contain tuple with `colour_index`(int) and flag `painted`(bool). \n\n`colour_index` - colour index in palette if this pixel is transparent(`alpha` = 0) index becomes `None`.\n\n`painted` - represents pixel state if false it will appear as a shade of gray otherwise like normal colour. \n\nPackage [pickle](https://docs.python.org/3.9/library/pickle.html) has security issues game does not use standart pickle.load() instead it uses [restricted loader](https://docs.python.org/3/library/pickle.html#restricting-globals) which allows only basic types(int, str, list, dict, tuple, set). If it detects that file contains external types(any object that is imported) it will throw exception `UnpicklingError` with message `There is something strange in the file, do not trust it!`.\n\n\n## Command line interface\nThis package allows convert .png files to .pickart and vise versa.\n\nCommand below shows all arguments:\n\n**Windows:**\n```bash\npython -m pickart -h\n```\n**For Linux and MacOS**\n```bash\npython3 -m pickart -h\n```\n\n### Basic arguments\n`-i \"path\"` - indicates the folder in which the files for conversion are located(by default 'input'). Folder must exist.\n\n`-o \"path\"` - indicates the folder in which converted files will be stored(by default 'output'). May not exist.\n\n`-m \"mode\"` - indicates conversion mode: \n* `to_pickart` - .png files to .pickart files.\n* `to_png` - .pickart files to .png files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantynk%2Fpickart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantynk%2Fpickart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantynk%2Fpickart/lists"}