{"id":24617709,"url":"https://github.com/jacoblincool/piconvert","last_synced_at":"2025-05-07T05:24:51.995Z","repository":{"id":43197869,"uuid":"453784114","full_name":"JacobLinCool/piconvert","owner":"JacobLinCool","description":"Convert pictures to other formats. GitHub Actions supported. ","archived":false,"fork":false,"pushed_at":"2025-05-05T21:26:52.000Z","size":252,"stargazers_count":8,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T22:35:00.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/piconvert","language":"TypeScript","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/JacobLinCool.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":"2022-01-30T19:46:31.000Z","updated_at":"2025-01-21T02:16:35.000Z","dependencies_parsed_at":"2023-11-29T16:52:22.899Z","dependency_job_id":"25b6cdf2-29a0-487b-b81b-f1d70d8d843b","html_url":"https://github.com/JacobLinCool/piconvert","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.05555555555555558,"last_synced_commit":"e6305f906512ef8d3afc1bc2fc97ffdabd3786d9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fpiconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fpiconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fpiconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fpiconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/piconvert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819638,"owners_count":21809057,"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":"2025-01-24T23:40:05.457Z","updated_at":"2025-05-07T05:24:51.967Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# piconvert\n\nConvert pictures to other formats. GitHub Actions, CLI Tool, and Node Package.\n\n## Features\n\n- Import (input) formats: `ai`, `cdr`, `vsd`, `pdf`, `jpg`, `png`, `gif`, and `bmp`\n- Export (output) formats: `svg`, `png`, `ps`, `eps`, `pdf`, `emf`, `wmf`, and `xaml`.\n\n## Usage\n\n### GitHub Actions\n\n```yaml\n- name: Piconvert\n  uses: JacobLinCool/piconvert@0.4.2\n    with:\n      src: ./pictures\n      dist: ./piconvert\n      inputs: ai\n      outputs: svg,png\n      force: false\n      verbose: false\n```\n\nSee [action.yml](./action.yml) for more details.\n\n### CLI Tool\n\n```bash\nnpm install -g piconvert\n```\n\n```\nUsage: piconvert [options] [path]\n\nArguments:\n  path                     Source path. If it's a directory, all files matched selected import types in it and its subdirectories will be converted. (default: \"pictures\")\n\nOptions:\n  -V, --version            output the version number\n  -d, --dir \u003cdirectory\u003e    Output directory (default: \"piconvert\")\n  -i, --inputs \u003cformats\u003e   Import (input) formats. Supports: ai,cdr,vsd,pdf,jpg,jpeg,png,gif,bmp (default: \"ai\")\n  -o, --outputs \u003cformats\u003e  Export (output) formats. Supports: svg,png,ps,eps,pdf,emf,wmf,xaml (default: \"svg,png\")\n  -f, --force              Overwrite existing files (default: false)\n  -s, --silent             Silent mode, no output (default: false)\n  -v, --verbose            Verbose mode, print all Inkscape output (default: false)\n  -h, --help               display help for command\n\nCommands:\n  install [options]\n```\n\n![CLI Demo](images/piconvert-demo.png)\n\n### Library\n\n```bash\nnpm install piconvert\n# or: yarn add piconvert\n# or: pnpm install piconvert\n```\n\n```javascript\nconst { Converter } = require(\"piconvert\");\n// or using ESM \"import\":\n// import { Converter } from \"piconvert\";\n\nconst converter = new Converter()\n  .import(\"ai\")\n  .export(\"svg\")\n  .export(\"png\", [128, 256, \"256x128\", \"x512\"]);\n\nconverter.run(\"./src\", \"./dest\");\n```\n\n## Config File\n\nThere are two types of config files: folder-level and file-level.\n\n### Folder-level Config File\n\nThe folder-level config file is a YAML file named `piconvert.yml`, `piconvert.yaml`, `.piconvert.yml`, or `.piconvert.yaml`.\n\nThe configurations in this file will be applied to all files in the folder.\n\n### File-level Config File\n\nThe file-level config file is a YAML file named with the same name as the source file, for `picture_123.ai`, it should be named `picture_123.yml` or `picture_123.yaml`.\n\n### Config File Structure\n\nThe config file structure is as follows:\n\n```yaml\nsvg:\npng:\n  - 128\n  - \"256x128\"\n  - \"x512\"\npdf:\n```\n\nAll the keys in the config file are supported export formats with an optional value of sizes.\n\n### Priority\n\nThe priority of config files is as follows:\n\n1. File-level config file\n2. Folder-level config file\n3. Parent folder-level config file (if exists)\n4. Default configs\n\n## Requirement\n\nIf you are using GitHub Actions, then you don't need to install any dependencies.\n\nBut if you are using the cli tool on your computer, make sure you have installed `inkscape` first.\n\n(You can use `piconvert install` to install `inkscape`. On linux, it uses `apt`. On macOS, it uses `brew`. On Windows, it uses `choco`.)\n\n## Links\n\n- [GitHub Actions](https://github.com/marketplace/actions/piconvert)\n- [Repository](https://github.com/JacobLinCool/piconvert)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fpiconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Fpiconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fpiconvert/lists"}