Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

printable_calendar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

printable_calendar

  • 0.0.8
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Printable Calendar

Generate printable agendas from Google Calendars.

I got sick of Google Calendar's terrible print dialog and decided to code around it. This command line utility will download a day, week, work week, or month of agenda items and render them in your default browser so you can print them easily.

Screenshot

Installation and Setup

    $ gem install printable_calendar
  1. Copy the sample-config.json file.
  2. You need a Google OAuth client ID and secret. You get those here. First, you have to create a project, then add some OAuth credentials (cselect "OAuth client ID" under the "Create credentials" dropdown). Make sure you add the Calendar API to the project. Put the client ID and secret into the json file (You may also stash them in env vars: PRINTABLE_CALENDAR_CLIENT_ID and PRINTABLE_CALENDAR_CLIENT_SECRET. Just remove the keys from your JSON file if you do.)
  3. You need a refresh token. Having saved your partially filled out JSON file, run printable_calendar -g. That will open a dialog asking you to accept that your app can have access to your data. Just follow the instructions in the terminal. Paste that refresh token into the JSON file. (You can also use an env var for this: PRINTABLE_CALENDAR_REFRESH_TOKEN).
  4. Finally you need the calendars you want to pull in info from; grab their IDs through the Google Calendar UI by finding them in the left sidebar, clicking the little down arrow, clicking "settings", and then copying the email-looking thing next to "Calendar ID".

Usage

Run printable_calendar -c your-config-file.json. The application will download your events, create an HTML file in your temp dir, and open it in your default browser. All you have to do is print it.

There are a few other options. They're available in both the JSON file and as command line switches. Here are all them:

usage: printable_calendar [options]
    -g, --generate   Generate a token
    -h, --help       Print help
    -v, --version    Print version info
    -c, --config     Use a JSON config file
    --client-id      Google client id
    --client-secret  Google client secret
    --refresh-token  Google refresh token
    -p, --period     Time period to use. Accepts work_week, american_week, intl_week, month, day. Defaults to work_week
    --title          Title for this calendar
    -s, --starting-from  Date to anchor on. Defaults to today. Format as YYYY-MM-DD
    --calendar-ids   Google calendar IDs

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/icambron/printable_calendar.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 28 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc