Skip to content

A Node CLI tool to find campsites in Yosemite.

License

Notifications You must be signed in to change notification settings

vasilionjea/bivy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bivy (v3.0.3)

A Node CLI tool to find campsites in Yosemite.

Install

  • Install NodeJS: https://nodejs.org/en/
  • Download Bivy.
  • Install Bivy:
    1. cd path/to/where/you-saved/bivy
    2. npm install -g

Note: If you run into file permission errors, you may need to give permissions to Bivy's entry file using the following command on a UNIX machine: chmod u+rwx ./src/index.js

Upgrade

  • Re-download Bivy.
  • Re-install Bivy:
    1. cd path/to/where/you-saved/bivy
    2. npm install -g

After upgrading type bivy --version to verify you are using the newly installed version.

Usage

For help, type bivy -h in your command line. You should see the following:

Usage: bivy [options]

Options:

  -V, --version            output the version number
  -a, --arrival [string]   (optional) Add arrival date (default: 11/18/2018)
  -n, --nights [number]    (optional) Add number of nights (default: 1)
  -i, --interval [string]  (optional) Add interval with minutes and/or hours to schedule a search (default: 0min)
  -h, --help               output usage information

To stop Bivy from running you can press CTRL plus C at anytime.

The simplest way to use Bivy is by opening your command line and typing bivy without any options. Using the command this way assumes that you want your arrival date to be two days from today, and that you want to stay a total of 1 night. The search task runs only once and it exits when it's done.

--interval option

The --interval option allows you to run the search task at a specified interval. For example, to run the search every hour and 30 minutes you would type bivy --interval='1hr 30min'. Again, this assumes your arrival date to be two days from today.

You could specify hours, minutes, or both. For example, to run the search every 30 minutes you would type bivy --interval='30min'.

--arrival and --nights options

The --arrival and --nights options allow you to construct the dates you are interested in. For example: bivy --arrival="11/18/2018" --nights=2. These options can of course be used in combination with the --interval option like this: bivy --arrival="11/18/2018" --nights=2 --interval="30min"

Note: The order of the options does not matter.

Sending email

Under the src/ folder there is a mailgun.js file where you can specify your Mailgun settings. Mailgun is an Email service that allows you to send up to 10,000 emails per month for free - more at https://www.mailgun.com/.

Note: You'll need to sign up for a free Mailgun account before you can configure Bivy to send you emails.

Sending text messages

Bivy does not send MMS messages, but you can set up email forwarding from your email client to your phone number using one of the following carrier addresses:

For more information on how the above carrier email addresses work do a Web search for "send text message from email to cell phone". Your email forwarding will look like this:

Playing sound notification

To play a "success" sound notification on your MacOS you should place an audio file under the assets/ directory, and also assign the name of your audio file to the AUDIO_FILE_SUCCESS setting inside the config.js file.

Compatibility

Bivy was tested using the following:

  • Mac version 10.12.6 (macOS Sierra)
  • NodeJS 8.3.0

Dependencies

Contributing

  • Clone the Git repo locally.
  • Instead of installing Bivy globally, execute the main file directly ./src/index.js from the command line.
  • Make a pull request for the feature or bug fix.

TODO

  • Mailgun settings shouldn't be hardcoded inside mailgun.js. Add ability to read settings from environment variables that are not checked in to the Github repository.
  • Setup a simple ExpressJS app that responds with static
    copies of the HTML pages that Bivy crawls. This will help with testing Bivy features locally without having to depend on the actual website that it crawls.
  • Deploy Bivy in the cloud as a web service.
  • Perhaps add a --weather option that reports the weather. The weather report should be visible inside the sent email when Bivy finds a campsite and printed in STDOUT.

About

A Node CLI tool to find campsites in Yosemite.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published