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.2.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.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smith_tea_calendar-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 be3d50a2bc9df35f16d139c01fb22e441f5b8df29f99a63157ebd937ba9f72b6
MD5 b0e4d5da24d7f2d30507def37d7f0561
BLAKE2b-256 4f48fa92fd74fa2d6ae4aad1b1b236c7fdb3569adb1e2e1e956c4f302215619d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for smith_tea_calendar-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d924aec7f31a8858533188261d914bab2b7415e0af3489959150509143a176f7
MD5 0623e97a0bc2451211e398f433beb2fa
BLAKE2b-256 048ce7fdeaed5c4f2e99d92fd3ed4c7d4a5124930166ec4c1ae8a36b53441fef

See more details on using hashes here.

Provenance

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