{"id":16764469,"url":"https://github.com/kamilturek/go-zpl","last_synced_at":"2025-04-10T18:21:35.153Z","repository":{"id":58001695,"uuid":"525076378","full_name":"kamilturek/go-zpl","owner":"kamilturek","description":"A CLI tool \u0026 Go package for conversion of ZPL files.","archived":false,"fork":false,"pushed_at":"2022-08-27T12:50:25.000Z","size":35,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T16:01:39.839Z","etag":null,"topics":["cli","converter","go","golang","labelary","zpl","zpl-programming-language"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kamilturek.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}},"created_at":"2022-08-15T17:24:33.000Z","updated_at":"2024-07-28T01:07:28.000Z","dependencies_parsed_at":"2022-09-02T14:43:59.710Z","dependency_job_id":null,"html_url":"https://github.com/kamilturek/go-zpl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilturek%2Fgo-zpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilturek%2Fgo-zpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilturek%2Fgo-zpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilturek%2Fgo-zpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamilturek","download_url":"https://codeload.github.com/kamilturek/go-zpl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248270508,"owners_count":21075794,"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":["cli","converter","go","golang","labelary","zpl","zpl-programming-language"],"created_at":"2024-10-13T05:26:06.089Z","updated_at":"2025-04-10T18:21:35.131Z","avatar_url":"https://github.com/kamilturek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-zpl\n\nA CLI tool \u0026 Go package for conversion of ZPL files.\nA wrapper around [Labelary ZPL Web Service](http://labelary.com/service.html).\n\n## Installation\n\n### CLI Tool\n\nUsing Go:\n\n```bash\ngo install github.com/kamilturek/go-zpl/cmd/go-zpl@latest\n```\n\nUsing Homebrew:\n\n```bash\nbrew install kamilturek/tap/go-zpl\n```\n\n### Go package\n\n```bash\ngo get github.com/kamilturek/go-zpl\n```\n\n## Usage\n\n### CLI Tool\n\n`go-zpl` provides a help message describing all available options along with\ntheir default values.\n\n```bash\n$ go-zpl --help              \nUsage of go-zpl:\n  -d int\n        input label density [dpmm] (default 8)\n  -f string\n        output file format (default \"png\")\n  -h int\n        input label height [inch] (default 6)\n  -o string\n        output file path\n  -v    version for go-zpl\n  -version\n        version for go-zpl\n  -w int\n        input label width [inch] (default 4)\n```\n\nBy default, `go-zpl` reads ZPL data from the standard input and writes result\nto the standard output.\n\n```bash\n$ cat hello.zpl | go-zpl -f pdf | head -n 1\n%PDF-1.4\n```\n\nIt is possible to read ZPL data from a file and write the result to another one.\n\n```bash\n$ go-zpl -f pdf -o hello.pdf hello.zpl\n$ head -n 1 hello.pdf                   \n%PDF-1.4\n```\n\n### Go package\n\n```go\npackage main\n\nimport \"github.com/kamilturek/go-zpl\"\n\nfunc main() {\n      // Using convenience wrapper\n      zpl.ToPNG(\n            []byte(\"^xa^cfa,50^fo100,100^fdHello World^fs^xz\"),\n            // Optional extra configuration\n            zpl.WithWidth(4),\n            zpl.WithHeight(6),\n            zpl.WithDensity(8),\n      )\n\n      // Or configuring the converter from scratch\n      f, _ := os.Open(\"hello.zpl\")\n      zpl.Convert(\n            zpl.WithInput(f),\n            zpl.WithOutput(os.Stdout),\n            zpl.WithOutputFormat(zpl.PNG),\n            zpl.WithDensity(12),\n      )\n}\n```\n\n## License\n\nSee [LICENSE](LICENSE.md).\n\n## Contributing\n\nPlease create a GitHub issue for any feedback, bugs, requests or issues.\nPRs are also welcome.\n\n### Running tests\n\n- General tests\n\n    ```bash\n    go test\n    ```\n\n- Integration tests\n\n    ```bash\n    go test -tags=integration\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilturek%2Fgo-zpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamilturek%2Fgo-zpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilturek%2Fgo-zpl/lists"}