{"id":19957546,"url":"https://github.com/pmqs/archive-simplezip","last_synced_at":"2025-05-03T21:30:33.031Z","repository":{"id":53911516,"uuid":"49793592","full_name":"pmqs/Archive-SimpleZip","owner":"pmqs","description":"Raku Module to Write Zip files ","archived":false,"fork":false,"pushed_at":"2023-09-16T19:16:57.000Z","size":20394,"stargazers_count":1,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T21:12:47.379Z","etag":null,"topics":["bzip2","compression","deflate","perl6","perl6-module","raku","raku-module","zip","zipfile"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmqs.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2016-01-16T22:28:44.000Z","updated_at":"2023-06-02T13:34:13.000Z","dependencies_parsed_at":"2022-08-13T04:01:17.811Z","dependency_job_id":null,"html_url":"https://github.com/pmqs/Archive-SimpleZip","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmqs%2FArchive-SimpleZip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmqs%2FArchive-SimpleZip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmqs%2FArchive-SimpleZip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmqs%2FArchive-SimpleZip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmqs","download_url":"https://codeload.github.com/pmqs/Archive-SimpleZip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252259297,"owners_count":21719658,"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":["bzip2","compression","deflate","perl6","perl6-module","raku","raku-module","zip","zipfile"],"created_at":"2024-11-13T01:38:13.494Z","updated_at":"2025-05-03T21:30:32.639Z","avatar_url":"https://github.com/pmqs.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archive::SimpleZip\n\nRaku (Perl6) module to write Zip archives.\n\n![Linux Build](https://github.com/pmqs/Archive-SimpleZip/actions/workflows/linux.yml/badge.svg)\n![MacOS Build](https://github.com/pmqs/Archive-SimpleZip/actions/workflows/macos.yml/badge.svg)\n![Windows Build](https://github.com/pmqs/Archive-SimpleZip/actions/workflows/windows.yml/badge.svg)\n\n## Synopsis\n\n\n```\nuse Archive::SimpleZip;\n\n# Create a zip file in the filesystem\nmy $z = SimpleZip.new: \"mine.zip\";\n\n# Add a file to the zip archive\n$z.add: \"/some/file.txt\";\n\n# Add multiple files in one step\n# the 'add' method will consume anything that is an Iterable\n$z.add: @list_of_files;\n\n# change the compression method to STORE\n$z.add: 'somefile', :method(Zip-CM-Store);\n\n# add knows what to do with IO::Glob\nuse IO::Glob;\n$z.add: glob(\"*.c\");\n\n# add a file, but call it something different in the zip file\n$z.add: \"/some/file.txt\", :name\u003cbetter-name\u003e;\n\n# algorithmically rename the files by passing code to the name option\n# in this instance chage file extension from '.tar.gz' to ;.tgz'\n$z.add: @list_of_files, :name( *.subst(/'.tar.gz' $/, '.tgz') ), :method(Zip-CM-Store);\n\n# when used in a method chain it will accept an Iterable and output a Seq of filenames\n\n# add all files matched by IO::Glob\nglob(\"*.c\").dir.$z ;\n\n# or like this\nglob(\"*.c\").$z ;\n\n# contrived example\nglob(\"*.c\").grep( ! *.d).$z.uc.sort.say;\n\n# Create a zip entry from a string/blob\n\n$z.create(:name\u003cdata1\u003e, \"payload data here\");\n$z.create(:name\u003cdata2\u003e, Blob.new([2,4,6]));\n\n# Drop a filehandle into the zip archive\nmy $handle = \"/another/file\".IO.open;\n$z.create(\"data3\", $handle);\n\n# use Associative interface to call 'create' behind the secenes\n$z\u003cdata4\u003e = \"more payload\";\n\n# can also use Associative interface to add a file from the filesystem\n# just make sure it is of type IO\n$z\u003cdata5\u003e = \"/real/file.txt\".IO;\n\n# or a filehandle\n$z\u003cdata5\u003e = $handle;\n\n# create a directory\n$z.mkdir: \"dir1\";\n\n$z.close;\n```\n\n\n## Description\n\nSimple write-only interface to allow creation of Zip files.\n\nSee the full documentation at the end of the file `lib/Archive/SimpleZip.rakumod`.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to install this with `zef` :\n\n```\n# From the source directory\n\nzef install .\n\n# Remote installation\n\nzef install Archive::SimpleZip\n```\n## Support\n\nSuggestions/patches are welcome at [Archive-SimpleZip](https://github.com/pmqs/Archive-SimpleZip)\n\n## License\n\nPlease see the LICENSE file in the distribution\n\n(C) Paul Marquess 2016-2023\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmqs%2Farchive-simplezip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmqs%2Farchive-simplezip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmqs%2Farchive-simplezip/lists"}