{"id":18433403,"url":"https://github.com/erwald/nwsl","last_synced_at":"2026-03-12T00:33:34.445Z","repository":{"id":93439956,"uuid":"345656363","full_name":"erwald/nwsl","owner":"erwald","description":"A command-line utility for running a lightweight newsletter","archived":false,"fork":false,"pushed_at":"2021-03-31T18:46:06.000Z","size":42,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T12:00:55.398Z","etag":null,"topics":["cli","command-line","command-line-tool","email","emails","newsletter","newsletter-emails","newsletters"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erwald.png","metadata":{"files":{"readme":"README.md","changelog":"newsletter/__init__.py","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}},"created_at":"2021-03-08T12:57:07.000Z","updated_at":"2025-06-02T10:07:37.000Z","dependencies_parsed_at":"2023-08-25T21:33:06.373Z","dependency_job_id":null,"html_url":"https://github.com/erwald/nwsl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erwald/nwsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwald%2Fnwsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwald%2Fnwsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwald%2Fnwsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwald%2Fnwsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erwald","download_url":"https://codeload.github.com/erwald/nwsl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwald%2Fnwsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30408491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T22:36:59.286Z","status":"ssl_error","status_checked_at":"2026-03-11T22:36:57.544Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","command-line","command-line-tool","email","emails","newsletter","newsletter-emails","newsletters"],"created_at":"2024-11-06T05:34:25.544Z","updated_at":"2026-03-12T00:33:34.416Z","avatar_url":"https://github.com/erwald.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nwsl\n\n`nwsl` is a command-line utility for running a lightweight, serverless\nnewsletter. Well, it's not serverless exactly: it tracks subscribers by scanning\na mailbox for emails with the words \"subscribe\" or \"unsubscribe\" in the subject\nline. It then allows you to send out newsletter emails to these subscribers,\n\n```sh\n$ nwsl send-email /path/to/newsletter.txt /path/to/newsletter.html\nIMAP password:\nSMTP password:\nFetching emails for newsletter@example.net at mail.host.net\n\nWant to send out newsletter to 3 subscriber(s):\n\n# My Newsletter Title\n\nThis here is the plain text version ...\n\nHTML body:\n\n\u003chtml\u003e\n    \u003chead\u003e\u003c/head\u003e\n    \u003cbody\u003e\n        \u003cp\u003eThis here is the HTML version\u003c/p\u003e ...\n\nDo you want to proceed? [Y/n]: y\nSent \"My Newsletter Title\" to 3 subscriber(s)\n```\n\nbut more about this below.\n\n`nwsl` is currently in alpha. I'm looking to add more features \u0026 would be happy to get feature requests or contributions.\n\n## Installation\n\nThis program requires Python 3. After cloning the repository, run:\n\n```shellsession\n$ poetry install\n```\n\nYou can then run commands locally in the repository,\n\n```shellsession\n$ poetry run nwsl configure\n```\n\nor install the program across your system,\n\n```shellsession\n$ poetry build --f=wheel \u0026\u0026 pip3 install --force-reinstall dist/newsletter-0.1.0-py3-none-any.whl\n$ nwsl configure\n```\n\n## Getting Started\n\nIn order to use `nwsl`, you first need to set up a suitable email inbox. You'll then want to instruct prospective subscribers to send an email to this address with \"subscribe\" in the subject line. You'll probably also want to add instructions for unsubscribing in your newsletter emails; to unsubscribe, subscribers need to send an email to the same address with \"unsubscribe\" in the subject line.\n\nFor example, on your blog:\n\n\u003e You can subscribe by sending an email with \"subscribe\" in the subject line to newsletter@example.net.\n\nAnd in your newsletter emails:\n\n\u003e To unsubscribe, simply send an email to newsletter@example.net with the word \"unsubscribe\" in the subject line.\n\nFinally, you'll need to run `nwsl configure` (see below).\n\n## Commands\n\n### `nwsl configure`\n\n```sh\nUsage: nwsl configure [OPTIONS]\n\n  Edit the emailing config file. This starts the editor with the current\n  contents of the config file. You can edit the following fields:\n\n      sender - This is the sender name, probably the name of your\n      newsletter.\n\n      imap_host - The IMAP hostname of the subscriber-handling inbox.\n\n      imap_user - The IMAP username of the subscriber-handling inbox.\n\n      smtp_host - The SMTP hostname of the newsletter-sending email account.\n\n      smtp_user - The SMTP username of the newsletter-sending email account.\n      This is also used as the sender email address.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### `nwsl subscribers`\n\n```sh\nUsage: nwsl subscribers [OPTIONS]\n\n  Print list of newsletter subscribers to stdout.\n\nOptions:\n  --imap-password TEXT  Your IMAP password. If empty, it prompts you for it.\n  --help                Show this message and exit.\n```\n\n### `nwsl send-email`\n\n```sh\nUsage: nwsl send-email [OPTIONS] FILE1 [FILE2]\n\n  Send email with content at given path(s) to all subscribers.\n\n  The path(s) need to point to text files. If one is supplied, it can be\n  either an HTML file (detected via the presence of an \u003chtml\u003e tag) or a\n  plain text file. If two are supplied, one of them needs to be an HTML file\n  and the other a plain text file.\n\n  Example:\n\n      $ nwsl send-email ./newsletter.txt ./newsletter.html\n\n  You will then be asked for your IMAP and SMTP passwords. There is a\n  confirmation prompt before the emails are actually sent out to\n  subscribers.\n\n  If FILE1 is a single dash (``-''), nwsl reads from the standard input. Be\n  careful, though, because when piping there'll be no confirmation prompt.\n  Emails will be sent out.\n\n  Example:\n\n      $ cat ./newsletter.txt | sed -e 's/foo/bar/g' | nwsl send-email -\n\nOptions:\n  --dry-run             Do not send any emails.\n  --imap-password TEXT  Your IMAP password. If empty, it prompts you for it.\n  --smtp-password TEXT  Your SMTP password. If empty, it prompts you for it.\n  --help                Show this message and exit.\n```\n\n## Running the Tests\n\n```sh\n$ poetry run python tests/test_newsletter.py\n..........\n----------------------------------------------------------------------\nRan 10 tests in 0.022s\n\nOK\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwald%2Fnwsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferwald%2Fnwsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwald%2Fnwsl/lists"}