{"id":20461022,"url":"https://github.com/ericgj/newman-spooler","last_synced_at":"2026-04-20T07:03:16.253Z","repository":{"id":3105867,"uuid":"4131898","full_name":"ericgj/newman-spooler","owner":"ericgj","description":null,"archived":false,"fork":false,"pushed_at":"2012-04-26T03:57:19.000Z","size":1360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-08T14:55:26.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericgj.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-25T02:04:27.000Z","updated_at":"2014-05-16T16:40:53.000Z","dependencies_parsed_at":"2022-09-09T02:22:18.284Z","dependency_job_id":null,"html_url":"https://github.com/ericgj/newman-spooler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericgj/newman-spooler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fnewman-spooler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fnewman-spooler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fnewman-spooler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fnewman-spooler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericgj","download_url":"https://codeload.github.com/ericgj/newman-spooler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fnewman-spooler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-15T12:22:52.838Z","updated_at":"2026-04-20T07:03:16.236Z","avatar_url":"https://github.com/ericgj.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A flexible email spooler, as-yet unnamed.\n\n### Please note, alpha alpha software - you have been warned!\n\nDeveloped with Newman in mind, but has no dependencies on Newman. It only \nexpects to be fed [Mail](https://github.com/mikel/mail) objects, which it transforms into files according to\nrules.\n\nOne application would be to dump mailing-list messages in a spot where they can \nbe processed and served up as an archive by another process - in other words, a \nfile system queue. \n\nPotentially later this could be abstracted so different queue back-ends could\nbe developed.\n\nSome examples (not all of this is implemented yet):\n\n````ruby\n# maildir-ish\n\nmaildir = Spool.new('/var/spool/newman')\n\nmaildir.message do |out, m|\n  out.path    \"#{USER}/tmp\"\n  out.raw     Spool.unique(m)\nend\nmaildir.after do |files, attachments|\n  files.each do |f|\n    FileUtils.mv(f, \"../new/#{f}:2,\")\n  end\nend\n\n# another scenario\n\nspool.message do |out, m|\n  out.path       Spool.hash_path(m, 2)\n  out.json       \"#{Spool.escape(m.subject.decoded)}.json\"\n  out.text_part  \"#{Spool.escape(m.subject.decoded)}.txt\"\n  out.html_part  \"#{Spool.escape(m.subject.decoded)}.html\"\n  out.attachments 'image/*',   'images'  # save image attachments to images dir\n  out.attachments :all,        'other'   # save all other attachments to other dir\nend\n\nspool.after do |files, attachments|\n  manifest = File.join(\"#{File.dirname(files[0])}.manifest\", spool.base_dir)\n  File.open( manifest, \"w+\") do |f|\n    f.write files.join(\"\\n\")\n    f.write attachments.join(\"\\n\")\n  end\nend\n\n# writing a single message to the spooler\nspool \u003c\u003c message\n\n# writing multiple\nspool.push msg1, msg2\n\n````","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fnewman-spooler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericgj%2Fnewman-spooler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fnewman-spooler/lists"}