crewcal
Convert an airline crew schedule pdf into iCalendar format using a Large Language Model.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
About the Project
Convert an airline crew schedule pdf into iCalendar format using a Large Language Model. OpenAI's gpt-4o-mini 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.
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.
Installation
Strongly consider using pipx or a virtual environment depending on your needs.
pip install crewcal
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.
Roadmap
- Add support for schedules from systems in addition to AIMS. I would be happy to look at suggestions, especially if you can provide sample schedules. Create a new issue to initiate a new request.
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Contact
Project Link: crewcal
Metadata
Release files for crewcal 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crewcal-0.9.0.tar.gz | 14.7 kB | Without provenance | Details for crewcal-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewcal-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for crewcal-0.9.0-py3-none-any.whl |
Total release size: 28.0 kB
Release files / crewcal-0.9.0.tar.gz
| Download URL | crewcal-0.9.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b41c3ab416a3428f860b6afe8d59f537f77ca11f65c73f160909d8e67ba4ef4
|
|
BLAKE2b-256 checksum How to use checksums |
32f3a5e5c488d8ec548526291f2857550d245bf519edc869524ccd2b206c2986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
|
Release files / crewcal-0.9.0-py3-none-any.whl
| Download URL | crewcal-0.9.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f59c928ec256aac28b0ccb800a8bf2d34390a292bbc289041e35b511c892354
|
|
BLAKE2b-256 checksum How to use checksums |
8193ce05b97fc8d90b822f541968289c93cba4710a4462a06e6b14dfb23025bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
|
Security for crewcal 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.