Skip to content

Commit

Permalink
0.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppestaerk committed Feb 25, 2018
1 parent 6b94946 commit 24276e1
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 28 deletions.
8 changes: 0 additions & 8 deletions .yo-rc.json

This file was deleted.

Binary file added alfred-currency-conversion.alfredworkflow
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function cacheRates(data) {
const lastUpdateTime = new Date(data['date']);
lastUpdateTime.setUTCHours(15, 0, 0, 0);
const nextUpdateTime = new Date(data['date']);
nextUpdateTime.setUTCDate(nextUpdateTime.getDate() + 1);
nextUpdateTime.getUTCDay() >= 5 ? nextUpdateTime.setUTCDate(nextUpdateTime.getDate() + 3) : nextUpdateTime.setUTCDate(nextUpdateTime.getDate() + 1);
nextUpdateTime.setUTCHours(15, 15, 0, 0);
alfy.cache.set('nextUpdate', nextUpdateTime);
alfy.cache.set('updateDate', lastUpdateTime);
Expand Down
25 changes: 22 additions & 3 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<key>queuemode</key>
<integer>2</integer>
<key>runningsubtext</key>
<string>Searching...</string>
<string>Fetching rates...</string>
<key>script</key>
<string>./node_modules/.bin/run-node index.js "$1"</string>
<key>scriptargtype</key>
Expand All @@ -125,7 +125,7 @@
<key>subtext</key>
<string>Currency conversion and foreign exchange rates</string>
<key>title</key>
<string>Currency converter</string>
<string>Currency Converter</string>
<key>type</key>
<integer>0</integer>
<key>withspace</key>
Expand Down Expand Up @@ -254,7 +254,26 @@
</dict>
</array>
<key>readme</key>
<string></string>
<string># alfred-currency-conversion
&gt; Alfred 3 Workflow - See foreign exchange rates and currency conversion
## Usage
In Alfred, type `curcon`, ⏎, and your amount.
## Highlights
- Set your own base currency (default `EUR`)
- Currencies: `AUD`, `BGN`, `BRL`, `CAD`, `CHF`, `CNY`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HRK`, `HUF`, `IDR`, `ILS`, `INR`, `ISK`, `JPY`, `KRW`, `MXN`, `MYR`, `NOK`, `NZD`, `PHP`, `PLN`, `RON`, `RUB`, `SEK`, `SGD`, `THB`, `TRY`, `USD`, and `ZAR`
- Auto update rates at 4PM CET on working days
- Input support locale numbers
- Input support for $ (`USD`), € (`EUR`), £ (`GBP`), and ¥ (`JPY`)
- Outputs dates and numbers in locale
## Contributions:
Please feel free to create a PR and/or make a code review!
[GitHub Repository](https://github.com/jeppestaerk/alfred-currency-conversion)
## License
MIT © [Jeppe Stærk](https://staerk.io)</string>
<key>uidata</key>
<dict>
<key>1764A639-42CB-45C0-938C-D34487A765F2</key>
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alfred-currency-conversion",
"version": "0.1.12",
"description": "Alfred 3 workflow for Foreign exchange rates and currency conversion",
"version": "0.1.14",
"description": "Alfred 3 Workflow - See foreign exchange rates and currency conversion",
"license": "MIT",
"repository": "jeppestaerk/alfred-currency-conversion",
"author": {
Expand Down Expand Up @@ -30,7 +30,8 @@
"alfred-workflow",
"alfred3-workflow",
"alfy",
"currency-conversion"
"currency-conversion",
"foreign-exchange-rates"
],
"dependencies": {
"alfy": "^0.6.0",
Expand Down
47 changes: 34 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,49 @@
# alfred-currency-conversion [![Build Status](https://travis-ci.org/jeppestaerk/alfred-currency-conversion.svg?branch=master)](https://travis-ci.org/jeppestaerk/alfred-currency-conversion)
# alfred-currency-conversion

> Alfred 3 workflow for Foreign exchange rates and currency conversion
> Alfred 3 Workflow - See foreign exchange rates and currency conversion
[![Travis](https://img.shields.io/travis/jeppestaerk/alfred-currency-conversion/master.svg?style=flat-square&label=build%20status)](https://travis-ci.org/jeppestaerk/alfred-currency-conversion) [![npm](https://img.shields.io/npm/dt/alfred-currency-conversion.svg?style=flat-square&label=npm%20downloads)](https://www.npmjs.com/package/alfred-currency-conversion) [![Github](https://img.shields.io/github/downloads/jeppestaerk/alfred-currency-conversion/total.svg?style=flat-square&label=github%20downloads)](https://github.com/jeppestaerk/alfred-currency-conversion/releases/latest)

<img src="https://raw.githubusercontent.com/jeppestaerk/alfred-currency-conversion/master/preview.gif">

<img src="preview.gif" width="600">

## Install

Use `npm`
```
$ npm install --global alfred-currency-conversion
```
or download `alfredworkflow` file from [releases](https://github.com/jeppestaerk/alfred-currency-conversion/releases/latest)

*Requires [Node.js](https://nodejs.org) 4+ and the Alfred [Powerpack](https://www.alfredapp.com/powerpack/).*


## Features
## Highlights

* Set your own base currency (default `EUR`)
* Currencies: `AUD`, `BGN`, `BRL`, `CAD`, `CHF`, `CNY`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HRK`, `HUF`, `IDR`, `ILS`, `INR`, `ISK`, `JPY`, `KRW`, `MXN`, `MYR`, `NOK`, `NZD`, `PHP`, `PLN`, `RON`, `RUB`, `SEK`, `SGD`, `THB`, `TRY`, `USD`, and `ZAR`
* Auto update rates everyday at 4PM CET
* Input support locale numbers
* Input support for <kbd>$</kbd> (`USD`), <kbd>€</kbd> (`EUR`), <kbd>£</kbd> (`GBP`), and <kbd>¥</kbd> (`JPY`)
* Outputs dates and numbers in locale
- Set your own base currency (default `EUR`)
- Currencies: `AUD`, `BGN`, `BRL`, `CAD`, `CHF`, `CNY`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HRK`, `HUF`, `IDR`, `ILS`, `INR`, `ISK`, `JPY`, `KRW`, `MXN`, `MYR`, `NOK`, `NZD`, `PHP`, `PLN`, `RON`, `RUB`, `SEK`, `SGD`, `THB`, `TRY`, `USD`, and `ZAR`
- Auto update rates at 4PM CET on working days
- Input support locale numbers
- Input support for <kbd>$</kbd> (`USD`), <kbd>€</kbd> (`EUR`), <kbd>£</kbd> (`GBP`), and <kbd>¥</kbd> (`JPY`)
- Outputs dates and numbers in locale


## Usage

In Alfred, type `curcon`, <kbd>Enter</kbd>, and your query.
In Alfred, type `curcon`, <kbd></kbd>, and your amount.


## License
## Contributions

MIT © [Jeppe Stærk](https://staerk.io)
Please feel free to create a PR and/or make a code review!


## To do

- [x] ~~Only update rates on working days~~
- [ ] Refactor code
- [ ] Make a fixer.io wrapper
- [ ] *Your idea here*


## Credits
Expand All @@ -39,3 +52,11 @@ MIT © [Jeppe Stærk](https://staerk.io)
* [os-locale](https://github.com/sindresorhus/os-locale) made by [Sindre Sorhus](https://sindresorhus.com/) is licensed by [MIT](https://github.com/sindresorhus/os-locale/blob/master/license)
* Currency rates from [fixer.io](http://fixer.io/) via `https://api.fixer.io` (Updates once a day, approximately 4.00 PM CET)
* Icons made by [Freepik](http://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)


## License

MIT © [Jeppe Stærk](https://staerk.io)


<p align="center"><img src="https://raw.githubusercontent.com/jeppestaerk/alfred-currency-conversion/master/icon.png" width="64" ></p>

0 comments on commit 24276e1

Please sign in to comment.