https://github.com/denvercoder1/timezone-convert-albert-ext
Albert launcher extension for converting between timezones
https://github.com/denvercoder1/timezone-convert-albert-ext
albert albert-extensions albertlauncher timezone-conversion timezones
Last synced: 3 months ago
JSON representation
Albert launcher extension for converting between timezones
- Host: GitHub
- URL: https://github.com/denvercoder1/timezone-convert-albert-ext
- Owner: DenverCoder1
- License: mit
- Created: 2021-11-17T21:49:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-10T23:01:58.000Z (over 2 years ago)
- Last Synced: 2024-11-15T12:35:39.278Z (5 months ago)
- Topics: albert, albert-extensions, albertlauncher, timezone-conversion, timezones
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# timezone-convert-albert-ext
> **Warning**: This plugin is not supported in Albert >= 0.18
[](https://discord.gg/fPrdqh3Zfu)
[](https://github.com/DenverCoder1/timezone-convert-albert-ext/blob/main/LICENSE)
[](https://github.com/psf/black)Extension for converting between timezones in [Albert launcher](https://albertlauncher.github.io/)

## Installation
1. Locate the `modules` directory in the Python extension data directory.
The data directories reside in the data directories of the application defined by Qt. Hence on linux the modules would be looked up in the following directories (in this order):
```
~/.local/share/albert/org.albert.extension.python/modules
/usr/local/share/albert/org.albert.extension.python/modules
/usr/share/albert/org.albert.extension.python/modules
```(Note: Double-clicking on a module in the settings will open the directory in the file manager.)
2. Clone this repository into your `modules` directory.
```bash
cd /path/to/modulesgit clone https://github.com/DenverCoder1/timezone-convert-albert-ext.git
```3. Ensure that `dateparser` is installed using pip.
```bash
python3 -m pip install dateparser
```4. Enable the extension in the settings under `Extensions > Python`.

## Usage
Type a time, followed by the word "to" or "in" and then the timezone you want to convert to.
Examples:
`10pm PST to CST`
`8am MST in New York`
You can also use "Time in..." to convert the current time to another timezone.
`Time in UTC`
`Time in Tokyo`
## Configuration
In `config.jsonc` there are options to customize the extension:
### Date format
To change the way dates are displayed, set the `date_format` option.
The default is `%a %d %b` (e.g. "Mon 12 Dec").
See https://strftime.org for a list of supported formats
### Time format
To change the way times are displayed, set the `time_format` option.
You can use `%H:%M` for 24-hour time, or `%I:%M %p` for 12-hour time.
The default is `%I:%M %p` (eg. "12:00 PM")
See https://strftime.org for a list of supported formats
### Remove leading zeros
Set `remove_leading_zeros` to true to remove leading zeros from the date/time.
Eg. `Mon 01 Dec 01:00 PM` becomes `Mon Dec 1 1:00 PM`.
The default is `true`.
### Lowercase AM/PM
Set `lowercase_am_pm` to replace 'AM'/'PM' with 'am'/'pm' in time formats.
The default is `true`.
### Timezone aliases
To add a city or abbreviation as an alias for a timezone, add it to `tz_aliases` as a key-value pair.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of supported timezones
## Contributing
If you have any questions, suggestions, or issues, please feel free to open an issue or pull request.
## Support
💙 If you like this project, give it a ⭐ and share it with friends!
[☕ Buy me a coffee](https://ko-fi.com/jlawrence)