Generates sunrise and sunset calendar items in CSV form for import to your favorite calendar program.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
src/server
.gitignore
.npmignore
Gruntfile.js
History.md
LICENSE.txt
README.md
package.json
suncsv.sublime-project

README.md

suncsv

Generates sunrise and sunset calendar items in CSV form for import to your favorite calendar program.

Setup

First, install the project globally:

npm install -g suncsv

Usage

To get a CSV with sunrise/sunset events from now until the end of this year:

suncsv -z YOURZIP > events.csv

To get it for next year, you can specify your begin and end dates:

suncsv -z YOURZIP --begin '1/1/2015' --end '12/31/2015' > events.csv

Add to Google Calendar

Now that you've got your events.csv file, you can import it into your favorite calendar program. Google Calendar makes it really easy. We can even create a new calendar just for these items:

  • Click on the little down arrow beside My Calendars
  • Select Create new calendar

Once you've created your calendar and are back on the main screen, let's import the events:

  • Click on the little down arrow beside Other calendars
  • Select Import calendar
  • Click Choose File and find your newly-generated events.csv
  • Now select the calendar you just created for the new items
  • Click Import!

That should do it! You've got sunrise and sunset times you can easily turn on and off by toggling your new sub-calendar.

Enjoy!

Some thoughts on next steps:

  • Generate it in a more friendly way for spreadsheets

    • sunrise and sunset on the same row
    • complete times included along with separated date and time
  • Add some stuff for equinoxes/solstices/more? http://www.archaeoastronomy.com/2014.html

  • We don't always honor start/end dates perfectly if generating events for another timezone

License

(The MIT License)

Copyright (c) 2013 Scott Nonnenberg <scott@nonnenberg.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.