A Node CLI tool to find campsites in Yosemite.
- Install
- Upgrade
- Usage
- Sending email
- Sending text messages
- Playing sound notification
- Compatibility
- Dependencies
- Contributing
- TODO
- Install NodeJS: https://nodejs.org/en/
- Download Bivy.
- Install Bivy:
cd path/to/where/you-saved/bivy
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
- Re-download Bivy.
- Re-install Bivy:
cd path/to/where/you-saved/bivy
npm install -g
After upgrading type bivy --version
to verify you are using the newly installed version.
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.
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'
.
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.
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.
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:
[email protected]
for Verizon[email protected]
for AT&T[email protected]
for T-Mobile[email protected]
for Sprint
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:
- From:
postmaster@SANDBOX_DOMAIN_HERE.mailgun.org
- To:
[email protected]
- Forward to:
[email protected]
for Verizon
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.
Bivy was tested using the following:
- Mac version 10.12.6 (macOS Sierra)
- NodeJS 8.3.0
- NodeJS https://nodejs.org/en/ with NPM
- Puppeteer https://www.npmjs.com/package/puppeteer
- Commander https://www.npmjs.com/package/commander
- Mailgun https://www.mailgun.com/ and MailgunJS https://www.npmjs.com/package/mailgun-js
- Chalk https://www.npmjs.com/package/chalk
- 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.
- 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.