GithubHelp home page GithubHelp logo

packagebot's Introduction

packageBot

A Twitter bot for tracking a package with UPS. Make an account here: https://www.ups.com/upsdeveloperkit

Install

Install node 6 or higher, then run

npm install

Configure

All configuration takes place in config.js and a JSON file.

  1. Add your packages to a JSON file. An example can be found in sample.packages.json
  • This file is used as a cache during operation. The bot will write additional data about each package as the location changes.
  • New packages may be added without stopping the bot.
  • Any package with the delivered set to true can be removed as it will no longer be Tweeted.
  1. Add your Twitter consumer and access token keys and secrets to the twitter object
  2. Add your UPS licenseNumber, userId, and password to the ups object
  3. Edit the minor options as you desire
    • packagesFileName = 'packages.json' the filename where you store your packages
    • refreshTime = 3600000 refresh time in milliseconds
    • hashtag = '#packageBot' optional hashtag to be appended to a tweet. Set it to be an empty string if you don't want a hashtag
    • title = 'My' The ownership title of the package. This prefixes the package name. If you run this bot on its own account, it might make sense to say, for example, 'Brian's magic eraser has arrived...', where if you're running the bot on your own account, it might make more sense to use the first person, for example, 'My magic eraser has arrived...'

Run

npm start

Deploy With Docker

Build the container with:

docker build -t packagebot .

Run the container with:

docker run --name packageBot -d packagebot

packagebot's People

Contributors

brianmitchl avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.