Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A package that uses natural language processing to convert PDF calendars to JSONs and to convert Google Calendar events to Excel files

Project Description

This Python package is great for taking Arthur Murray Vernon’s Google Calendar events and arrange them in a calendar structure in an Excel file. That can then be copy-and-pasted into Microsoft Office Publisher to create a printable PDF calendar.

For those who want to go from the printable PDF calendars to a digital one, you’re in luck! I use machine learning to parse through printable PDF calendars and create JSONs out of them, where each event has a title, dance_style and time (if applicable), ripe for creating Google Calendar events from them.

While this project is geared towards use at Arthur Murray Dance Studios, feel free to take a look at the source code and modify it for your own calendar’s needs.

Have fun!

Setup from source code (GitHub)

  1. Install Python 3.x with pip.
  2. Create and activate a virtual environment using that Python 3 installation.
  3. Install Java 8.
  4. (Optional, Windows only): Install Microsoft Visual C++ Build Tools.
  5. (Optional): Install python-Levenshtein for improved speed: pip install python-Levenshtein
  6. Install dependencies: pip install -r requirements.txt.
  7. Install the corpora python -m textblob.download_corpora.
  8. Profit!

Setup from Pip (PyPI)

  1. Follow steps 1-4 from above.
  2. Install the amvernoncal package: pip install amvernoncal or pip install amvernoncal[levenshtein] if you want improved speed.
  3. Install the corpora python -m textblob.download_corpora.
  4. Profit!

How to go from Google Calendar to an Excel file

  1. Activate the Google Calendar API for your account and obtain your client_secret.json file.
  2. Activate your virtual environment.
  3. Import the module that will use your client secret: from amvernoncal import gcal_to_xlsx.
  4. Give the auth_and_get_events() function a path to your client secret, a month and year to search, and the name of the Google Calendar you’re converting from. Example: auth_and_get_events('client_secret.json', 'September 2017', 'Classes')
  5. That will then create 3 folders: JSONs, PDFs, and Output. Your Excel file will be in the Output folder.

How to go from a printable PDF calendar to a JSON

  1. Follow steps 1 and from above.
  2. Import the function that will parse your calendar: from amvernoncal.pdfproc import pdf_to_json
  3. Give the parse_calendar() function a path to your calendar, named based on the month and year, as well as tell it if you want to save to a JSON file or just return the JSON. Example: pdf_to_json.parse_calendar('september_2017.pdf', to_file=True)
Release History

Release History

This version
History Node

0.0.1.dev83

History Node

0.0.1.dev82

History Node

0.0.1.dev81

History Node

0.0.1.dev80

History Node

0.0.1.dev79

History Node

0.0.1.dev78

History Node

0.0.1.dev77

History Node

0.0.1.dev76

History Node

0.0.1.dev75

History Node

0.0.1.dev74

History Node

0.0.1.dev73

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
amvernoncal-0.0.1.dev83.tar.gz (10.9 MB) Copy SHA256 Checksum SHA256 Source Sep 21, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting