Skip to main content

a CLI tool and a library for Latvian name day lookup

Project description

Latvian name day list (vārda dienu saraksts)

This repository contains the Latvian name day list and an utility for working with it.

About Latvian name days.

Installation

To install this tool run:

pip install lv-namedays

Using uv:

uv pip install lv-namedays

You can also install it as a uv tool and then run it directly from shell:

> uv tool install lv-namedays

> nameday now

Šodienas vārda dienas: Antons, Antis, Antonijs

Usage - summary

Usage: nameday [OPTIONS] COMMAND [ARGS]...

  A program for lookup in the Latvian name day calendar.

  It can display today's name days and look up the name day date for a
  specific name.

Options:
  --help  Show this message and exit.

Commands:
  date  Show name days for a specific date (in MM-DD format).
  name  Show the name day for a specific name.
  now   Show today's name days.
  week  Show name days for the current day and 3 days before and after it.

Usage - as a command-line tool

Get the names for a given date

❯ nameday date 07-23

07-23 vārda dienas: Magda, Magone, Mērija, Magdalēna

You can also look up names in the extended name day list by supplying the -e or --extended option:

❯ nameday date 07-23 --extended

07-23 vārda dienas: Magda, Magone, Mērija, Magdalēna, Madelaina, Madeleina, Madlena, Madlēna, Magdalena, Magdaliene, Magdalina, Magita, Meralda, Meri, Merīda, Merija, Merilina, Merita, Radislavs, Radmila, Radomirs

You can also ask for today's names (the -e or --extended option can be used here, too):

❯ nameday now

Šodienas vārda dienas: Venta, Salvis, Selva

Get the name day for a given name

Find the name day date for a given name:

❯ nameday name Uldis

Uldis: vārda diena ir 07-04 (MM-DD)

This command also looks up names in the extended name day list:

❯ nameday name Radomirs

Radomirs: vārda diena (paplašinātajā sarakstā) ir 07-23 (MM-DD)

Show name days for a week

Use the week command to display names for a week (the current date +/- 3 days):

❯ nameday week

05-17 vārda dienas: Herberts, Dailis, Umberts
05-18 vārda dienas: Inese, Inesis, Ēriks
05-19 vārda dienas: Lita, Sibilla, Teika
05-20 vārda dienas: Venta, Salvis, Selva
05-21 vārda dienas: Ernestīne, Ingmārs, Akvelīna
05-22 vārda dienas: Emīlija, Visu neparasto un kalendāros neierakstīto vārdu diena
05-23 vārda dienas: Leontīne, Leokādija, Lonija, Ligija

Usage - as a library

The name day lookup functionality can also be imported and used as a library:

from lv_namedays import NameDayDB

db = NameDayDB()

# Look up the name day for Uldis (4th of July)
db.get_date_for_name("Uldis")
>>> '07-04'

# Look up the name day in the extended name day list
db.get_date_for_name("Radomirs", extended=True)
>>> '07-23'

# Look up the names for the 1st of July
db.get_names_for_date("07-01")
>>> ['Imants', 'Rimants', 'Ingars', 'Intars']

# Look up the names in the extended name day list
db.get_names_for_date("07-01", extended=True)
>>> ['Imants', 'Rimants', 'Ingars', 'Intars', 'Ingārs', 'Ingera', ...]

You can also access the full list of name days (both the core and the extended name day list) that this application is using:

# Get the core name days list (dictionary)
db.namedays
>>> {'01-01': ['Laimnesis', 'Solvita', 'Solvija'], ..., '12-31': ['Silvestrs', 'Silvis', 'Kalvis']}

# Get the extended name days list (dictionary)
db.namedays_ext
>>> {'01-01': ['Laimnesis', 'Solvita', 'Solvija', 'Afra', 'Afrodīte', ...], ...}

Data source

https://data.gov.lv/dati/eng/dataset/latviesu-tradicionalais-un-paplasinatais-kalendarvardu-saraksts

Related projects

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

lv_namedays-0.5.4.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

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

lv_namedays-0.5.4-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file lv_namedays-0.5.4.tar.gz.

File metadata

  • Download URL: lv_namedays-0.5.4.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.16

File hashes

Hashes for lv_namedays-0.5.4.tar.gz
Algorithm Hash digest
SHA256 d15823b804685aee97498c3f363e18c20aa3f3a478cb9bada39b3d71bb70ba07
MD5 200eba3d751ad517de53c95f495ea1a2
BLAKE2b-256 1dab000fe62ae3eb347addb978c52c72a8bd7247f5f87ce5dbd3a7e9ca2c3825

See more details on using hashes here.

File details

Details for the file lv_namedays-0.5.4-py3-none-any.whl.

File metadata

File hashes

Hashes for lv_namedays-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7eaf0e56b59f3b1c868ac174416a7c66c3085860386186b45f416905a3b3863e
MD5 aa6d2254e58fba8504ad780df0ec4e49
BLAKE2b-256 4557c38e748344db91a37735f983f81f1bef780256f621902a5bc26371abc28f

See more details on using hashes here.

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