Skip to main content

Create an iCal file containing upcoming Smith Tea subscription renewals

Project description

🍵 smith-tea-calendar

This program creates an iCal file containing upcoming Smith Tea subscription renewals by scraping your account details. I wrote this program because I wanted a better way to track when my orders would renew by tracking that information in my calendar.

Usage

All arguments can be specified as environment variables with the SMITH_TEA_ prefix. It's generally safer to specify credentials this way as environmment variables aren't generally visible to other programs and users.

If at any point the website is updated and the built-in CSS selectors used to navigate the site break, you can use any of the --selector-* flags to change them. For a full listing of options, including all selector flags, use the --help flag.

With uv

This program uses Playwright to scrape you orders. You will need to first run Playwright to install a headless Chromium browser before using the tool the first time.

$ uvx playwright install chromium

Once chromium has been installed, you can run the program as follows:

$ uvx smith-tea-calendar --email "..." --password "..."

With docker

Alternatively, you can run the tool inside a Docker image. This may be useful if you want to run this as periodic job in a container-native environment.

# Or clone the repository and use that copy of the script.
$ mkdir -p scripts/; curl -o scripts/entrypoint.sh \
    https://raw.githubusercontent.com/mrflynn/smith-tea-calendar/refs/heads/main/scripts/entrypoint.sh

$ docker run --entrypoint /entrypoint.sh \
    -v ./scripts/entrypoint.sh:/entrypoint.sh:ro \
    -v $(pwd):/data \
    -e SMITH_TEA_EMAIL="..." -e SMITH_TEA_PASSWORD="..." \
    --ipc host \
    mcr.microsoft.com/playwright/python:v1.57.0 /data/orders.ics

Microsoft has some additional recommendations for running Playwright in a Docker container, the docs for which can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smith_tea_calendar-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smith_tea_calendar-0.1.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file smith_tea_calendar-0.1.3.tar.gz.

File metadata

  • Download URL: smith_tea_calendar-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for smith_tea_calendar-0.1.3.tar.gz
Algorithm Hash digest
SHA256 768e20b7fe212ae19b643d0bb87def25c395f2d8f7b2fb9342afaa3a7953f4ba
MD5 6885c380e1644f13c35d7546de375164
BLAKE2b-256 cf46ec8f39ef56c5a57f04eea827b1caf5f676cabf2d5f6f19b69feb9f562283

See more details on using hashes here.

Provenance

The following attestation bundles were made for smith_tea_calendar-0.1.3.tar.gz:

Publisher: release.yml on MrFlynn/smith-tea-calendar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smith_tea_calendar-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for smith_tea_calendar-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9630192a53f867d6c725ccdda6cd0da5cade3bf529d55d7aec246e72e96556f
MD5 7ffeff43fd666b68570891764ea22c5a
BLAKE2b-256 dd38ff2f52a96690820ade499172c2d173de139e6e5be1e3a4f0518fe4d2e6b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for smith_tea_calendar-0.1.3-py3-none-any.whl:

Publisher: release.yml on MrFlynn/smith-tea-calendar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page