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.1.tar.gz (4.5 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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smith_tea_calendar-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 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.1.tar.gz
Algorithm Hash digest
SHA256 be73699c7e5b33c8220f2b4ab6be457d3724219285bbe368073519cf24299ef6
MD5 7ef4ebb0c131c14b488141e9fd2d9fcd
BLAKE2b-256 efe03e1f738ef07d87878cc41fb691288ce6d8aa8508f41853f73566548c1e35

See more details on using hashes here.

Provenance

The following attestation bundles were made for smith_tea_calendar-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for smith_tea_calendar-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9e198d6dacd1ac7dff41c66ba40aeaac6bf2b35a73cc56164763e37824d37f4
MD5 727b5bb40ad93f444d28627dbe8de5be
BLAKE2b-256 4fa3bbf01d9e0c3b6dec64468d50f697db39fb10f34d457fd727b0b41c648436

See more details on using hashes here.

Provenance

The following attestation bundles were made for smith_tea_calendar-0.1.1-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