Giter Club home page Giter Club logo

rastreio's Introduction

rastreio

Saiba onde estão suas encomendas

Build Status Coverage Status

Instalação

$ npm install --global rastreio

Uso

$ rastreio <arg> <arg> ... [--json] [--xml] [--humanize] [--ultimo] [--todos]
$ cat <file> | rastreio <--stdin>

Opções

  Padrão: --todos --humanize
  --help          Mostra a ajuda
  --version       Mostra a versão
  --todos, -t     Todos os eventos
  --ultimo, -u    Somente o ultimo evento
  --xml, -x       A saida será xml
  --json, -j      A saida será json
  --humanize, -h  A saida será mais "humana"
  --stdin         Entrada padrão

Exemplos

$ rastreio TE123456785AB
> TE123456785AB - TESTE (OBJETO PARA TREINAMENTO) - OBJETO INTERNACIONAL

  04/02/2016 11:35 EM CDD BELO HORIZONTE, BELO HORIZONTE - MG
  OBJETO ENCAMINHADO  PARA CTCE UBERABA, UBERABA - MG

$ rastreio TE123456785AB --json
{
  "versao": "2.0",
  "qtd": "1",
  "objeto": {
    "numero": "TE123456785AB",
    "sigla": "TE",
    "nome": "TESTE (OBJETO PARA TREINAMENTO)",
    "categoria": "OBJETO INTERNACIONAL",
    "evento": {
      "tipo": "RO",
      "status": "01",
      "data": "04/02/2016",
      "hora": "11:35",
      "descricao": "Objeto encaminhado",
      "local": "CDD BELO HORIZONTE",
      "codigo": "30107970",
      "cidade": "BELO HORIZONTE",
      "uf": "MG",
      "destino": {
        "local": "CTCE UBERABA",
        "codigo": "38018970",
        "cidade": "UBERABA",
        "bairro": "CENTRO",
        "uf": "MG"
      }
    }
  }
}

$ rastreio TE123456785AB --xml
<return>
   <versao>2.0</versao>
   <qtd>1</qtd>
   <objeto>
      <numero>TE123456785AB</numero>
      <sigla>TE</sigla>
      <nome>TESTE (OBJETO PARA TREINAMENTO)</nome>
      <categoria>OBJETO INTERNACIONAL</categoria>
      <evento>
         <tipo>RO</tipo>
         <status>01</status>
         <data>04/02/2016</data>
         <hora>11:35</hora>
         <descricao>Objeto encaminhado</descricao>
         <local>CDD BELO HORIZONTE</local>
         <codigo>30107970</codigo>
         <cidade>BELO HORIZONTE</cidade>
         <uf>MG</uf>
         <destino>
            <local>CTCE UBERABA</local>
            <codigo>38018970</codigo>
            <cidade>UBERABA</cidade>
            <bairro>CENTRO</bairro>
            <uf>MG</uf>
         </destino>
      </evento>
   </objeto>
</return>

Licença

MIT © Marcos Paulo

rastreio's People

Contributors

marcosisocram avatar

Watchers

 avatar

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.