Skip to content

Commit

Permalink
Added LICENSE and updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgit committed Apr 3, 2022
1 parent 974bad2 commit d8f5808
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 52 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Tomy Hsieh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 13 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,21 @@
# TimeZone-Alfred
<div align="center">
<img src="./source/icon.png" width="200" height="200">
</div>

Do you like [Alfred](https://www.alfredapp.com/)? I like too… I’ve recently found bunch of very nice Workflows. For me, the most used one is for sure Time Zone.
# alfred-ipinfo

### Now compatible with Alfred 4!
![GitHub All Releases](https://img.shields.io/github/downloads/paulgit/alfred-ipinfo/total?color=blue&label=Downloads&logo=Github)
![GitHub](https://img.shields.io/github/license/paulgit/alfred-ipinfo?label=License)

The workflow has been created by Mr Carlos from New Zealand and published on the [Alfred Forum](http://www.alfredforum.com/topic/491-timezones-a-world-clock-script-filter-updated-to-v17/). I’ve enhanced the workflow by adding a few new functionalities:
ipinfo is an Alfred workflow for fetching information about an IP address. It achieves this by using the [ipinfo.io IP Geolocation API](https://ipinfo.io/products/ip-geolocation-api) which is free to register for and is free to use for 50,0000 lookups per month.

* Converting any time to all pre-defined time zones
* Enabling 24-hrs time format
* Displaying phone country code
## Credit & License

After all it looks like below:
* This project is inspired by [tomy0000000/Coinc](https://github.com/tomy0000000/Coinc)
I based ipinfo on the code structure from coinc as it made use of the [alfred-workflow library](https://github.com/deanishe/alfred-workflow) which I wanted to learn how to use.

![Preview 1](https://jhartman.pl/wp-content/uploads/2016/12/Alfred2.png)
* Core Library depends on the work-of-art-library [deanishe/alfred-workflow](https://github.com/deanishe/alfred-workflow)

Conversion of a time in your local time to your pre-defined time-zones – “tz <time>” in formats HH, HHMM or HH:MM:
* API provided by [ipinfo.io](https://ipinfo.io/)

![Preview 2](https://jhartman.pl/wp-content/uploads/2016/12/Alfred3.png)

Conversion of a time in a timezone from your list (Warsaw in the sample) with modified date (plus 3 days in the sample):

![Preview 3](img/demo-2.5.png)

### UTC Support

You can add UTC zones: just search the zone using keyword `timezone add universal` or `timezone add coordinated`:

![Preview 4](https://user-images.githubusercontent.com/964833/114501067-8aba7600-9c29-11eb-9b49-2e2e255920bd.png)

## Commands

* **Keyword**: *tz* (or hotkey) - bring up the list of saved cities with their respective current times. (Keep typing the name of a place for a one-off lookup.)
* **Keyword**: *tz [part of city name]* - searches for a city in your cities that matches that name and shows the current time.
* **Keyword**: *tz [`time`]* - (where `time` is HH, HHMM or HH:MM) - convert provided time into the time of your cities.
* **Keyword**: *tz [`date modifier`] [`time`]* - (where `time` is as above and `date modifier` is 'today' (short: 't'), or 'tomorrow' (short: 'tm'), or `[number of days]d` what means to add the number of days to current date, or one of `dd`, `mmdd`, `yymmdd`, `yyyymmdd` to give an absolute date) - convert provided date and time into time of your cities.
* **Keyword**: *tz [`source city`] [`date`] [`time`]* - (where `time` and `date` are as above and `source city` is used to search in your city list) - assumes that date and time is given in the timezone of provided source city and converts it into time of your (other) cities.
* **Keyword**: *timezone add [your city]* - add your city to the list. (To remove a city, option-select it from the main list.)
* **Keyword**: *timezone edit* - open for edit of cities file.
* **Keyword**: *timezone move* - move the saved cities file (timezones.txt) to a location of your choice (so you can sync it in your Dropbox or whatever you want).
* **Keyword**: *timezone 12h*, *timezone 24h* - change format of displayed time.

## Keyboard shortcuts

* *Option + Enter* - remove from the list
* *Command + Enter* - pin/unpin the city from the top of the list.
![mymovie](https://user-images.githubusercontent.com/964833/48945347-429c3b00-ef2a-11e8-84f9-3fabe8814c8c.gif)

## Installation steps

1. Install Alfred
2. Purchase premium version of Alfred to enable Workflows
3. Download latest ZIP file from [releases](https://github.com/jaroslawhartman/TimeZones-Alfred/releases)
4. Unzip and double click to add to Alfred

## References

* GeoIP2 City and Country CSV Databases: https://dev.maxmind.com/geoip/geoip2/geoip2-city-country-csv-databases/
* Flag icons from: http://www.free-country-flags.com (Creative Commons Attribution-ShareAlike 3.0 Unported License.)
* Icon design by Logo Open Stock (modified from original) http://www.logoopenstock.com
* Any source code unmentioned above are released under the [MIT license](https://github.com/paulgit/alfred-ipfinfo/blob/master/LICENSE)

0 comments on commit d8f5808

Please sign in to comment.