Code Monkey home page Code Monkey logo

sfwash's Introduction

sfwash

A CLI for scheduling pickups on SFWash (http://sfwash.com/schedule-a-pick-up).

SFWash, unfortunately, requires you to fill in your information (address, phone number, etc) with them every time. This script will save your details on your machine, and reuse them every time you need to schedule a pickup. Hooray!

Note: This code may be horribly brittle because it basically just POSTs to the SFWash website with the parameters required at the time of writing, but oh well!

Usage

Install the gem:

$ gem install sfwash

Then, to schedule a pickup (make sure you have your config file created first):

$ sfwash schedule

Or provide a day of the week:

$ sfwash schedule friday

Config file

At the moment, you must have a ~/.sfwash config file to use this script. Example config file:

:preferences:
  :name: Amber Feng
  :phone: 555-555-5555
  :email: [email protected]
  :address: 123 Main Street
  :apartment: N/A
  :day: Friday
  :time: Anytime_Access
  :instructions: OldPreferences
  :detergent: Last Order
  :bleach: Last Order
  :softener: Last Order

Building

  1. Clone the repository and install all dependencies.
git clone [email protected]:amfeng/sfwash.git
  1. Stub out the real SFWASH_URL in lib/sfwash.rb (https://github.com/amfeng/sfwash/blob/master/lib/sfwash.rb#L6) with something from RequestBin or similar.

  2. Build and install the gem locally.

gem build sfwash.gemspec && gem install sfwash-0.1.0.gem
  1. Run the gem! (Make sure to rebuild and install after any changes.)
sfwash schedule

Contributing

Feel free to open a pull request! (:

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.