66
77Extension for converting between timezones in [ Albert launcher] ( https://albertlauncher.github.io/ )
88
9- ![ image ] ( https://user-images.githubusercontent.com/20955511/142168605-4e4badca-5693-4c4f-8f20-f03b8723c97f.png )
9+ ![ Peek 2021-11-17 14-36 ] ( https://user-images.githubusercontent.com/20955511/142286371-7257b05c-1d84-40f6-b5a0-079525fe4c4b.gif )
1010
1111## Installation
1212
@@ -20,7 +20,7 @@ The data directories reside in the data directories of the application defined b
2020/usr/share/albert/org.albert.extension.python/modules
2121```
2222
23- Double-clicking on a module in the settings will open the directory in the file manager.
23+ (Note: Double-clicking on a module in the settings will open the directory in the file manager.)
2424
25252 . Clone this repository into your ` modules ` directory.
2626
@@ -30,13 +30,13 @@ cd /path/to/modules
3030git clone https://github.com/DenverCoder1/timezone-convert-albert-ext.git
3131```
3232
33- 3 . Install ` dateparser ` using pip.
33+ 3 . Ensure that ` dateparser ` is installed using pip.
3434
3535``` bash
3636python3 -m pip install dateparser
3737```
3838
39- 4 . Enable the extension in the settings.
39+ 4 . Enable the extension in the settings under ` Extensions > Python ` .
4040
4141![ settings] ( https://user-images.githubusercontent.com/20955511/142149401-188a865a-211e-4aa9-9e03-bf6314c2041e.png )
4242
@@ -50,18 +50,53 @@ Examples:
5050
5151` 8am MST in New York `
5252
53- ## Config
53+ You can also use "Time in..." to convert the current time to another timezone.
5454
55- In ` config.py ` there are options to customize the extension:
55+ ` Time in UTC `
5656
57- ### 24-hour time
57+ ` Time in Tokyo `
5858
59- To enable 24-hour time, set ` hr24 ` to ` True ` .
59+ ## Configuration
60+
61+ In ` config.jsonc ` there are options to customize the extension:
62+
63+ ### Date format
64+
65+ To change the way dates are displayed, set the ` date_format ` option.
66+
67+ The default is ` %a %d %b ` (e.g. "Mon 12 Dec").
68+
69+ See https://strftime.org for a list of supported formats
70+
71+ ### Time format
72+
73+ To change the way times are displayed, set the ` time_format ` option.
74+
75+ You can use ` %H:%M ` for 24-hour time, or ` %I:%M %p ` for 12-hour time.
76+
77+ The default is ` %I:%M %p ` (eg. "12:00 PM")
78+
79+ See https://strftime.org for a list of supported formats
80+
81+ ### Remove leading zeros
82+
83+ Set ` remove_leading_zeros ` to true to remove leading zeros from the date/time.
84+
85+ Eg. ` Mon 01 Dec 01:00 PM ` becomes ` Mon Dec 1 1:00 PM ` .
86+
87+ The default is ` true ` .
88+
89+ ### Lowercase AM/PM
90+
91+ Set ` lowercase_am_pm ` to replace 'AM'/'PM' with 'am'/'pm' in time formats.
92+
93+ The default is ` true ` .
6094
6195### Timezone aliases
6296
63- To add a city or abbreviation as an alias for a timezone, add it to ` aliases ` as a key-value pair.
97+ To add a city or abbreviation as an alias for a timezone, add it to ` tz_aliases ` as a key-value pair.
6498
99+ See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of supported timezones
65100
66101
67102## Contributing
0 commit comments