gocafier

command module
v0.0.0-...-35b36dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

README

gocafier

Este pequeño proyecto sirve para dar alivio a un rasgo de ansiedad que casi todos tenemos... Cada vez que encargaba un envío por OCA, realmente me jodía no tener un servicio automatizado que me enviara notificaciones de acuerdo a los cambio de estado de los envíos. Tenía que ingresar al sitio web de OCA y consultarlo yo. Lo que se me ocurrió, viendo los requests y responses de ese sitio web, es que podría automatizar ese proceso y generar notificaciones al respecto. Así nació Gocafier.

Requisitos

  • Golang (recomiendo usar gvm para manejar versiones)
  • Godep

Instalación

Importante: Estas instrucciones son para Linux y probablemente para Mac. No lo probé en Windows.

go get github.com/eljuanchosf/gocafier
godep go build
mv config.yml.example config.yml

Configuración

Servidor de correos

Con tu editor de texto favorito, abrí el archivo config.yml y configurá los datos de servidor de correos.

Paquetes a buscar

Dentro de la key packages podes configurar un array de numeros de seguimiento.

Ejemplo:

packages:
  - 00000000000000
  - 00000000000001

Uso

Gocafier es fácil de usar.

Ejecución

Para ver como usarlo, se puede ejecutar ./gocafier --help:

$ ./gocafier --help
[2016-03-17 10:57:49.951451697 -0300 ART] Starting gocafier 1.0.0
usage: gocafier --smtp-user=SMTP-USER --smtp-pass=SMTP-PASS [<flags>]

Flags:
  --help               Show help (also see --help-long and --help-man).
  --debug              Enable debug mode. This disables emailing
  --cache-path=CACHE-PATH
                       Bolt Database path
  --ticker-time=3600s  Poller interval in secs
  --config-path="."    Set the Path to write profiling file
  --smtp-user=SMTP-USER
                       Sets the SMTP username
  --smtp-pass=SMTP-PASS
                       Sets the SMTP password
  --version            Show application version.

Lo más importante son los parámetros --smtp-user y --smtp-pass, en los que hay que especificar el usuario y contraseña del servidor de correo. Esos dos valores pueden también setearse mediante las variables de entorno GOCAFIER_SMTP_USER y GOCAFIER_SMTP_PASSWORD.

Configurando el template

Podés configurar el template que Gocafier va a usar para enviar el email editando el archivo email-template.html. Se explica a sí mismo bastante bien.

Contribuciones

Fork, branch, commit, PR. :)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
_workspace/src/github.com/alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
_workspace/src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
_workspace/src/github.com/boltdb/bolt
Package bolt implements a low-level key/value store in pure Go.
Package bolt implements a low-level key/value store in pure Go.
_workspace/src/github.com/ddliu/go-httpclient
Powerful and easy to use http client Powerful and easy to use http client
Powerful and easy to use http client Powerful and easy to use http client
_workspace/src/github.com/kr/pretty
Package pretty provides pretty-printing for Go values.
Package pretty provides pretty-printing for Go values.
_workspace/src/github.com/kr/text
Package text provides rudimentary functions for manipulating text in paragraphs.
Package text provides rudimentary functions for manipulating text in paragraphs.
_workspace/src/github.com/kr/text/colwriter
Package colwriter provides a write filter that formats input lines in multiple columns.
Package colwriter provides a write filter that formats input lines in multiple columns.
_workspace/src/github.com/kr/text/mc
Command mc prints in multiple columns.
Command mc prints in multiple columns.
_workspace/src/gopkg.in/alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
_workspace/src/gopkg.in/alecthomas/kingpin.v2/examples/curl
A curl-like HTTP command-line client.
A curl-like HTTP command-line client.
_workspace/src/gopkg.in/alexcesaro/quotedprintable.v3
Package quotedprintable implements quoted-printable encoding as specified by RFC 2045.
Package quotedprintable implements quoted-printable encoding as specified by RFC 2045.
_workspace/src/gopkg.in/gomail.v2
Package gomail provides a simple interface to compose emails and to mail them efficiently.
Package gomail provides a simple interface to compose emails and to mail them efficiently.
_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL