Giter VIP home page Giter VIP logo

moeda's Introduction

moeda

Build Status GitHub version npm version

A foreign exchange rates and currency conversion using cli

demo moeda gif

Info

The moeda use historical foreign exchange rates published by the European Central Bank. The rates are updated daily around 4PM CET.

Install

$ npm install -g moeda

CLI

Usage
  $ moeda <amount> <currency> [<...currencies>]

Some currency
  [ usd, eur, gbp, brl... ]

Examples
  $ moeda 1 usd

  or

  $ moeda 1 usd eur rub aud

Contributing

Help improve these docs. Open an issue or submit a pull request.

  1. Navigate to the main page of the repository
  2. Fork it!
  3. Create your feature branch: git checkout -b my-new-feature
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request =D

Standard - JavaScript Style Guide

History

See Releases for detailed changelog.

License

MIT License Ā© Emerson Thompson

moeda's People

Contributors

alcovegan avatar cjpatoilo avatar dependabot[bot] avatar suissa avatar thompsonemerson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

moeda's Issues

Other sources of currency info(not only Fixer.io)

Hi there! Nice app you've coded but i've encountered one problem with it. Fixer.io simply not support some currencies(in fact currency list of it is barely small, in fact i live in Ukraine and Fixer.io simply don't have support for Ukrainian hryvnia, only rubles). It would be nice if you can implement some other sources of information. Like a google currencies for example. It has simple API that you could try to parse with some http tools and it has mostly every currency in world.

How to retrieve "historical foreign exchange rates"?

Re: Documentation:
The readme mentions a feature, the ability to retrieve "historical foreign exchange rates". It would be helpful if the documentation included the commands on how to retrieve the historical exchange rates.

Internal server error

Steps to reproduce

moeda 1 usd eur
or
sudo moeda 1 usd eur
or
moeda 1 usd

Expected behavior

Conversion on currencies

Actual behavior

Error:
Internal server error.

System configuration

Node version: 10.10.0

npm version: 6.4.1

moeda version: 1.3.3

Currency converting API is broken

Steps to reproduce

Clone repo and install dependencies

$ npm install -g moeda

Use moeda as cli tool

Try to use the api

moeda 1 usd brl

Expected behavior

it should convert currency correctly using api

Actual behavior

Error
GBP Converting currency...
/opt/homebrew/lib/node_modules/moeda/node_modules/got/index.js:73
ee.emit('error', new got.RequestError(err, opts));
^
ErrorClass [RequestError]: getaddrinfo ENOTFOUND api.ratesapi.io
at ClientRequest. (/opt/homebrew/lib/node_modules/moeda/node_modules/got/index.js:73:21)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:514:28)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ENOTFOUND',
host: 'api.ratesapi.io',
hostname: 'api.ratesapi.io',
method: 'GET',
path: '/api/latest?base=USD&symbols=EUR,GBP,BRL'
}

System configuration

Node version:
v20.5.1
npm version:
9.8.0
moeda version:
2.0.0 (latest)

Currency converting API not working more.

Steps to reproduce

  1. Run command: moeda 1 brl eur
  2. Receive this message:
    image

Expected behavior

Convert currency amount.

Actual behavior

No currency is converted.

System configuration

Node version: 14.7 and 16.18 and 6.17 .

npm version:
node 14: npm 6.14.13
node 16: 8.19.2
node 6: 3.10.10

moeda version:
eur, brl, usd, etc...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.