Skip to main content

Convert an airline crew schedule pdf into iCalendar format.

Project description

Current Release Contributors Forks Stargazers Issues MIT License LinkedIn

PyPI - Python Version PyPi - Package Version

PyPi - License

Logo

crewcal

Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model.
Explore the docs »

Report Bug · Request Feature


Table of Contents
  1. About the Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Contact

(back to top)

About the Project


Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model. An LLM (Large Language Model, specifically OpenAI's gpt-3.5-turbo) is used to extract the schedule information. iCalender files are recognized by most calendar systems (iOS, Android, Google, ++) and will create the flights on your phone/device calendar.

The PDF schedule does not need to follow a very prescribed structured format.

Development performed mostly using AIMS eCrew pdf schedules. It may work on other systems' schedules. Feel free to suggest other systems.

(back to top)

Getting Started

Prerequisites

Obtain an OpenAI API key.

Make this available as an environment variable:

export OPENAI_API_KEY=YOUR_KEY

Alternatively specify the API Key in a .env file.

(back to top)

Installation

Strongly consider using pipx or a virtual environment depending on your needs.

pip install crewcal

(back to top)

Usage

CLI

To create the calendar file (schedule.ics) from a pdf schedule file (schedule.pdf):

crewcal extract schedule.pdf schedule.ics

crewcal --help shows a brief manual page.

Python Package

The following sript extracts the schedule from schedule.pdf and stores the icalendar file in schedule.ics file.

from crewcal.llm_extract import OpenAISchedule

sched = OpenAISchedule(schedule_path='schedule.pdf', to_icalendar_file='schedule.ics')

The resulting .ics file can be read by most calendar software.

(back to top)

Roadmap

  • Add support schedules for systems in addition to AIMS. I would be happy to look at suggestions, especially if you can provide sample schedules. Create a new issue.

(back to top)

Contributing

Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also open a feature request or bug report. Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Project Link: crewcal

(back to top)

Project details


Download files

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

Source Distribution

crewcal-0.8.3.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

crewcal-0.8.3-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file crewcal-0.8.3.tar.gz.

File metadata

  • Download URL: crewcal-0.8.3.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for crewcal-0.8.3.tar.gz
Algorithm Hash digest
SHA256 9b0a0577ca86d2d15dcc70ad56a32b5ffc695f69f4bb9dab8bef0b3805b4fb9f
MD5 978645e5a3d412c92dd4b81e59aa4592
BLAKE2b-256 06f8363b566c408cdfd25e8f1c7a30b225c4e419be12bf150fc1fa036fe7fc1d

See more details on using hashes here.

File details

Details for the file crewcal-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: crewcal-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for crewcal-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5298bd35df327e3d4610448fb1afef6b23ca4951659ed54ead09b3bce295f770
MD5 e79bf5799815b6bfc6e00231d09471c8
BLAKE2b-256 66c170aa8128048069e38ff344d6a05f1bd825c6663bf65fd29eef856c1b0409

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page