Coder Social home page Coder Social logo

word-calendar-generator's Introduction

Word Calendar Generator

This program creates a printable Microsoft Word .docx calendar based on a particular user entered week or month, using a .ical file provided from Google Calendar (or similar).

The Purpose

This program is useful if you have a building with many rooms being used day to day for various things (such as classes or events), and you need to track what's going on in there using a paper based calendar that you print out regularly. Yes, paper. Recycle it when you're done, at least!

This is particularly handy as printing out calendars from Google Calendar or similar will not provide enough at-a-glance information, failing to provide a customizable color coding system and not showing enough events per day. In this program, each room is given a distinct color (and row, in the case of the weekly calendar), and each event is labeled clearly where and when it is based on the color and short name given

Requirements

These are not hard requirements but just what the program has been tested with:

  • macOS (Mojave+) or Windows (10+)

    • Linux support unknown but should work.
  • Python 3.7.4 and above - Program should reasonably work without issue on newer versions. (tested on 3.8)

  • Microsoft Word or any word processing program that can open docx files

  • Basic knowledge of installing Python modules (see here)

Modules Used

python-docx - Used to work with docx files for use in Microsoft Word

icalendar - Used to grab events (sort of)

recurring-ical-events - Actually used to grab events since icalendar module does not support recurring events

pytz - For timezone conversion

holidays - Detecting holidays

Gooey - For the UI. Will eventually be replaced.

Usage

  • Install all the listed modules above

  • Make a calendar on Google Calendar, or Outlook, or any service that provides a URL to access the .ical file.

    • In the "Location" field of each event, input the room name that it is taking place in. Make sure this is something you want to enter every time you add an event. Shorthand names works as long as you pay attention in the next steps.
  • Open config.cfg in a text editor and edit the contents

  • Run file "main.py" via Python. Follow interface.

  • The .docx file generated by the program will be in the folder selected by the user.

word-calendar-generator's People

Contributors

harveymilkphotocenter avatar narrowstacks avatar

Stargazers

 avatar  avatar

Watchers

 avatar

word-calendar-generator's Issues

Automatic font scaling to ensure calendar stays on one page

If there are enough events in the calendar on any given day, it can push the contents of the calendar further down, sometimes reaching another page. If the program were to change to size of the text dynamically based on the number of events in the column with the most events, this could be likely prevented.

Perhaps others might WANT the calendar to extend to two pages, though?

Rewrite interface

Currently the program uses Gooey, which builds an interface based on command line arguments. It’s a workaround for usability and for me to make sure the core of the program works. But I would eventually like the interface to be a little nicer looking while adding some more functionality.

Ideally it would be nice if users would be able to edit the config file from within the interface. Color pickers for the location colors, etc.

Remove the 0 in front of "updated" dates.

In the header of the docx file, a "last updated" field adds the date of the file's creation. It places zeroes in front of months or days that are single digits.

Currently, it looks like this, errant zero highlighted in grey:
WINWORD_Vu5IdhEGAU

When it should look something like this:
WINWORD_L6pKD8LUAD

Two empty rows remain in monthly calendar on most months

When the program generates the table in the word document for monthly calendars, it is not aware of how many rows it actually needs, so we currently use the max that would ever be used. As a result, if a month doesn't take up all 13 rows, the program doesn't remove the empty rows at the bottom.
If the true number of rows needed could be calculated before the table is created, this would fix it.

In the image below, the errant rows at the bottom are highlighted in grey:
WINWORD_XKNw2KL6bi

Add automatic Sunday/Monday detection

Right now, if a user is generating a weekly calendar, the program relies on the user to select the specific Sunday/Monday of their chosen week. The program should allow the user to select any given day of the week and find the appropriate Sunday/Monday to start the week on.

No default options set if option isn't in config file

If a user forgets an option inside of config.cfg, it breaks the program as no defaults are set by the program.

Example:

If a user forgets to include a line like
TIMEZONE = America/Los_Angeles
The program has nothing to work with, so an exception is raised.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.