{"id":18938353,"url":"https://github.com/jkmathew/assetizer","last_synced_at":"2025-04-15T19:30:25.736Z","repository":{"id":63913021,"uuid":"125859324","full_name":"jkmathew/Assetizer","owner":"jkmathew","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-04T04:38:10.000Z","size":41,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-11T10:26:42.734Z","etag":null,"topics":["assetcatalog","assets","icons","iconset","imageset","mint","spm","xcassets"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/jkmathew.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}},"created_at":"2018-03-19T13:09:23.000Z","updated_at":"2024-09-11T08:20:05.000Z","dependencies_parsed_at":"2023-01-14T13:15:43.500Z","dependency_job_id":null,"html_url":"https://github.com/jkmathew/Assetizer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmathew%2FAssetizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmathew%2FAssetizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmathew%2FAssetizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmathew%2FAssetizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkmathew","download_url":"https://codeload.github.com/jkmathew/Assetizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249138506,"owners_count":21218899,"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":["assetcatalog","assets","icons","iconset","imageset","mint","spm","xcassets"],"created_at":"2024-11-08T12:14:09.822Z","updated_at":"2025-04-15T19:30:25.462Z","avatar_url":"https://github.com/jkmathew.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assetizer\n\nAdding images to iOS/macOS project is not straight forward. You should add `1x` and/or ` 2x`  and/or ` 3x`  based on the screen size/ device. Your designer may give you the required  `1x`, ` 2x`, ` 3x` files. But what to do if they provide only one size or you downloading it from [here](https://materialdesignicons.com). You should resize it with preview and rename, then add to assetcatalog. If you are continuosly adding/ changing images (especially during initial development stage), doing all these repeated tasks may become boring. `Assetizer` will help you to do this tasks with a single line command.\n\n## Installation\n\n### From Source\n```shell\n$ git clone https://github.com/jkmathew/Assetizer.git\n$ cd Assetizer\n$ make\n```\n\n### With [Mint](https://github.com/yonaskolb/mint)\n```shell\n$ mint install jkmathew/Assetizer assetize\n```\n\n### With SPM\n\nAdd following line to your `Package.swift` file.\n```\ndependencies: [\n...,\n.package(url: \"https://github.com/jkmathew/Assetizer.git\", .upToNextMajor(from: \"0.1.0\"))\n]\n```\n## Usage\n### From terminal\n```shell\n$ assetize image.png --size 30x30\n```\nThis will create `image.imageset`, which can  be directly used with your `images.xcassets`.\n\nAdditionaly you can pass following options\n`--output`  - Output path, where you want to create the imageset.\n  If you are working on a project continuously, you can set default output directory by entering,\n```shell\n$ defaults write me.jkmathew.assetizer outputPath /path/to/images.xcassets\n```\n  if `--output` option not passed and no default directory set, will create imageset in the input directory.\n  \n  `--device` - Target device family.  Accepted values - [`universal`, `iphone`, `ipad`, `watch`, `tv`, `mac`]\n\n### Swift code\nImport package `Assetizer` . Now you can use `AssetWriter` class like.\n```\nlet writer = try AssetWriter(imagePath: \"/path/to/input.png\", size: CGSize(width: 30, height: 30))// you can pass CGSize.zero to take size from input.png\ntry writer.createAssets()\n```\n\n### TODO\n- [x] Distribute as a package to use in SPM projects.\n- [x] Accept different device idioms.\n- [ ] Create app icons.\n- [x] Specify o/p path.\n- [ ] Ditribute through home brew.\n- [ ] Support for linux.\n\n### Author\nJohnykutty - johnykutty.mathew@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkmathew%2Fassetizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkmathew%2Fassetizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkmathew%2Fassetizer/lists"}