Name | timezones-cli JSON |
Version |
0.3.8
JSON |
| download |
home_page | None |
Summary | Get local datetime from multiple timezones! |
upload_time | 2025-02-23 11:56:44 |
maintainer | None |
docs_url | None |
author | Yankee Maharjan |
requires_python | None |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<img src="https://i.imgur.com/ZebplfT.png" width="110" align="left"/><h1>Timezones CLI</h1>
<p><strong>CLI toolkit for timezones:zap:</strong></p>
<p>
<img src="https://img.shields.io/pypi/v/timezones-cli?style=flat-square&color=black"/>
<img src="https://img.shields.io/pypi/pyversions/timezones-cli?style=flat-square&color=black"/>
<img src="https://img.shields.io/pypi/l/timezones-cli?style=flat-square&color=black"/>
<img src="https://static.pepy.tech/badge/timezones-cli"/>
</p>
<img src="https://i.imgur.com/JIt8tQN.png" width="500" />
## What can you do with `timezones-cli`? :sparkles:
- Search for date and time based on city, country, or timezones.
- Manage dashboard for timezones you frequently view.
- Get UTC date and time based on your local timezone or any timezones.
## Contents
- [Installation](#installation)
- [Usage](#usage)
- [Search for timezones](#search-for-timezones)
- [Add/save timezones](#addsave-timezones)
- [Remove timezones](#remove-timezones)
- [Show saved timezones](#show-saved-timezones)
- [Select individual timezones from saved](#select-individual-timezones-from-saved)
- [Get UTC time](#get-utc-time)
- [Run using Docker :whale:](#run-using-docker-whale)
- [Contributing](#contributing)
## Installation
```bash
$ pip3 install timezones-cli
```
To run this CLI using Docker, check [Run using Docker :whale:](#run-using-docker-whale).
> **NOTE:** [List of country codes or timezone names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) :earth_asia:
> **Use `-t` flag to toggle 24 hours format.**
## Usage
### Search for timezones
Get time based on the entered timezone or country code
- using country code (either 2 or 3 letters):
```bash
$ tz search US
$ tz search USA
```
- using timezone:
```bash
$ tz search Asia/Kathmandu
```
- using fuzzy text: (example: Ireland)
```bash
$ tz search Irela
```
- using timezone shortcodes (--zone or -z flag):
```bash
$ tz search pst -z
$ tz search ist -z
$ tz search jst -z
$ tz search cest -z
$ tz search +0543 -z
$ tz search +05 -z
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/D2bcHG2.gif" width="700" alt="demo of timezone cli search" />
</details>
---
### Add/save timezones
Timezones added to the config file are treated as the default timezones which is triggered by the `tz show` command.
> file is stored at ~/.tz-cli
```bash
$ tz add "Asia/Kathmandu"
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/32XUBIP.gif" width="700" alt="demo of timezone cli add" />
</details>
---
### Remove timezones
There are two ways for removing timezones from the config file. Using the `--interactive` mode and passing the the `--name` flag.
```bash
$ tz remove -i
$ tz remove --name "Asia/Kathmandu"
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/q0lRtJt.gif" width="700" alt="demo of timezone cli remove" />
</details>
---
### Show saved timezones
```bash
$ tz show
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/s2Qq1Yb.gif" width="700" alt="demo of timezone cli show" />
</details>
---
### Select individual timezones from saved
```bash
$ tz select
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/VF91IZE.gif" width="700" alt="demo of timezone cli select" />
</details>
---
### Get UTC time
Get UTC time based on current system time.
> **tz utc --help**
```bash
$ tz utc
```
Get UTC time based on specified time and timezone.
```bash
$ tz utc <time> <timezone>
$ tz utc "11:45PM" "Asia/Kathmandu"
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/8hjy1XP.gif" width="500" alt="demo of timezone cli select" />
</details>
## Run using Docker :whale:
```bash
docker pull ghcr.io/yankeexe/timezones-cli:latest
```
Verify signature of the image: requires [cosign](https://docs.sigstore.dev/cosign/installation/).
```bash
COSIGN_EXPERIMENTAL=true cosign verify ghcr.io/yankeexe/timezones-cli:latest
```
Create a config file manually first.
```bash
$ touch ~/.tz-cli
$ docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli search us
```
For convenience you can add alias of the command to your shell config:
```bash
$ echo "alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'" >> ~/.bashrc
$ source ~/.bashrc
$ echo "alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'" >> ~/.zshrc
$ source ~/.zshrc
# Use alias to invoke timezones-cli
$ tz search Nepal
```
---
For local debugging: Use the `make run` command followed by the command you want to run against the `tz` binary.
```bash
$ make run cmd="get ist"
```
<details><summary><strong>Demo</strong></summary>
<img src = "https://i.imgur.com/t8RgJqg.png" width="500" alt="demo of timezone cli with Docker" />
</details>
## Contributing
For guidance on setting up a development environment and how to make a contribution to `timezones-cli`, see the [contributing guidelines](https://github.com/yankeexe/timezones-cli/blob/master/CONTRIBUTING.md).
Raw data
{
"_id": null,
"home_page": null,
"name": "timezones-cli",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Yankee Maharjan",
"author_email": null,
"download_url": null,
"platform": null,
"description": "<img src=\"https://i.imgur.com/ZebplfT.png\" width=\"110\" align=\"left\"/><h1>Timezones CLI</h1>\n\n<p><strong>CLI toolkit for timezones:zap:</strong></p>\n<p>\n<img src=\"https://img.shields.io/pypi/v/timezones-cli?style=flat-square&color=black\"/>\n<img src=\"https://img.shields.io/pypi/pyversions/timezones-cli?style=flat-square&color=black\"/>\n<img src=\"https://img.shields.io/pypi/l/timezones-cli?style=flat-square&color=black\"/>\n<img src=\"https://static.pepy.tech/badge/timezones-cli\"/>\n</p>\n\n\n<img src=\"https://i.imgur.com/JIt8tQN.png\" width=\"500\" />\n\n## What can you do with `timezones-cli`? :sparkles:\n- Search for date and time based on city, country, or timezones.\n- Manage dashboard for timezones you frequently view.\n- Get UTC date and time based on your local timezone or any timezones.\n\n## Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n - [Search for timezones](#search-for-timezones)\n - [Add/save timezones](#addsave-timezones)\n - [Remove timezones](#remove-timezones)\n - [Show saved timezones](#show-saved-timezones)\n - [Select individual timezones from saved](#select-individual-timezones-from-saved)\n - [Get UTC time](#get-utc-time)\n- [Run using Docker :whale:](#run-using-docker-whale)\n- [Contributing](#contributing)\n\n\n## Installation\n\n```bash\n $ pip3 install timezones-cli\n```\nTo run this CLI using Docker, check [Run using Docker :whale:](#run-using-docker-whale).\n\n> **NOTE:** [List of country codes or timezone names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) :earth_asia:\n\n> **Use `-t` flag to toggle 24 hours format.**\n\n## Usage\n\n### Search for timezones\n\nGet time based on the entered timezone or country code\n\n- using country code (either 2 or 3 letters):\n\n ```bash\n $ tz search US\n\n $ tz search USA\n ```\n\n- using timezone:\n ```bash\n $ tz search Asia/Kathmandu\n ```\n\n- using fuzzy text: (example: Ireland)\n ```bash\n $ tz search Irela\n ```\n\n- using timezone shortcodes (--zone or -z flag):\n ```bash\n $ tz search pst -z\n\n $ tz search ist -z\n\n $ tz search jst -z\n\n $ tz search cest -z\n\n $ tz search +0543 -z\n\n $ tz search +05 -z\n ```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/D2bcHG2.gif\" width=\"700\" alt=\"demo of timezone cli search\" />\n</details>\n\n---\n\n### Add/save timezones\n\nTimezones added to the config file are treated as the default timezones which is triggered by the `tz show` command.\n\n> file is stored at ~/.tz-cli\n\n```bash\n$ tz add \"Asia/Kathmandu\"\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/32XUBIP.gif\" width=\"700\" alt=\"demo of timezone cli add\" />\n</details>\n---\n\n### Remove timezones\n\nThere are two ways for removing timezones from the config file. Using the `--interactive` mode and passing the the `--name` flag.\n\n```bash\n$ tz remove -i\n\n$ tz remove --name \"Asia/Kathmandu\"\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/q0lRtJt.gif\" width=\"700\" alt=\"demo of timezone cli remove\" />\n</details>\n\n---\n\n### Show saved timezones\n\n```bash\n$ tz show\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/s2Qq1Yb.gif\" width=\"700\" alt=\"demo of timezone cli show\" />\n</details>\n---\n\n### Select individual timezones from saved\n\n```bash\n$ tz select\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/VF91IZE.gif\" width=\"700\" alt=\"demo of timezone cli select\" />\n</details>\n\n---\n\n### Get UTC time\n\nGet UTC time based on current system time.\n\n> **tz utc --help**\n\n```bash\n$ tz utc\n```\n\nGet UTC time based on specified time and timezone.\n\n```bash\n$ tz utc <time> <timezone>\n\n$ tz utc \"11:45PM\" \"Asia/Kathmandu\"\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/8hjy1XP.gif\" width=\"500\" alt=\"demo of timezone cli select\" />\n</details>\n\n## Run using Docker :whale:\n\n```bash\ndocker pull ghcr.io/yankeexe/timezones-cli:latest\n```\n\nVerify signature of the image: requires [cosign](https://docs.sigstore.dev/cosign/installation/).\n\n```bash\nCOSIGN_EXPERIMENTAL=true cosign verify ghcr.io/yankeexe/timezones-cli:latest\n```\n\nCreate a config file manually first.\n\n```bash\n$ touch ~/.tz-cli\n\n$ docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli search us\n```\nFor convenience you can add alias of the command to your shell config:\n```bash\n$ echo \"alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'\" >> ~/.bashrc\n$ source ~/.bashrc\n\n$ echo \"alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'\" >> ~/.zshrc\n$ source ~/.zshrc\n\n# Use alias to invoke timezones-cli\n$ tz search Nepal\n```\n\n---\n\nFor local debugging: Use the `make run` command followed by the command you want to run against the `tz` binary.\n\n```bash\n$ make run cmd=\"get ist\"\n```\n\n<details><summary><strong>Demo</strong></summary>\n\n<img src = \"https://i.imgur.com/t8RgJqg.png\" width=\"500\" alt=\"demo of timezone cli with Docker\" />\n</details>\n\n## Contributing\n\nFor guidance on setting up a development environment and how to make a contribution to `timezones-cli`, see the [contributing guidelines](https://github.com/yankeexe/timezones-cli/blob/master/CONTRIBUTING.md).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Get local datetime from multiple timezones!",
"version": "0.3.8",
"project_urls": {
"homepage": "https://github.com/yankeexe/timezones-cli"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1f9de8ba48847909dcfd1dcee5a95558b6af33147bf9067cd4144d99410a45ca",
"md5": "7cb68476f63f83420bc3b334ba345c8d",
"sha256": "b010b6f88792cf97a83269fa20923b4984f1c9476b6efa8c7587ad59579c5d6b"
},
"downloads": -1,
"filename": "timezones_cli-0.3.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7cb68476f63f83420bc3b334ba345c8d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14577,
"upload_time": "2025-02-23T11:56:44",
"upload_time_iso_8601": "2025-02-23T11:56:44.428670Z",
"url": "https://files.pythonhosted.org/packages/1f/9d/e8ba48847909dcfd1dcee5a95558b6af33147bf9067cd4144d99410a45ca/timezones_cli-0.3.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-23 11:56:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yankeexe",
"github_project": "timezones-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "timezones-cli"
}